commit 7553ac7d6afe9bf34e6b153d62ed3489e36c568c
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Thu Dec 14 08:04:39 2017 +0000
Patch for 4.13 kernel
ndiswrapper-4.13-kernel.patch | 30 ++++++++++++++++++++++++++++++
ndiswrapper-4.7-kernel.patch | 13 -------------
ndiswrapper-kmod.spec | 12 ++++++++----
3 files changed, 38 insertions(+), 17 deletions(-)
---
diff --git a/ndiswrapper-4.13-kernel.patch b/ndiswrapper-4.13-kernel.patch
new file mode 100644
index 0000000..4e68634
--- /dev/null
+++ b/ndiswrapper-4.13-kernel.patch
@@ -0,0 +1,30 @@
+From eeac7ab831b3097005dadc64dd323f54ade30323 Mon Sep 17 00:00:00 2001
+From: Felix Yan <felixonmars(a)archlinux.org>
+Date: Mon, 11 Sep 2017 12:52:36 +0800
+Subject: [PATCH] Add support for linux 4.13+
+
+---
+ ndiswrapper/driver/ntoskernel.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/ndiswrapper/driver/ntoskernel.h b/ndiswrapper/driver/ntoskernel.h
+index f1c52e51..1422bd4d 100644
+--- a/ndiswrapper/driver/ntoskernel.h
++++ b/ndiswrapper/driver/ntoskernel.h
+@@ -119,9 +119,16 @@ static cpumask_t cpumasks[NR_CPUS];
+ */
+ #include <asm/dma-mapping.h>
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
+ #define PCI_DMA_ALLOC_COHERENT(pci_dev,size,dma_handle) \
+ dma_alloc_coherent(&pci_dev->dev,size,dma_handle, \
+ GFP_KERNEL | __GFP_REPEAT)
++#else
++#define PCI_DMA_ALLOC_COHERENT(pci_dev,size,dma_handle) \
++ dma_alloc_coherent(&pci_dev->dev,size,dma_handle, \
++ GFP_KERNEL | __GFP_RETRY_MAYFAIL)
++#endif
++
+ #define PCI_DMA_FREE_COHERENT(pci_dev,size,cpu_addr,dma_handle) \
+ dma_free_coherent(&pci_dev->dev,size,cpu_addr,dma_handle)
+ #define PCI_DMA_MAP_SINGLE(pci_dev,addr,size,direction) \
diff --git a/ndiswrapper-kmod.spec b/ndiswrapper-kmod.spec
index 5e8602c..4a001a9 100644
--- a/ndiswrapper-kmod.spec
+++ b/ndiswrapper-kmod.spec
@@ -13,15 +13,15 @@
Summary: Ndiswrapper kernel module
Name: ndiswrapper-kmod
Version: 1.61
-Release: 3%{?pre}%{?dist}
+Release: 4%{?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
-Patch2: ndiswrapper-4.11-kernel.patch
+Patch1: ndiswrapper-4.11-kernel.patch
+Patch2: ndiswrapper-4.13-kernel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# needed for plague to make sure it builds for i586 and i686
@@ -53,7 +53,8 @@ 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
+%patch1 -p1 -b .orig
+%patch2 -p2 -b .orig
)
sed -i 's|/sbin/depmod -a|/bin/true|'
ndiswrapper-%{version}%{?pre}/driver/Makefile
for kernel_version in %{?kernel_versions} ; do
@@ -81,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Dec 14 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1.61-4
+- Patch for 4.13 kernel
+
* Thu Aug 31 2017 RPM Fusion Release Engineering <kwizart(a)rpmfusion.org> - 1.61-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild