[arch-commits] Commit in ndiswrapper/trunk (4 files)
Christian Hesse
eworm at archlinux.org
Tue Sep 17 12:31:55 UTC 2019
Date: Tuesday, September 17, 2019 @ 12:31:55
Author: eworm
Revision: 510983
upgpkg: ndiswrapper 1.61-8
fix for linux 5.0 and linux 5.3
Added:
ndiswrapper/trunk/linux-5.0.patch
ndiswrapper/trunk/linux-5.3.patch
Modified:
ndiswrapper/trunk/PKGBUILD
ndiswrapper/trunk/linux-4.15.patch
------------------+
PKGBUILD | 12 +++++----
linux-4.15.patch | 12 ++++-----
linux-5.0.patch | 25 +++++++++++++++++++
linux-5.3.patch | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 107 insertions(+), 11 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-09-17 11:48:27 UTC (rev 510982)
+++ PKGBUILD 2019-09-17 12:31:55 UTC (rev 510983)
@@ -5,26 +5,28 @@
pkgname=(ndiswrapper-dkms ndiswrapper)
pkgver=1.61
_extramodules=extramodules-ARCH
-pkgrel=7
+pkgrel=8
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors"
arch=('x86_64')
url="http://sourceforge.net/projects/ndiswrapper/"
license=('GPL')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/pgiri/ndiswrapper/archive/v$pkgver.tar.gz"
- 'dkms.conf' 'linux-4.11.patch' 'linux-4.13.patch' 'linux-4.15.patch')
+ 'dkms.conf' 'linux-4.11.patch' 'linux-4.13.patch' 'linux-4.15.patch' 'linux-5.0.patch' 'linux-5.3.patch')
sha512sums=('85f550f2952137529e0e9855f4d94b7bbc64cbf8a84a31c1b75a4be09d97478a997e64fa6e1ff4e0d29a97a79fc3d4dab1ebdaa9edb3d627a215f47aa4d52823'
'9fce255fc02ddf6e939dc61a5e29c0ea5fa1a31ecc3c390081bc53aa1cd48eddf5db621f0a1cb909634529d4ccc2995eea8827be8eb5807b34dc17e15045ecf4'
'5350308406457658fb31c378d6f3dd2a34c7331aebe5bdc80744bf955f1144e88181441704ccc7532f55d6fbe8d410440fb8838c2955d688dde4b55f74fc6ba5'
'de026a271cbfbefee99bc00a13c50be87294e5e2c5407d23cff6ce2d2a0c853542ce4f7e3e150741c7e8e32466fb1ab7cab266957da5bcca8376fb0f38e94482'
- '52bd3d2025ffb8a3f6a4a1a1fee1b87d3811f30a210a54aaa7b37838eb256cd766bc1aeda24e4b4f4829992584931ecd97a042794c9b854bd1ebbf452dce2abf')
+ '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
-
- cd 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 11:48:27 UTC (rev 510982)
+++ linux-4.15.patch 2019-09-17 12:31:55 UTC (rev 510983)
@@ -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.0.patch
===================================================================
--- linux-5.0.patch (rev 0)
+++ linux-5.0.patch 2019-09-17 12:31:55 UTC (rev 510983)
@@ -0,0 +1,25 @@
+diff -u -r ndiswrapper-1.61/ndiswrapper/driver/ntoskernel.c ndiswrapper-1.61-5.0/ndiswrapper/driver/ntoskernel.c
+--- ndiswrapper-1.61/ndiswrapper/driver/ntoskernel.c 2019-03-04 20:22:58.095332763 +0000
++++ ndiswrapper-1.61-5.0/ndiswrapper/driver/ntoskernel.c 2019-03-04 20:24:48.698777448 +0000
+@@ -2498,7 +2498,7 @@
+
+ int ntoskernel_init(void)
+ {
+- struct timeval now;
++ struct timespec64 now;
+
+ spin_lock_init(&dispatcher_lock);
+ spin_lock_init(&ntoskernel_lock);
+@@ -2518,10 +2518,10 @@
+ INIT_WORK(&ntos_work, ntos_work_worker);
+ wrap_timer_slist.next = NULL;
+
+- do_gettimeofday(&now);
++ ktime_get_real_ts64(&now);
+ wrap_ticks_to_boot = TICKS_1601_TO_1970;
+ wrap_ticks_to_boot += (u64)now.tv_sec * TICKSPERSEC;
+- wrap_ticks_to_boot += now.tv_usec * 10;
++ wrap_ticks_to_boot += now.tv_nsec / 100;
+ wrap_ticks_to_boot -= jiffies * TICKSPERJIFFY;
+ TRACE2("%llu", wrap_ticks_to_boot);
+
Added: linux-5.3.patch
===================================================================
--- linux-5.3.patch (rev 0)
+++ linux-5.3.patch 2019-09-17 12:31:55 UTC (rev 510983)
@@ -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);
+ }
More information about the arch-commits
mailing list