Date: Tuesday, September 17, 2019 @ 12:32:05 Author: eworm Revision: 510984
archrelease: copy trunk to community-x86_64 Added: ndiswrapper/repos/community-x86_64/PKGBUILD (from rev 510983, ndiswrapper/trunk/PKGBUILD) ndiswrapper/repos/community-x86_64/dkms.conf (from rev 510983, ndiswrapper/trunk/dkms.conf) ndiswrapper/repos/community-x86_64/linux-4.11.patch (from rev 510983, ndiswrapper/trunk/linux-4.11.patch) ndiswrapper/repos/community-x86_64/linux-4.13.patch (from rev 510983, ndiswrapper/trunk/linux-4.13.patch) ndiswrapper/repos/community-x86_64/linux-4.15.patch (from rev 510983, ndiswrapper/trunk/linux-4.15.patch) ndiswrapper/repos/community-x86_64/linux-5.0.patch (from rev 510983, ndiswrapper/trunk/linux-5.0.patch) ndiswrapper/repos/community-x86_64/linux-5.3.patch (from rev 510983, ndiswrapper/trunk/linux-5.3.patch) Deleted: ndiswrapper/repos/community-x86_64/PKGBUILD ndiswrapper/repos/community-x86_64/dkms.conf ndiswrapper/repos/community-x86_64/linux-4.11.patch ndiswrapper/repos/community-x86_64/linux-4.13.patch ndiswrapper/repos/community-x86_64/linux-4.15.patch ------------------+ PKGBUILD | 104 +++++++------ dkms.conf | 48 +++--- linux-4.11.patch | 110 +++++++------- linux-4.13.patch | 54 +++---- linux-4.15.patch | 398 ++++++++++++++++++++++++++--------------------------- linux-5.0.patch | 25 +++ linux-5.3.patch | 69 +++++++++ 7 files changed, 452 insertions(+), 356 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2019-09-17 12:31:55 UTC (rev 510983) +++ PKGBUILD 2019-09-17 12:32:05 UTC (rev 510984) @@ -1,51 +0,0 @@ -# Maintainer: Felix Yan <felixonm...@archlinux.org> -# Contributor: maz-1 <loveayaw...@gmail.com> - -pkgbase=ndiswrapper -pkgname=(ndiswrapper-dkms ndiswrapper) -pkgver=1.61 -_extramodules=extramodules-ARCH -pkgrel=7 -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') -sha512sums=('85f550f2952137529e0e9855f4d94b7bbc64cbf8a84a31c1b75a4be09d97478a997e64fa6e1ff4e0d29a97a79fc3d4dab1ebdaa9edb3d627a215f47aa4d52823' - '9fce255fc02ddf6e939dc61a5e29c0ea5fa1a31ecc3c390081bc53aa1cd48eddf5db621f0a1cb909634529d4ccc2995eea8827be8eb5807b34dc17e15045ecf4' - '5350308406457658fb31c378d6f3dd2a34c7331aebe5bdc80744bf955f1144e88181441704ccc7532f55d6fbe8d410440fb8838c2955d688dde4b55f74fc6ba5' - 'de026a271cbfbefee99bc00a13c50be87294e5e2c5407d23cff6ce2d2a0c853542ce4f7e3e150741c7e8e32466fb1ab7cab266957da5bcca8376fb0f38e94482' - '52bd3d2025ffb8a3f6a4a1a1fee1b87d3811f30a210a54aaa7b37838eb256cd766bc1aeda24e4b4f4829992584931ecd97a042794c9b854bd1ebbf452dce2abf') - -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 -} - -build() { - cd ndiswrapper-$pkgver/ndiswrapper - make -C utils -} - -package_ndiswrapper-dkms() { - depends=('dkms') - provides=('NDISWRAPPER-MODULE') - conflicts=('NDISWRAPPER-MODULE') - - cd ndiswrapper-$pkgver/ndiswrapper - mkdir -p "$pkgdir"/usr/src - cp -RL ./driver "$pkgdir"/usr/src/ndiswrapper-$pkgver - cp "$srcdir"/dkms.conf "$pkgdir"/usr/src/ndiswrapper-$pkgver -} - -package_ndiswrapper() { - depends=('NDISWRAPPER-MODULE') - - cd ndiswrapper-$pkgver/ndiswrapper - make -C utils sbindir=/usr/bin usrsbindir=/usr/bin DESTDIR="$pkgdir" install -} Copied: ndiswrapper/repos/community-x86_64/PKGBUILD (from rev 510983, ndiswrapper/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2019-09-17 12:32:05 UTC (rev 510984) @@ -0,0 +1,53 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: maz-1 <loveayaw...@gmail.com> + +pkgbase=ndiswrapper +pkgname=(ndiswrapper-dkms ndiswrapper) +pkgver=1.61 +_extramodules=extramodules-ARCH +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' 'linux-5.0.patch' 'linux-5.3.patch') +sha512sums=('85f550f2952137529e0e9855f4d94b7bbc64cbf8a84a31c1b75a4be09d97478a997e64fa6e1ff4e0d29a97a79fc3d4dab1ebdaa9edb3d627a215f47aa4d52823' + '9fce255fc02ddf6e939dc61a5e29c0ea5fa1a31ecc3c390081bc53aa1cd48eddf5db621f0a1cb909634529d4ccc2995eea8827be8eb5807b34dc17e15045ecf4' + '5350308406457658fb31c378d6f3dd2a34c7331aebe5bdc80744bf955f1144e88181441704ccc7532f55d6fbe8d410440fb8838c2955d688dde4b55f74fc6ba5' + 'de026a271cbfbefee99bc00a13c50be87294e5e2c5407d23cff6ce2d2a0c853542ce4f7e3e150741c7e8e32466fb1ab7cab266957da5bcca8376fb0f38e94482' + '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 + 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() { + cd ndiswrapper-$pkgver/ndiswrapper + make -C utils +} + +package_ndiswrapper-dkms() { + depends=('dkms') + provides=('NDISWRAPPER-MODULE') + conflicts=('NDISWRAPPER-MODULE') + + cd ndiswrapper-$pkgver/ndiswrapper + mkdir -p "$pkgdir"/usr/src + cp -RL ./driver "$pkgdir"/usr/src/ndiswrapper-$pkgver + cp "$srcdir"/dkms.conf "$pkgdir"/usr/src/ndiswrapper-$pkgver +} + +package_ndiswrapper() { + depends=('NDISWRAPPER-MODULE') + + cd ndiswrapper-$pkgver/ndiswrapper + make -C utils sbindir=/usr/bin usrsbindir=/usr/bin DESTDIR="$pkgdir" install +} Deleted: dkms.conf =================================================================== --- dkms.conf 2019-09-17 12:31:55 UTC (rev 510983) +++ dkms.conf 2019-09-17 12:32:05 UTC (rev 510984) @@ -1,24 +0,0 @@ -## @file -# Linux DKMS config script for the VirtualBox guest kernel modules -# - -# -# Copyright (C) 2006-2010 Oracle Corporation -# -# This file is part of VirtualBox Open Source Edition (OSE), as -# available from http://www.virtualbox.org. This file is free software; -# you can redistribute it and/or modify it under the terms of the GNU -# General Public License (GPL) as published by the Free Software -# Foundation, in version 2 as it comes in the "COPYING" file of the -# VirtualBox OSE distribution. VirtualBox OSE is distributed in the -# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. -# - -PACKAGE_NAME="ndiswrapper" -PACKAGE_VERSION=1.60.20160717 -AUTOINSTALL=yes - -BUILT_MODULE_NAME[0]="ndiswrapper" -DEST_MODULE_LOCATION[0]="/kernel/net/ndiswrapper" -MAKE[0]="make KVERS_UNAME=${kernelver}" - Copied: ndiswrapper/repos/community-x86_64/dkms.conf (from rev 510983, ndiswrapper/trunk/dkms.conf) =================================================================== --- dkms.conf (rev 0) +++ dkms.conf 2019-09-17 12:32:05 UTC (rev 510984) @@ -0,0 +1,24 @@ +## @file +# Linux DKMS config script for the VirtualBox guest kernel modules +# + +# +# Copyright (C) 2006-2010 Oracle Corporation +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + +PACKAGE_NAME="ndiswrapper" +PACKAGE_VERSION=1.60.20160717 +AUTOINSTALL=yes + +BUILT_MODULE_NAME[0]="ndiswrapper" +DEST_MODULE_LOCATION[0]="/kernel/net/ndiswrapper" +MAKE[0]="make KVERS_UNAME=${kernelver}" + Deleted: linux-4.11.patch =================================================================== --- linux-4.11.patch 2019-09-17 12:31:55 UTC (rev 510983) +++ linux-4.11.patch 2019-09-17 12:32:05 UTC (rev 510984) @@ -1,55 +0,0 @@ -commit fa2aeeccd5366378ca2eb83c6daee64b511fe792 -Author: Felix Yan <felixonm...@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" Copied: ndiswrapper/repos/community-x86_64/linux-4.11.patch (from rev 510983, ndiswrapper/trunk/linux-4.11.patch) =================================================================== --- linux-4.11.patch (rev 0) +++ linux-4.11.patch 2019-09-17 12:32:05 UTC (rev 510984) @@ -0,0 +1,55 @@ +commit fa2aeeccd5366378ca2eb83c6daee64b511fe792 +Author: Felix Yan <felixonm...@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" Deleted: linux-4.13.patch =================================================================== --- linux-4.13.patch 2019-09-17 12:31:55 UTC (rev 510983) +++ linux-4.13.patch 2019-09-17 12:32:05 UTC (rev 510984) @@ -1,27 +0,0 @@ -commit eeac7ab831b3097005dadc64dd323f54ade30323 -Author: Felix Yan <felixonm...@archlinux.org> -Date: Mon Sep 11 12:52:36 2017 +0800 - - Add support for linux 4.13+ - -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) \ Copied: ndiswrapper/repos/community-x86_64/linux-4.13.patch (from rev 510983, ndiswrapper/trunk/linux-4.13.patch) =================================================================== --- linux-4.13.patch (rev 0) +++ linux-4.13.patch 2019-09-17 12:32:05 UTC (rev 510984) @@ -0,0 +1,27 @@ +commit eeac7ab831b3097005dadc64dd323f54ade30323 +Author: Felix Yan <felixonm...@archlinux.org> +Date: Mon Sep 11 12:52:36 2017 +0800 + + Add support for linux 4.13+ + +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) \ Deleted: linux-4.15.patch =================================================================== --- linux-4.15.patch 2019-09-17 12:31:55 UTC (rev 510983) +++ linux-4.15.patch 2019-09-17 12:32:05 UTC (rev 510984) @@ -1,199 +0,0 @@ -From: Seth Forshee <seth.fors...@canonical.com> -Date: Wed, 13 Dec 2017 15:53:31 -0600 -Subject: [PATCH] Build fixes for Linux 4.15 - -Fixes two build issues for 4.15: - - - init_timer() was eliminated in 4.15, and all callers were - converted to using timer_setup(). The callback prototype has - also changed to pass a timer_list argument instead of callback - data, and from_timer() must be used to get to the object in - which the timer is embedded. - - - usb_get_status() was changed to take an additional argument, - and usb_get_std_status() was added as a wrapper for callers to - use as a replacment. Call the wrapper in 4.15 and later. - -LP: #1737749 ---- - driver/ntoskernel.c | 19 ++++++++++++++++++- - driver/usb.c | 10 ++++++++-- - driver/wrapndis.c | 28 ++++++++++++++++++++++++++++ - 3 files changed, 54 insertions(+), 3 deletions(-) - -diff --git a/driver/ntoskernel.c b/driver/ntoskernel.c -index 4fe0dc1..156c688 100644 ---- a/driver/ntoskernel.c -+++ b/driver/ntoskernel.c -@@ -77,7 +77,6 @@ u64 wrap_ticks_to_boot; - #if defined(CONFIG_X86_64) - static struct timer_list shared_data_timer; - struct kuser_shared_data kuser_shared_data; --static void update_user_shared_data_proc(unsigned long data); - #endif - - WIN_SYMBOL_MAP("KeTickCount", &jiffies) -@@ -91,7 +90,11 @@ DEFINE_PER_CPU(struct irql_info, irql_info); - #endif - - #if defined(CONFIG_X86_64) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - static void update_user_shared_data_proc(unsigned long data) -+#else -+static void update_user_shared_data_proc(struct timer_list *t) -+#endif - { - /* timer is supposed to be scheduled every 10ms, but bigger - * intervals seem to work (tried up to 50ms) */ -@@ -407,9 +410,15 @@ static void initialize_object(struct dispatcher_header *dh, enum dh_type type, - InitializeListHead(&dh->wait_blocks); - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - static void timer_proc(unsigned long data) - { - struct wrap_timer *wrap_timer = (struct wrap_timer *)data; -+#else -+static void timer_proc(struct timer_list *t) -+{ -+ struct wrap_timer *wrap_timer = from_timer(wrap_timer, t, timer); -+#endif - struct nt_timer *nt_timer; - struct kdpc *kdpc; - -@@ -452,9 +461,13 @@ void wrap_init_timer(struct nt_timer *nt_timer, enum timer_type type, - return; - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - init_timer(&wrap_timer->timer); - wrap_timer->timer.data = (unsigned long)wrap_timer; - wrap_timer->timer.function = timer_proc; -+#else -+ timer_setup(&wrap_timer->timer, timer_proc, 0); -+#endif - wrap_timer->nt_timer = nt_timer; - #ifdef TIMER_DEBUG - wrap_timer->wrap_timer_magic = WRAP_TIMER_MAGIC; -@@ -2559,9 +2572,13 @@ int ntoskernel_init(void) - #if defined(CONFIG_X86_64) - memset(&kuser_shared_data, 0, sizeof(kuser_shared_data)); - *((ULONG64 *)&kuser_shared_data.system_time) = ticks_1601(); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - init_timer(&shared_data_timer); - shared_data_timer.function = update_user_shared_data_proc; - shared_data_timer.data = 0; -+#else -+ timer_setup(&shared_data_timer, update_user_shared_data_proc, 0); -+#endif - #endif - return 0; - } -diff --git a/driver/usb.c b/driver/usb.c -index 3e7021a..e55c2c6 100644 ---- a/driver/usb.c -+++ b/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)); - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) -+#define wrap_usb_get_status usb_get_status -+#else -+#define wrap_usb_get_status usb_get_std_status -+#endif -+ - static USBD_STATUS wrap_get_status_request(struct usb_device *udev, - struct irp *irp) - { -@@ -776,8 +782,8 @@ static USBD_STATUS wrap_get_status_request(struct usb_device *udev, - return NT_URB_STATUS(nt_urb); - } - assert(status_req->transfer_buffer_length == sizeof(u16)); -- ret = usb_get_status(udev, type, status_req->index, -- status_req->transfer_buffer); -+ ret = wrap_usb_get_status(udev, type, status_req->index, -+ status_req->transfer_buffer); - if (ret >= 0) { - assert(ret <= status_req->transfer_buffer_length); - 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 -@@ -1093,9 +1093,15 @@ send_assoc_event: - EXIT2(return); - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - static void iw_stats_timer_proc(unsigned long data) - { - struct ndis_device *wnd = (struct ndis_device *)data; -+#else -+static void iw_stats_timer_proc(struct timer_list *t) -+{ -+ struct ndis_device *wnd = from_timer(wnd, t, iw_stats_timer); -+#endif - - ENTER2("%d", wnd->iw_stats_interval); - if (wnd->iw_stats_interval > 0) { -@@ -1111,8 +1117,12 @@ static void add_iw_stats_timer(struct ndis_device *wnd) - return; - if (wnd->iw_stats_interval < 0) - wnd->iw_stats_interval *= -1; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - wnd->iw_stats_timer.data = (unsigned long)wnd; - wnd->iw_stats_timer.function = iw_stats_timer_proc; -+#else -+ timer_setup(&wnd->iw_stats_timer, iw_stats_timer_proc, 0); -+#endif - mod_timer(&wnd->iw_stats_timer, jiffies + wnd->iw_stats_interval); - } - -@@ -1124,9 +1134,15 @@ static void del_iw_stats_timer(struct ndis_device *wnd) - EXIT2(return); - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - static void hangcheck_proc(unsigned long data) - { - struct ndis_device *wnd = (struct ndis_device *)data; -+#else -+static void hangcheck_proc(struct timer_list *t) -+{ -+ struct ndis_device *wnd = from_timer(wnd, t, hangcheck_timer); -+#endif - - ENTER3("%d", wnd->hangcheck_interval); - if (wnd->hangcheck_interval > 0) { -@@ -1147,8 +1163,12 @@ void hangcheck_add(struct ndis_device *wnd) - wnd->hangcheck_interval = hangcheck_interval * HZ; - if (wnd->hangcheck_interval < 0) - wnd->hangcheck_interval *= -1; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - wnd->hangcheck_timer.data = (unsigned long)wnd; - wnd->hangcheck_timer.function = hangcheck_proc; -+#else -+ timer_setup(&wnd->hangcheck_timer, hangcheck_proc, 0); -+#endif - mod_timer(&wnd->hangcheck_timer, jiffies + wnd->hangcheck_interval); - EXIT2(return); - } -@@ -2138,9 +2158,17 @@ static NTSTATUS ndis_add_device(struct driver_object *drv_obj, - wnd->dma_map_count = 0; - wnd->dma_map_addr = NULL; - wnd->nick[0] = 0; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - init_timer(&wnd->hangcheck_timer); -+#else -+ timer_setup(&wnd->hangcheck_timer, NULL, 0); -+#endif - wnd->scan_timestamp = 0; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - init_timer(&wnd->iw_stats_timer); -+#else -+ timer_setup(&wnd->iw_stats_timer, NULL, 0); -+#endif - wnd->iw_stats_interval = 10 * HZ; - wnd->ndis_pending_work = 0; - memset(&wnd->essid, 0, sizeof(wnd->essid)); Copied: ndiswrapper/repos/community-x86_64/linux-4.15.patch (from rev 510983, ndiswrapper/trunk/linux-4.15.patch) =================================================================== --- linux-4.15.patch (rev 0) +++ linux-4.15.patch 2019-09-17 12:32:05 UTC (rev 510984) @@ -0,0 +1,199 @@ +From: Seth Forshee <seth.fors...@canonical.com> +Date: Wed, 13 Dec 2017 15:53:31 -0600 +Subject: [PATCH] Build fixes for Linux 4.15 + +Fixes two build issues for 4.15: + + - init_timer() was eliminated in 4.15, and all callers were + converted to using timer_setup(). The callback prototype has + also changed to pass a timer_list argument instead of callback + data, and from_timer() must be used to get to the object in + which the timer is embedded. + + - usb_get_status() was changed to take an additional argument, + and usb_get_std_status() was added as a wrapper for callers to + use as a replacment. Call the wrapper in 4.15 and later. + +LP: #1737749 +--- + driver/ntoskernel.c | 19 ++++++++++++++++++- + driver/usb.c | 10 ++++++++-- + driver/wrapndis.c | 28 ++++++++++++++++++++++++++++ + 3 files changed, 54 insertions(+), 3 deletions(-) + +diff --git a/driver/ntoskernel.c b/driver/ntoskernel.c +index 4fe0dc1..156c688 100644 +--- 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; + struct kuser_shared_data kuser_shared_data; +-static void update_user_shared_data_proc(unsigned long data); + #endif + + WIN_SYMBOL_MAP("KeTickCount", &jiffies) +@@ -91,7 +90,11 @@ DEFINE_PER_CPU(struct irql_info, irql_info); + #endif + + #if defined(CONFIG_X86_64) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static void update_user_shared_data_proc(unsigned long data) ++#else ++static void update_user_shared_data_proc(struct timer_list *t) ++#endif + { + /* timer is supposed to be scheduled every 10ms, but bigger + * intervals seem to work (tried up to 50ms) */ +@@ -407,9 +410,15 @@ static void initialize_object(struct dispatcher_header *dh, enum dh_type type, + InitializeListHead(&dh->wait_blocks); + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static void timer_proc(unsigned long data) + { + struct wrap_timer *wrap_timer = (struct wrap_timer *)data; ++#else ++static void timer_proc(struct timer_list *t) ++{ ++ struct wrap_timer *wrap_timer = from_timer(wrap_timer, t, timer); ++#endif + struct nt_timer *nt_timer; + struct kdpc *kdpc; + +@@ -452,9 +461,13 @@ void wrap_init_timer(struct nt_timer *nt_timer, enum timer_type type, + return; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + init_timer(&wrap_timer->timer); + wrap_timer->timer.data = (unsigned long)wrap_timer; + wrap_timer->timer.function = timer_proc; ++#else ++ timer_setup(&wrap_timer->timer, timer_proc, 0); ++#endif + wrap_timer->nt_timer = nt_timer; + #ifdef TIMER_DEBUG + wrap_timer->wrap_timer_magic = WRAP_TIMER_MAGIC; +@@ -2559,9 +2572,13 @@ int ntoskernel_init(void) + #if defined(CONFIG_X86_64) + memset(&kuser_shared_data, 0, sizeof(kuser_shared_data)); + *((ULONG64 *)&kuser_shared_data.system_time) = ticks_1601(); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + init_timer(&shared_data_timer); + shared_data_timer.function = update_user_shared_data_proc; + shared_data_timer.data = 0; ++#else ++ timer_setup(&shared_data_timer, update_user_shared_data_proc, 0); ++#endif + #endif + return 0; + } +diff --git a/driver/usb.c b/driver/usb.c +index 3e7021a..e55c2c6 100644 +--- 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)); + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) ++#define wrap_usb_get_status usb_get_status ++#else ++#define wrap_usb_get_status usb_get_std_status ++#endif ++ + static USBD_STATUS wrap_get_status_request(struct usb_device *udev, + struct irp *irp) + { +@@ -776,8 +782,8 @@ static USBD_STATUS wrap_get_status_request(struct usb_device *udev, + return NT_URB_STATUS(nt_urb); + } + assert(status_req->transfer_buffer_length == sizeof(u16)); +- ret = usb_get_status(udev, type, status_req->index, +- status_req->transfer_buffer); ++ ret = wrap_usb_get_status(udev, type, status_req->index, ++ status_req->transfer_buffer); + if (ret >= 0) { + assert(ret <= status_req->transfer_buffer_length); + status_req->transfer_buffer_length = ret; +diff --git a/driver/wrapndis.c b/driver/wrapndis.c +index 870e4c2..f653440 100644 +--- a/ndiswrapper/driver/wrapndis.c ++++ b/ndiswrapper/driver/wrapndis.c +@@ -1093,9 +1093,15 @@ send_assoc_event: + EXIT2(return); + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static void iw_stats_timer_proc(unsigned long data) + { + struct ndis_device *wnd = (struct ndis_device *)data; ++#else ++static void iw_stats_timer_proc(struct timer_list *t) ++{ ++ struct ndis_device *wnd = from_timer(wnd, t, iw_stats_timer); ++#endif + + ENTER2("%d", wnd->iw_stats_interval); + if (wnd->iw_stats_interval > 0) { +@@ -1111,8 +1117,12 @@ static void add_iw_stats_timer(struct ndis_device *wnd) + return; + if (wnd->iw_stats_interval < 0) + wnd->iw_stats_interval *= -1; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + wnd->iw_stats_timer.data = (unsigned long)wnd; + wnd->iw_stats_timer.function = iw_stats_timer_proc; ++#else ++ timer_setup(&wnd->iw_stats_timer, iw_stats_timer_proc, 0); ++#endif + mod_timer(&wnd->iw_stats_timer, jiffies + wnd->iw_stats_interval); + } + +@@ -1124,9 +1134,15 @@ static void del_iw_stats_timer(struct ndis_device *wnd) + EXIT2(return); + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static void hangcheck_proc(unsigned long data) + { + struct ndis_device *wnd = (struct ndis_device *)data; ++#else ++static void hangcheck_proc(struct timer_list *t) ++{ ++ struct ndis_device *wnd = from_timer(wnd, t, hangcheck_timer); ++#endif + + ENTER3("%d", wnd->hangcheck_interval); + if (wnd->hangcheck_interval > 0) { +@@ -1147,8 +1163,12 @@ void hangcheck_add(struct ndis_device *wnd) + wnd->hangcheck_interval = hangcheck_interval * HZ; + if (wnd->hangcheck_interval < 0) + wnd->hangcheck_interval *= -1; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + wnd->hangcheck_timer.data = (unsigned long)wnd; + wnd->hangcheck_timer.function = hangcheck_proc; ++#else ++ timer_setup(&wnd->hangcheck_timer, hangcheck_proc, 0); ++#endif + mod_timer(&wnd->hangcheck_timer, jiffies + wnd->hangcheck_interval); + EXIT2(return); + } +@@ -2138,9 +2158,17 @@ static NTSTATUS ndis_add_device(struct driver_object *drv_obj, + wnd->dma_map_count = 0; + wnd->dma_map_addr = NULL; + wnd->nick[0] = 0; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + init_timer(&wnd->hangcheck_timer); ++#else ++ timer_setup(&wnd->hangcheck_timer, NULL, 0); ++#endif + wnd->scan_timestamp = 0; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + init_timer(&wnd->iw_stats_timer); ++#else ++ timer_setup(&wnd->iw_stats_timer, NULL, 0); ++#endif + wnd->iw_stats_interval = 10 * HZ; + wnd->ndis_pending_work = 0; + memset(&wnd->essid, 0, sizeof(wnd->essid)); Copied: ndiswrapper/repos/community-x86_64/linux-5.0.patch (from rev 510983, ndiswrapper/trunk/linux-5.0.patch) =================================================================== --- linux-5.0.patch (rev 0) +++ linux-5.0.patch 2019-09-17 12:32:05 UTC (rev 510984) @@ -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); + Copied: ndiswrapper/repos/community-x86_64/linux-5.3.patch (from rev 510983, ndiswrapper/trunk/linux-5.3.patch) =================================================================== --- linux-5.3.patch (rev 0) +++ linux-5.3.patch 2019-09-17 12:32:05 UTC (rev 510984) @@ -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); + }