summaryrefslogtreecommitdiff
path: root/net-wireless/ndiswrapper
diff options
context:
space:
mode:
Diffstat (limited to 'net-wireless/ndiswrapper')
-rw-r--r--net-wireless/ndiswrapper/Manifest3
-rw-r--r--net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.15.patch199
-rw-r--r--net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild5
3 files changed, 204 insertions, 3 deletions
diff --git a/net-wireless/ndiswrapper/Manifest b/net-wireless/ndiswrapper/Manifest
index b9c7ef791a75..95df8bf150b9 100644
--- a/net-wireless/ndiswrapper/Manifest
+++ b/net-wireless/ndiswrapper/Manifest
@@ -1,6 +1,7 @@
AUX ndiswrapper-1.59-cflags.patch 357 BLAKE2B db91c0a817db2dd2fc019f1ae41e7f12a77a3a71a48d6cef3c80227ca68f14bfcef65a9feb516266a0cf1cee8b80f271eb8210866c0634abff3b6a795d830cc8 SHA512 8c65a5af71bf3035e2d784b29ad45dc48bd70b155d988c2e6d511eb03d9a319d355d67f74e3270816e943abe051e442efe891de1d649e871b7e3b05690c71a9d
AUX ndiswrapper-1.61-kernel-4.11.patch 1849 BLAKE2B 8ed5d1dfbc5b924e5a01e1c43c508a5c189a7d1cfd18117f2e90a84af6f63a5e04a7e881db2869dda1e53514f982cc4369dbd0479284c798748940bc04a1d077 SHA512 04c60101754a3286f2454cc3b39455186a211b52e09eef21d094b5adea1c176631246a71e0ea26b67e76a6733fe4048cf545ace28ab505acc6df9881aca138be
AUX ndiswrapper-1.61-kernel-4.13.patch 987 BLAKE2B fe331b86f3967fe3b4f8118c2492825737468d12efb8d170cc8843e266acdc82ebbf303f1358eb79363ae1b3c5aa478451cc82e5691acd267ab3cb7cd89849cc SHA512 df43f17f63b7842b9a22f285b5fdf7e28ef20e975cd86cbdaaff7426e7dc1b413b978c6e85ac76420131fa7139542ae499becf7276b0d3e17f2c45df7ba1d5c7
+AUX ndiswrapper-1.61-kernel-4.15.patch 6676 BLAKE2B 536a220f7cf01aac8895e2c76ba5634f5411b2fa8ab8180f52c11c6576823e29cb9ef0bbffa8338de3768e1583ca764a72854f89a7e8df304107371dda6c02b7 SHA512 52bd3d2025ffb8a3f6a4a1a1fee1b87d3811f30a210a54aaa7b37838eb256cd766bc1aeda24e4b4f4829992584931ecd97a042794c9b854bd1ebbf452dce2abf
DIST ndiswrapper-1.61.tar.gz 202240 BLAKE2B 1b9b60bdd389bb04e56b4b2986503063c4193d78fb06e34f6c91f67d214b112f498cc8d0fdd08c372da73bde8cb9d10c893b05020d81bf35e144e64c81a24797 SHA512 67a50071a2e04113b91259e0d5236b4bf02b46a0d60ecae779c34e047f678c70b18e3191bad1435525c8499e554bd26794a03a79a71e1e603987432f4c590b43
-EBUILD ndiswrapper-1.61.ebuild 2672 BLAKE2B 4a7dfd741b06091632dc189e9261744418b7990c74ab56631cd7e805d8ff44d8350aa00e85e9e3f3d119ea12c10d52af38bb456c3c36ea0ba4592ae710162f6b SHA512 99155f057a18fdb9f7fc46bd5b69f42d190d86dcaa8929e243dcb813dee80766e972699cd2a7a5116824f57a23b884f83e0390f66ef6fe427029a6224261e5a7
+EBUILD ndiswrapper-1.61.ebuild 2713 BLAKE2B ffbebde3e62f5d4591287362f2e2439df23b40b4e833a0a7ac8dc5121c8ef00502390f235cd81a227b2aa69d80c77dfb6107e927eb725ca3e3eb35e00687a65b SHA512 92e251bece459d07ae85482814214c1d0ed70b2e3ec7955cc2acc821052f0a2ffea7b45f57a4e5f821d702b09dda5376fcbab87a455d31790139b917e3d78058
MISC metadata.xml 443 BLAKE2B 68db299fd4f25c833c09390c603fadb436c92a2149bfa4e96adb59464cb531b8213b5f755de321a3f0fd3242270e7d4b5e2f0f6b35cdc17d4abe478e91ab6aaf SHA512 5ca78950fbcacddec5ac12085ccc1314e0f55f2cf40d78374049c6dc5c7de39f4835eb586aa851373d80d3800c8c54079ef078bf187e85892ef23b0cd6d1bbd0
diff --git a/net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.15.patch b/net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.15.patch
new file mode 100644
index 000000000000..8e87ece03642
--- /dev/null
+++ b/net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.15.patch
@@ -0,0 +1,199 @@
+From: Seth Forshee <seth.forshee@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));
diff --git a/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild b/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild
index bcb493f1a556..b815a61fcb19 100644
--- a/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild
+++ b/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit linux-mod readme.gentoo-r1 toolchain-funcs
DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
@@ -30,6 +30,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.59-cflags.patch
"${FILESDIR}"/${PN}-1.61-kernel-4.11.patch
"${FILESDIR}"/${PN}-1.61-kernel-4.13.patch
+ "${FILESDIR}"/${PN}-1.61-kernel-4.15.patch
)
MODULE_NAMES="ndiswrapper(misc:${S}/driver)"