commit 8c955b234f75c2c4c6bc1c38ac82c25629ff164a
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Wed Jun 28 14:26:15 2017 +0100
Patch for 4.11 kernel
ndiswrapper-4.11-kernel.patch | 47 +++++++++++++++++++++++++++++++++++++++++++
ndiswrapper-kmod.spec | 9 +++++++--
2 files changed, 54 insertions(+), 2 deletions(-)
---
diff --git a/ndiswrapper-4.11-kernel.patch b/ndiswrapper-4.11-kernel.patch
new file mode 100644
index 0000000..248b518
--- /dev/null
+++ b/ndiswrapper-4.11-kernel.patch
@@ -0,0 +1,47 @@
+--- a/driver/ndis.c
++++ b/driver/ndis.c
+@@ -2258,7 +2258,9 @@
+ WARNING("empty packet ignored");
+ continue;
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
+ wnd->net_dev->last_rx = jiffies;
++#endif
+ /* get total number of bytes in packet */
+ NdisGetFirstBufferFromPacketSafe(packet, &buffer, &virt,
+ &length, &total_length,
+@@ -2346,7 +2348,9 @@
+ ERROR("nmb is NULL");
+ EXIT3(return);
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
+ wnd->net_dev->last_rx = jiffies;
++#endif
+
+ if (look_ahead_size < packet_size) {
+ struct ndis_packet *packet;
+@@ -2461,7 +2465,9 @@
+ WARNING("illegal packet");
+ EXIT3(return);
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
+ wnd->net_dev->last_rx = jiffies;
++#endif
+ oob_data = NDIS_PACKET_OOB_DATA(packet);
+ skb_size = sizeof(oob_data->header) + oob_data->look_ahead_size +
+ bytes_txed;
+
+--- a/driver/ntoskernel.h
++++ b/driver/ntoskernel.h
+@@ -48,6 +48,10 @@
+ #include <linux/workqueue.h>
+ #include <linux/vmalloc.h>
+
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#include <linux/sched/signal.h>
++#endif
+
+ #if !defined(CONFIG_X86) && !defined(CONFIG_X86_64)
+ #error "this module is for x86 or x86_64 architectures only"
+
diff --git a/ndiswrapper-kmod.spec b/ndiswrapper-kmod.spec
index cba6389..540d6b1 100644
--- a/ndiswrapper-kmod.spec
+++ b/ndiswrapper-kmod.spec
@@ -13,14 +13,15 @@
Summary: Ndiswrapper kernel module
Name: ndiswrapper-kmod
Version: 1.61
-Release: 1%{?pre}%{?dist}
+Release: 2%{?pre}%{?dist}
License: GPLv2
Group: System Environment/Kernel
URL:
http://ndiswrapper.sourceforge.net
Source0:
http://downloads.sf.net/ndiswrapper/ndiswrapper-%{version}%{?pre}.tar.gz
Source11: ndiswrapper-kmodtool-excludekernel-filterfile
Patch0: ndiswrapper-kmod-nomodinfo.patch
-Patch1: ndiswrapper-4.7-kernel.patch
+Patch1: ndiswrapper-4.7-kernel.patch
+Patch2: ndiswrapper-4.11-kernel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# needed for plague to make sure it builds for i586 and i686
@@ -52,6 +53,7 @@ kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name}
--filterfi
%setup -q -c -T -a 0 -n %{name}-%{version}%{?pre}
(cd ndiswrapper-%{version}%{?pre} ;
%patch0 -p1 -b .orig
+%patch2 -p1 -b .orig
)
sed -i 's|/sbin/depmod -a|/bin/true|'
ndiswrapper-%{version}%{?pre}/driver/Makefile
for kernel_version in %{?kernel_versions} ; do
@@ -79,6 +81,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Jun 28 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1.61-2
+- Patch for 4.11 kernel
+
* Tue Jun 27 2017 Nicolas Chauvet <kwizart(a)gmail.com> - 1.61-1
- Update to 1.61