diff options
author | Christoph Mende <angelos@gentoo.org> | 2015-09-19 19:59:35 +0200 |
---|---|---|
committer | Christoph Mende <angelos@gentoo.org> | 2015-09-19 19:59:51 +0200 |
commit | 79959bdd0b115e4f2d8bec1450505a8365ec0d8a (patch) | |
tree | 8a9d3217ff337d066bccbb77b442e9d1e982863b | |
parent | x11-apps/intel-gpu-tools: Version bump (diff) | |
download | gentoo-79959bdd0b115e4f2d8bec1450505a8365ec0d8a.tar.gz gentoo-79959bdd0b115e4f2d8bec1450505a8365ec0d8a.tar.bz2 gentoo-79959bdd0b115e4f2d8bec1450505a8365ec0d8a.zip |
net-wireless/ndiswrapper: add patches for linux 4.0 and 4.2 from debian
Package-Manager: portage-2.2.20.1
-rw-r--r-- | net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.0.patch | 41 | ||||
-rw-r--r-- | net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.2.patch | 22 | ||||
-rw-r--r-- | net-wireless/ndiswrapper/ndiswrapper-1.59.ebuild | 4 |
3 files changed, 66 insertions, 1 deletions
diff --git a/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.0.patch b/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.0.patch new file mode 100644 index 000000000000..97ef75d3ed0d --- /dev/null +++ b/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.0.patch @@ -0,0 +1,41 @@ +From: Julian Andres Klode <jak@debian.org> +Date: Tue, 12 May 2015 17:11:11 +0200 +Subject: Support kernel 4.0 + +--- + driver/ndis.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/driver/ndis.c b/driver/ndis.c +index 9ace34b..fafd2e7 100644 +--- a/driver/ndis.c ++++ b/driver/ndis.c +@@ -25,6 +25,10 @@ + #define MAX_ALLOCATED_NDIS_PACKETS TX_RING_SIZE + #define MAX_ALLOCATED_NDIS_BUFFERS TX_RING_SIZE + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0) ++#define strncasecmp strnicmp ++#endif ++ + static struct work_struct ndis_work; + static struct nt_list ndis_work_list; + static spinlock_t ndis_work_list_lock; +@@ -438,7 +442,7 @@ static int read_setting(struct nt_list *setting_list, char *keyname, int length, + struct wrap_device_setting *setting; + mutex_lock(&loader_mutex); + nt_list_for_each_entry(setting, setting_list, list) { +- if (strnicmp(keyname, setting->name, length) == 0) { ++ if (strncasecmp(keyname, setting->name, length) == 0) { + TRACE2("setting %s='%s'", keyname, setting->value); + mutex_unlock(&loader_mutex); + *param = ndis_encode_setting(setting, type); +@@ -502,7 +506,7 @@ wstdcall void WIN_FUNC(NdisWriteConfiguration,4) + + mutex_lock(&loader_mutex); + nt_list_for_each_entry(setting, &nmb->wnd->wd->settings, list) { +- if (strnicmp(keyname, setting->name, ansi.length) == 0) { ++ if (strncasecmp(keyname, setting->name, ansi.length) == 0) { + mutex_unlock(&loader_mutex); + if (ndis_decode_setting(setting, param)) + *status = NDIS_STATUS_FAILURE; diff --git a/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.2.patch b/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.2.patch new file mode 100644 index 000000000000..f29f9deba333 --- /dev/null +++ b/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.2.patch @@ -0,0 +1,22 @@ +From: Tim Gardner <tim.gardner@canonical.com> +Date: Thu, 6 Aug 2015 09:13:30 -0600 +Subject: Support kernel 4.2 + +--- + driver/ntoskernel.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/driver/ntoskernel.h b/driver/ntoskernel.h +index 4b8166c..6b49594 100644 +--- a/driver/ntoskernel.h ++++ b/driver/ntoskernel.h +@@ -46,6 +46,9 @@ + #include <linux/percpu.h> + #include <linux/kthread.h> + #include <linux/workqueue.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) ++#include <linux/vmalloc.h> ++#endif + + #if !defined(CONFIG_X86) && !defined(CONFIG_X86_64) + #error "this module is for x86 or x86_64 architectures only" diff --git a/net-wireless/ndiswrapper/ndiswrapper-1.59.ebuild b/net-wireless/ndiswrapper/ndiswrapper-1.59.ebuild index 955d76b8ce7e..51c47f09efb0 100644 --- a/net-wireless/ndiswrapper/ndiswrapper-1.59.ebuild +++ b/net-wireless/ndiswrapper/ndiswrapper-1.59.ebuild @@ -18,7 +18,9 @@ RDEPEND="${DEPEND} net-wireless/wireless-tools" PATCHES=( "${FILESDIR}"/${P}-cflags.patch - "${FILESDIR}"/${P}-3.14.patch ) + "${FILESDIR}"/${P}-3.14.patch + "${FILESDIR}"/${P}-4.0.patch + "${FILESDIR}"/${P}-4.2.patch ) MODULE_NAMES="ndiswrapper(misc:${S}/driver)" BUILD_TARGETS="all" MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper") |