Date: Tuesday, September 17, 2019 @ 12:33:16
  Author: eworm
Revision: 510985

upgpkg: ndiswrapper-arch 1.61-63

fix and rebuilt for linux 5.3.arch1-1

Added:
  ndiswrapper-arch/trunk/linux-5.3.patch
Modified:
  ndiswrapper-arch/trunk/PKGBUILD
  ndiswrapper-arch/trunk/linux-4.15.patch

------------------+
 PKGBUILD         |   12 +++++----
 linux-4.15.patch |   12 ++++-----
 linux-5.3.patch  |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 82 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2019-09-17 12:32:05 UTC (rev 510984)
+++ PKGBUILD    2019-09-17 12:33:16 UTC (rev 510985)
@@ -4,7 +4,7 @@
 pkgname=ndiswrapper-arch
 pkgver=1.61
 _extramodules=extramodules-ARCH
-pkgrel=62
+pkgrel=63
 pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by 
vendors, kernel module for Arch kernel"
 arch=('x86_64')
 url="https://sourceforge.net/projects/ndiswrapper/";
@@ -14,19 +14,21 @@
 provides=('NDISWRAPPER-MODULE')
 replaces=('ndiswrapper-module')
 
source=("ndiswrapper-$pkgver.tar.gz::https://github.com/pgiri/ndiswrapper/archive/v$pkgver.tar.gz";
-        'linux-4.11.patch' 'linux-4.13.patch' 'linux-4.15.patch' 
'linux-5.0.patch')
+        'linux-4.11.patch' 'linux-4.13.patch' 'linux-4.15.patch' 
'linux-5.0.patch' 'linux-5.3.patch')
 
sha512sums=('85f550f2952137529e0e9855f4d94b7bbc64cbf8a84a31c1b75a4be09d97478a997e64fa6e1ff4e0d29a97a79fc3d4dab1ebdaa9edb3d627a215f47aa4d52823'
             
'5350308406457658fb31c378d6f3dd2a34c7331aebe5bdc80744bf955f1144e88181441704ccc7532f55d6fbe8d410440fb8838c2955d688dde4b55f74fc6ba5'
             
'de026a271cbfbefee99bc00a13c50be87294e5e2c5407d23cff6ce2d2a0c853542ce4f7e3e150741c7e8e32466fb1ab7cab266957da5bcca8376fb0f38e94482'
-            
'52bd3d2025ffb8a3f6a4a1a1fee1b87d3811f30a210a54aaa7b37838eb256cd766bc1aeda24e4b4f4829992584931ecd97a042794c9b854bd1ebbf452dce2abf'
-            
'4918dcebd62ae577401469719f1a8866edd3dc97667aa3de287af1530aa68f50dc2508c883ecd2c9d1fe20f226ecd342b04b08f7a2cace0e531e5f49bbc12f2c')
+            
'4296e7488d8c0cd971d70a81c01f24ab8e01c8611934024e2438181f0fb7c39a2c8201d48ab04659af2a8897ae93fb0810332e89c2a09a8140e216aed56db34b'
+            
'4918dcebd62ae577401469719f1a8866edd3dc97667aa3de287af1530aa68f50dc2508c883ecd2c9d1fe20f226ecd342b04b08f7a2cace0e531e5f49bbc12f2c'
+            
'c404f35280534b172235c5c578657d7a30ac2253c7c2abedd65a183d09390e95e7c3030cb409accb4d198ff0411482f8029f8664418c99d5672f92e9c733801d')
 
 prepare() {
   cd ndiswrapper-$pkgver
   patch --no-backup-if-mismatch -p1 -i "$srcdir"/linux-4.11.patch
   patch --no-backup-if-mismatch -p1 -i "$srcdir"/linux-4.13.patch
-  patch --no-backup-if-mismatch -p1 -i "$srcdir"/linux-4.15.patch -d 
ndiswrapper
+  patch --no-backup-if-mismatch -p1 -i "$srcdir"/linux-4.15.patch
   patch --no-backup-if-mismatch -p1 -i "$srcdir"/linux-5.0.patch
+  patch --no-backup-if-mismatch -p1 -i "$srcdir"/linux-5.3.patch
 }
 
 build() {

Modified: linux-4.15.patch
===================================================================
--- linux-4.15.patch    2019-09-17 12:32:05 UTC (rev 510984)
+++ linux-4.15.patch    2019-09-17 12:33:16 UTC (rev 510985)
@@ -23,8 +23,8 @@
 
 diff --git a/driver/ntoskernel.c b/driver/ntoskernel.c
 index 4fe0dc1..156c688 100644
---- a/driver/ntoskernel.c
-+++ b/driver/ntoskernel.c
+--- a/ndiswrapper/driver/ntoskernel.c
++++ b/ndiswrapper/driver/ntoskernel.c
 @@ -77,7 +77,6 @@ u64 wrap_ticks_to_boot;
  #if defined(CONFIG_X86_64)
  static struct timer_list shared_data_timer;
@@ -91,8 +91,8 @@
  }
 diff --git a/driver/usb.c b/driver/usb.c
 index 3e7021a..e55c2c6 100644
