commit 688940420042bad29ac1ee37df9fce0ff6e0db2c
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Mon Sep 19 07:32:20 2016 +0100
Patch for 4.7 kernel
ndiswrapper-4.7-kernel.patch | 13 +++++++++++++
ndiswrapper-kmod.spec | 10 ++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/ndiswrapper-4.7-kernel.patch b/ndiswrapper-4.7-kernel.patch
new file mode 100644
index 0000000..0159f56
--- /dev/null
+++ b/ndiswrapper-4.7-kernel.patch
@@ -0,0 +1,13 @@
+--- a/driver/wrapndis.c
++++ b/driver/wrapndis.c
+@@ -704,7 +704,9 @@
+ n = wnd->max_tx_packets;
+ n = mp_tx_packets(wnd, wnd->tx_ring_start, n);
+ if (n) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
+ wnd->net_dev->trans_start = jiffies;
++#endif
+ wnd->tx_ring_start =
+ (wnd->tx_ring_start + n) % TX_RING_SIZE;
+ wnd->is_tx_ring_full = 0;
+
diff --git a/ndiswrapper-kmod.spec b/ndiswrapper-kmod.spec
index 0a0931e..04c66d5 100644
--- a/ndiswrapper-kmod.spec
+++ b/ndiswrapper-kmod.spec
@@ -3,20 +3,22 @@
# "buildforkernels newest" macro for just that build; immediately after
# queuing that build enable the macro again for subsequent builds; that way
# a new akmod package will only get build when a new one is actually needed
-%global buildforkernels current
+%global buildforkernels akmod
+%global debug_package %{nil}
#global pre rc1
Summary: Ndiswrapper kernel module
Name: ndiswrapper-kmod
Version: 1.60
-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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# needed for plague to make sure it builds for i586 and i686
@@ -48,6 +50,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
+%patch1 -p1 -b .orig
)
sed -i 's|/sbin/depmod -a|/bin/true|'
ndiswrapper-%{version}%{?pre}/driver/Makefile
for kernel_version in %{?kernel_versions} ; do
@@ -75,6 +78,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Sep 19 2016 Leigh Scott <leigh123linux(a)googlemail.com> - 1.60-2
+- Patch for 4.7 kernel
+
* Sun Jun 19 2016 Leigh Scott <leigh123linux(a)googlemail.com> - 1.60-1
- Update to 1.60