[arch-commits] Commit in ndiswrapper-dkms/trunk (PKGBUILD linux-4.11.patch)

Felix Yan felixonmars at archlinux.org
Mon May 15 17:57:49 UTC 2017


    Date: Monday, May 15, 2017 @ 17:57:49
  Author: felixonmars
Revision: 228143

upgpkg: ndiswrapper-dkms 1.61-2

add experimental support for 4.11+ kernels

Added:
  ndiswrapper-dkms/trunk/linux-4.11.patch
Modified:
  ndiswrapper-dkms/trunk/PKGBUILD

------------------+
 PKGBUILD         |   12 ++++++++---
 linux-4.11.patch |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-05-15 17:35:23 UTC (rev 228142)
+++ PKGBUILD	2017-05-15 17:57:49 UTC (rev 228143)
@@ -4,7 +4,7 @@
 
 pkgname=ndiswrapper-dkms
 pkgver=1.61
-pkgrel=1
+pkgrel=2
 pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors.Use with DKMS"
 arch=('i686' 'x86_64')
 url="http://sourceforge.net/projects/ndiswrapper/"
@@ -14,10 +14,16 @@
 provides=('ndiswrapper')
 conflicts=('ndiswrapper')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/pgiri/ndiswrapper/archive/v$pkgver.tar.gz"
-        "dkms.conf")
+        'dkms.conf' 'linux-4.11.patch')
 md5sums=('1267784d65a8ba6a92884cf6f3bffb9a'
-         '801e409f0b93a0434e5c923831c49d50')
+         '801e409f0b93a0434e5c923831c49d50'
+         'c471bffbfb1f9256a33ca40284856bfc')
 
+prepare() {
+  cd ndiswrapper-$pkgver
+  patch -p1 -i ../linux-4.11.patch
+}
+
 build() {
   cd ndiswrapper-$pkgver/ndiswrapper
   make -C utils

Added: linux-4.11.patch
===================================================================
--- linux-4.11.patch	                        (rev 0)
+++ linux-4.11.patch	2017-05-15 17:57:49 UTC (rev 228143)
@@ -0,0 +1,55 @@
+commit fa2aeeccd5366378ca2eb83c6daee64b511fe792
+Author: Felix Yan <felixonmars at archlinux.org>
+Date:   Tue May 16 01:32:56 2017 +0800
+
+    Add support for Linux 4.11+
+
+diff --git a/ndiswrapper/driver/ndis.c b/ndiswrapper/driver/ndis.c
+index c1913a05..2ab4dd21 100644
+--- a/ndiswrapper/driver/ndis.c
++++ b/ndiswrapper/driver/ndis.c
+@@ -2258,7 +2258,9 @@ wstdcall void NdisMIndicateReceivePacket(struct ndis_mp_block *nmb,
+ 			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 @@ wstdcall void EthRxIndicateHandler(struct ndis_mp_block *nmb, void *rx_ctx,
+ 		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 @@ wstdcall void NdisMTransferDataComplete(struct ndis_mp_block *nmb,
+ 		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;
+diff --git a/ndiswrapper/driver/ntoskernel.h b/ndiswrapper/driver/ntoskernel.h
+index 3c4c6ff0..f1c52e51 100644
+--- a/ndiswrapper/driver/ntoskernel.h
++++ b/ndiswrapper/driver/ntoskernel.h
+@@ -296,6 +296,10 @@ static inline void (INIT_WORK)(struct work_struct *work, work_func_t func)
+ #define add_taint(flag, lockdep_ok) add_taint(flag)
+ #endif
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++#include <linux/sched/signal.h>
++#endif
++
+ #include "winnt_types.h"
+ #include "ndiswrapper.h"
+ #include "pe_linker.h"



More information about the arch-commits mailing list