---- a/driver/usb.c
-+++ b/driver/usb.c
+--- a/ndiswrapper/driver/usb.c
++++ b/ndiswrapper/driver/usb.c
 @@ -750,6 +750,12 @@ static USBD_STATUS wrap_set_clear_feature(struct 
usb_device *udev,
        USBEXIT(return NT_URB_STATUS(nt_urb));
  }
@@ -119,8 +119,8 @@
                status_req->transfer_buffer_length = ret;
 diff --git a/driver/wrapndis.c b/driver/wrapndis.c
 index 870e4c2..f653440 100644
---- a/driver/wrapndis.c
-+++ b/driver/wrapndis.c
+--- a/ndiswrapper/driver/wrapndis.c
++++ b/ndiswrapper/driver/wrapndis.c
 @@ -1093,9 +1093,15 @@ send_assoc_event:
        EXIT2(return);
  }

Added: linux-5.3.patch
===================================================================
--- linux-5.3.patch                             (rev 0)
+++ linux-5.3.patch     2019-09-17 12:33:16 UTC (rev 510985)
@@ -0,0 +1,69 @@
+diff --git a/ndiswrapper/driver/ntoskernel.c b/ndiswrapper/driver/ntoskernel.c
+index 4fe0dc1..4dd7a89 100644
+--- a/ndiswrapper/driver/ntoskernel.c
++++ b/ndiswrapper/driver/ntoskernel.c
+@@ -2524,7 +2524,11 @@ int ntoskernel_init(void)
+                       info->task = NULL;
+                       info->count = 0;
+ #ifdef CONFIG_SMP
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
+                       cpumask_setall(&info->cpus_allowed);
++#else
++                      cpumask_setall(&info->cpus_mask);
++#endif
+ #endif
+               }
+       } while (0);
+diff --git a/ndiswrapper/driver/ntoskernel.h b/ndiswrapper/driver/ntoskernel.h
+index 3c4c6ff..8a71ae3 100644
+--- a/ndiswrapper/driver/ntoskernel.h
++++ b/ndiswrapper/driver/ntoskernel.h
+@@ -107,7 +107,11 @@ static cpumask_t cpumasks[NR_CPUS];
+ #endif /* CONFIG_SMP */
+ 
+ #ifndef tsk_cpus_allowed
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
+ #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
++#else
++#define tsk_cpus_allowed(tsk) (&(tsk)->cpus_mask)
++#endif
+ #endif
+ 
+ #ifndef __packed
+@@ -631,7 +635,12 @@ struct irql_info {
+       int count;
+       struct mutex lock;
+ #ifdef CONFIG_SMP
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
+       cpumask_t cpus_allowed;
++#else
++      const cpumask_t *cpus_ptr;
++      cpumask_t       cpus_mask;
++#endif
+ #endif
+       struct task_struct *task;
+ };
+@@ -658,7 +667,11 @@ static inline KIRQL raise_irql(KIRQL newirql)
+       /* TODO: is this enough to pin down to current cpu? */
+ #ifdef CONFIG_SMP
+       assert(task_cpu(current) == smp_processor_id());
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
+       cpumask_copy(&info->cpus_allowed, tsk_cpus_allowed(current));
++#else
++      cpumask_copy(&info->cpus_mask, tsk_cpus_allowed(current));
++#endif
+       set_cpus_allowed_ptr(current, cpumask_of(smp_processor_id()));
+ #endif
+       put_cpu_var(irql_info);
+@@ -682,7 +695,11 @@ static inline void lower_irql(KIRQL oldirql)
+       if (--info->count == 0) {
+               info->task = NULL;
+ #ifdef CONFIG_SMP
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
+               set_cpus_allowed_ptr(current, &info->cpus_allowed);
++#else
++              set_cpus_allowed_ptr(current, &info->cpus_mask);
++#endif
+ #endif
+               mutex_unlock(&info->lock);
+       }

Reply via email to