* [gentoo-commits] repo/gentoo:master commit in: net-wireless/ndiswrapper/files/, net-wireless/ndiswrapper/
@ 2015-09-19 17:59 Christoph Mende
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Mende @ 2015-09-19 17:59 UTC (permalink / raw
To: gentoo-commits
commit: 79959bdd0b115e4f2d8bec1450505a8365ec0d8a
Author: Christoph Mende <angelos <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 19 17:59:35 2015 +0000
Commit: Christoph Mende <angelos <AT> gentoo <DOT> org>
CommitDate: Sat Sep 19 17:59:51 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79959bdd
net-wireless/ndiswrapper: add patches for linux 4.0 and 4.2 from debian
Package-Manager: portage-2.2.20.1
.../ndiswrapper/files/ndiswrapper-1.59-4.0.patch | 41 ++++++++++++++++++++++
.../ndiswrapper/files/ndiswrapper-1.59-4.2.patch | 22 ++++++++++++
net-wireless/ndiswrapper/ndiswrapper-1.59.ebuild | 4 ++-
3 files changed, 66 insertions(+), 1 deletion(-)
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 0000000..97ef75d
--- /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 0000000..f29f9de
--- /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 955d76b..51c47f0 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")
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/ndiswrapper/files/, net-wireless/ndiswrapper/
@ 2017-06-06 12:33 Pacho Ramos
0 siblings, 0 replies; 4+ messages in thread
From: Pacho Ramos @ 2017-06-06 12:33 UTC (permalink / raw
To: gentoo-commits
commit: 1f2270c561cb13b8cf446b976f1f8ce5c0299d3c
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 6 12:31:59 2017 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Tue Jun 6 12:33:51 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f2270c5
net-wireless/ndiswrapper: Version bump
Package-Manager: Portage-2.3.6, Repoman-2.3.2
net-wireless/ndiswrapper/Manifest | 1 +
.../files/ndiswrapper-1.61-kernel-4.11.patch | 55 +++++++++++
net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild | 110 +++++++++++++++++++++
3 files changed, 166 insertions(+)
diff --git a/net-wireless/ndiswrapper/Manifest b/net-wireless/ndiswrapper/Manifest
index d74f905ae7c..6cbfeb5beec 100644
--- a/net-wireless/ndiswrapper/Manifest
+++ b/net-wireless/ndiswrapper/Manifest
@@ -1 +1,2 @@
DIST ndiswrapper-1.59.tar.gz 201257 SHA256 66a5d3ffb3fc8a63d87e381bbc627511597dfd25c4c37dda3b953ccf98f5d4bc SHA512 dd1d486b6178185e813217e4fff38f6ea6b21f8a3544c5cc25be9edbca60f34b21656e5d46b9d02cb1e43c8cc82856283aaa428964b8f85cb07146a41e40e44d WHIRLPOOL ae4dca59911625146de4e2da02b72bcf1b695e63c8d0d900a91ec9b0c5b7452c9ba0de37ad95129d330d96be16d9c4b488b5d40936f51af14dca2597281b7b84
+DIST ndiswrapper-1.61.tar.gz 202240 SHA256 2ac1847c24cbfa4f48a800b04c9721219614f1663a4ac94af3c7939b45c47584 SHA512 67a50071a2e04113b91259e0d5236b4bf02b46a0d60ecae779c34e047f678c70b18e3191bad1435525c8499e554bd26794a03a79a71e1e603987432f4c590b43 WHIRLPOOL 39b2cae9eab28147a5e7103f1b4b2fa44618afe4d1bbdd6f8108180b867ec319f4f2a3f4dc7b1e141f51e39765dccb9c3476537ed4158d38f7ff9eda3ffd2bea
diff --git a/net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.11.patch b/net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.11.patch
new file mode 100644
index 00000000000..f39c7bde4d2
--- /dev/null
+++ b/net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.11.patch
@@ -0,0 +1,55 @@
+commit fa2aeeccd5366378ca2eb83c6daee64b511fe792
+Author: Felix Yan <felixonmars@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/driver/ndis.c
++++ b/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/driver/ntoskernel.h
++++ b/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"
diff --git a/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild b/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild
new file mode 100644
index 00000000000..19f6f4ad1e8
--- /dev/null
+++ b/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit linux-mod toolchain-funcs
+
+DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
+HOMEPAGE="http://ndiswrapper.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/stable/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug usb"
+
+DEPEND="sys-apps/pciutils"
+RDEPEND="${DEPEND}
+ net-wireless/wireless-tools
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.59-cflags.patch
+ "${FILESDIR}"/${PN}-1.61-kernel-4.11.patch
+)
+
+MODULE_NAMES="ndiswrapper(misc:${S}/driver)"
+BUILD_TARGETS="all"
+MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")
+
+pkg_pretend() {
+ CONFIG_CHECK="~WEXT_PRIV"
+ use usb && CONFIG_CHECK="${CONFIG_CHECK} ~USB"
+ ERROR_USB="You need to enable USB support in your kernel to use usb support in ndiswrapper."
+ ERROR_WEXT_PRIV="Your kernel does not support WEXT_PRIV. To enable it you need to enable a wireless driver that enables it, for example PRISM54 or IPW2200"
+ linux-mod_pkg_setup
+}
+
+src_compile() {
+ local params
+
+ # Enable verbose debugging information
+ if use debug; then
+ params="DEBUG=3"
+ use usb && params="${params} USB_DEBUG=1"
+ fi
+
+ cd utils
+ emake CC=$(tc-getCC)
+
+ use usb || params="${params} DISABLE_USB=1"
+
+ BUILD_PARAMS="KSRC=${KV_DIR} KVERS=${KV_FULL} KBUILD='${KV_OUT_DIR}' ${params}"
+ linux-mod_src_compile
+}
+
+src_install() {
+ dodoc AUTHORS ChangeLog INSTALL README
+ doman ndiswrapper.8
+
+ keepdir /etc/ndiswrapper
+
+ linux-mod_src_install
+
+ cd utils
+ emake DESTDIR="${D}" install
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ echo
+ elog "NDISwrapper requires .inf and .sys files from a Windows(tm) driver"
+ elog "to function. Download these to /root for example, then"
+ elog "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
+ elog "They will be copied to /etc/ndiswrapper/."
+ elog "Once done, please run 'update-modules'."
+ echo
+
+ elog "Please look at ${HOMEPAGE}"
+ elog "for the FAQ, HowTos, tips, configuration, and installation"
+ elog "information."
+ echo
+
+ for i in $(lspci -n | egrep '(0280|0200):' | cut -d' ' -f1)
+ do
+ i_desc=$(lspci -nn | grep "$i" | awk -F': ' '{print $2}' | awk -F'[' '{print $1}')
+ if [[ -n "${i_desc}" ]] ; then
+ elog "Possible hardware: ${i_desc}"
+ fi
+ done
+
+ echo
+ elog "NDISwrapper devs need support (_hardware_, cash)."
+ elog "Don't hesitate if you can help."
+ elog "See ${HOMEPAGE} for details."
+ echo
+
+ if [[ ${ROOT} == "/" ]]; then
+
+ einfo "Attempting to automatically reinstall any Windows drivers"
+ einfo "you might already have."
+ echo
+
+ local driver
+ for driver in $(ls /etc/ndiswrapper) ; do
+ einfo "Driver: ${driver}"
+ mv "/etc/ndiswrapper/${driver}" "${T}"
+ ndiswrapper -i "${T}/${driver}/${driver}.inf"
+ done
+ fi
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/ndiswrapper/files/, net-wireless/ndiswrapper/
@ 2017-06-09 12:51 Michael Palimaka
0 siblings, 0 replies; 4+ messages in thread
From: Michael Palimaka @ 2017-06-09 12:51 UTC (permalink / raw
To: gentoo-commits
commit: 5d1dc93e3ebc3232414c9601811718b12f6203de
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 9 12:51:02 2017 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Fri Jun 9 12:51:43 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d1dc93e
net-wireless/ndiswrapper: remove 1.59
Package-Manager: Portage-2.3.5, Repoman-2.3.2
net-wireless/ndiswrapper/Manifest | 1 -
.../ndiswrapper/files/ndiswrapper-1.59-3.14.patch | 48 ---------
.../ndiswrapper/files/ndiswrapper-1.59-4.0.patch | 41 --------
.../ndiswrapper/files/ndiswrapper-1.59-4.2.patch | 22 -----
net-wireless/ndiswrapper/ndiswrapper-1.59.ebuild | 108 ---------------------
5 files changed, 220 deletions(-)
diff --git a/net-wireless/ndiswrapper/Manifest b/net-wireless/ndiswrapper/Manifest
index 6cbfeb5beec..2c5cd23198a 100644
--- a/net-wireless/ndiswrapper/Manifest
+++ b/net-wireless/ndiswrapper/Manifest
@@ -1,2 +1 @@
-DIST ndiswrapper-1.59.tar.gz 201257 SHA256 66a5d3ffb3fc8a63d87e381bbc627511597dfd25c4c37dda3b953ccf98f5d4bc SHA512 dd1d486b6178185e813217e4fff38f6ea6b21f8a3544c5cc25be9edbca60f34b21656e5d46b9d02cb1e43c8cc82856283aaa428964b8f85cb07146a41e40e44d WHIRLPOOL ae4dca59911625146de4e2da02b72bcf1b695e63c8d0d900a91ec9b0c5b7452c9ba0de37ad95129d330d96be16d9c4b488b5d40936f51af14dca2597281b7b84
DIST ndiswrapper-1.61.tar.gz 202240 SHA256 2ac1847c24cbfa4f48a800b04c9721219614f1663a4ac94af3c7939b45c47584 SHA512 67a50071a2e04113b91259e0d5236b4bf02b46a0d60ecae779c34e047f678c70b18e3191bad1435525c8499e554bd26794a03a79a71e1e603987432f4c590b43 WHIRLPOOL 39b2cae9eab28147a5e7103f1b4b2fa44618afe4d1bbdd6f8108180b867ec319f4f2a3f4dc7b1e141f51e39765dccb9c3476537ed4158d38f7ff9eda3ffd2bea
diff --git a/net-wireless/ndiswrapper/files/ndiswrapper-1.59-3.14.patch b/net-wireless/ndiswrapper/files/ndiswrapper-1.59-3.14.patch
deleted file mode 100644
index 9a696f8817f..00000000000
--- a/net-wireless/ndiswrapper/files/ndiswrapper-1.59-3.14.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Index: driver/crt.c
-===================================================================
---- driver/crt.c (revision 3197)
-+++ driver/crt.c (working copy)
-@@ -467,7 +467,7 @@
- noregparm void WIN_FUNC(_win_srand,1)
- (UINT seed)
- {
-- net_srandom(seed);
-+ prandom_seed(seed);
- }
-
- noregparm int WIN_FUNC(rand,0)
-Index: driver/ntoskernel.h
-===================================================================
---- driver/ntoskernel.h (revision 3197)
-+++ driver/ntoskernel.h (working copy)
-@@ -347,7 +347,7 @@
- #define netdev_notifier_info_to_dev(x) ((struct net_device *)(x))
- #endif
-
--#ifdef INIT_COMPLETION
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
- static inline void reinit_completion(struct completion *x)
- {
- INIT_COMPLETION(*x);
-@@ -354,6 +354,10 @@
- }
- #endif
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
-+#define prandom_seed(seed) net_srandom(seed)
-+#endif
-+
- /* TICK is 100ns */
- #define TICKSPERSEC 10000000
- #define TICKSPERMSEC 10000
-@@ -797,9 +801,8 @@
- #define nt_spin_unlock_irqrestore(lock, flags) \
- do { \
- nt_spin_unlock(lock); \
-- preempt_enable_no_resched(); \
-+ preempt_enable(); \
- local_irq_restore(flags); \
-- preempt_check_resched(); \
- } while (0)
-
- static inline ULONG SPAN_PAGES(void *ptr, SIZE_T length)
diff --git a/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.0.patch b/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.0.patch
deleted file mode 100644
index 97ef75d3ed0..00000000000
--- a/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.0.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-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
deleted file mode 100644
index f29f9deba33..00000000000
--- a/net-wireless/ndiswrapper/files/ndiswrapper-1.59-4.2.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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
deleted file mode 100644
index 9e2146a55f3..00000000000
--- a/net-wireless/ndiswrapper/ndiswrapper-1.59.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit base linux-mod toolchain-funcs
-
-DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
-HOMEPAGE="http://ndiswrapper.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/stable/${P}.tar.gz"
-
-LICENSE="GPL-2"
-KEYWORDS="amd64 x86"
-IUSE="debug usb"
-
-DEPEND="sys-apps/pciutils"
-RDEPEND="${DEPEND}
- net-wireless/wireless-tools"
-
-PATCHES=( "${FILESDIR}"/${P}-cflags.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")
-
-pkg_pretend() {
- CONFIG_CHECK="~WEXT_PRIV"
- use usb && CONFIG_CHECK="${CONFIG_CHECK} ~USB"
- ERROR_USB="You need to enable USB support in your kernel to use usb support in ndiswrapper."
- ERROR_WEXT_PRIV="Your kernel does not support WEXT_PRIV. To enable it you need to enable a wireless driver that enables it, for example PRISM54 or IPW2200"
- linux-mod_pkg_setup
-}
-
-src_compile() {
- local params
-
- # Enable verbose debugging information
- if use debug; then
- params="DEBUG=3"
- use usb && params="${params} USB_DEBUG=1"
- fi
-
- cd utils
- emake CC=$(tc-getCC)
-
- use usb || params="${params} DISABLE_USB=1"
-
- BUILD_PARAMS="KSRC=${KV_DIR} KVERS=${KV_FULL} KBUILD='${KV_OUT_DIR}' ${params}"
- linux-mod_src_compile
-}
-
-src_install() {
- dodoc AUTHORS ChangeLog INSTALL README
- doman ndiswrapper.8
-
- keepdir /etc/ndiswrapper
-
- linux-mod_src_install
-
- cd utils
- emake DESTDIR="${D}" install
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- echo
- elog "NDISwrapper requires .inf and .sys files from a Windows(tm) driver"
- elog "to function. Download these to /root for example, then"
- elog "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
- elog "They will be copied to /etc/ndiswrapper/."
- elog "Once done, please run 'update-modules'."
- echo
-
- elog "Please look at ${HOMEPAGE}"
- elog "for the FAQ, HowTos, tips, configuration, and installation"
- elog "information."
- echo
-
- for i in $(lspci -n | egrep '(0280|0200):' | cut -d' ' -f1)
- do
- i_desc=$(lspci -nn | grep "$i" | awk -F': ' '{print $2}' | awk -F'[' '{print $1}')
- if [[ -n "${i_desc}" ]] ; then
- elog "Possible hardware: ${i_desc}"
- fi
- done
-
- echo
- elog "NDISwrapper devs need support (_hardware_, cash)."
- elog "Don't hesitate if you can help."
- elog "See ${HOMEPAGE} for details."
- echo
-
- if [[ ${ROOT} == "/" ]]; then
-
- einfo "Attempting to automatically reinstall any Windows drivers"
- einfo "you might already have."
- echo
-
- local driver
- for driver in $(ls /etc/ndiswrapper) ; do
- einfo "Driver: ${driver}"
- mv "/etc/ndiswrapper/${driver}" "${T}"
- ndiswrapper -i "${T}/${driver}/${driver}.inf"
- done
- fi
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/ndiswrapper/files/, net-wireless/ndiswrapper/
@ 2017-09-12 13:43 Pacho Ramos
0 siblings, 0 replies; 4+ messages in thread
From: Pacho Ramos @ 2017-09-12 13:43 UTC (permalink / raw
To: gentoo-commits
commit: 01f1d29787bd1ba2900f7aa00e5424ebc45a1e05
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 12 13:43:42 2017 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Tue Sep 12 13:43:42 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01f1d297
net-wireless/ndiswrapper: Use readme.gentoo eclass and support kernel 4.13 (#630570 by Toralf Forster)
Package-Manager: Portage-2.3.8, Repoman-2.3.3
.../files/ndiswrapper-1.61-kernel-4.13.patch | 27 +++++++++++++++++
net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild | 34 +++++++++-------------
2 files changed, 41 insertions(+), 20 deletions(-)
diff --git a/net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.13.patch b/net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.13.patch
new file mode 100644
index 00000000000..052c4d9b9bf
--- /dev/null
+++ b/net-wireless/ndiswrapper/files/ndiswrapper-1.61-kernel-4.13.patch
@@ -0,0 +1,27 @@
+commit eeac7ab831b3097005dadc64dd323f54ade30323
+Author: Felix Yan <felixonmars@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/driver/ntoskernel.h
++++ b/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) \
diff --git a/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild b/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild
index 945cacb519c..bcb493f1a55 100644
--- a/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild
+++ b/net-wireless/ndiswrapper/ndiswrapper-1.61.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit linux-mod toolchain-funcs
+inherit linux-mod readme.gentoo-r1 toolchain-funcs
DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
HOMEPAGE="http://ndiswrapper.sourceforge.net/"
@@ -17,9 +17,19 @@ RDEPEND="${DEPEND}
net-wireless/wireless-tools
"
+DOC_CONTENTS="
+ NDISwrapper requires .inf and .sys files from a Windows(tm) driver
+ to function. Download these to /root for example, then
+ run 'ndiswrapper -i /root/foo.inf'. After that you can delete them.
+ They will be copied to /etc/ndiswrapper/. Once done, please run 'update-modules'.
+ Please look at http://ndiswrapper.sourceforge.net/for the FAQ, HowTos, tips,
+ configuration, and installation information.
+"
+
PATCHES=(
"${FILESDIR}"/${PN}-1.59-cflags.patch
"${FILESDIR}"/${PN}-1.61-kernel-4.11.patch
+ "${FILESDIR}"/${PN}-1.61-kernel-4.13.patch
)
MODULE_NAMES="ndiswrapper(misc:${S}/driver)"
@@ -53,7 +63,7 @@ src_compile() {
}
src_install() {
- dodoc AUTHORS ChangeLog INSTALL README
+ einstalldocs
doman ndiswrapper.8
keepdir /etc/ndiswrapper
@@ -62,23 +72,13 @@ src_install() {
cd utils
emake DESTDIR="${D}" install
+ readme.gentoo_create_doc
}
pkg_postinst() {
linux-mod_pkg_postinst
- echo
- elog "NDISwrapper requires .inf and .sys files from a Windows(tm) driver"
- elog "to function. Download these to /root for example, then"
- elog "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
- elog "They will be copied to /etc/ndiswrapper/."
- elog "Once done, please run 'update-modules'."
- echo
-
- elog "Please look at ${HOMEPAGE}"
- elog "for the FAQ, HowTos, tips, configuration, and installation"
- elog "information."
- echo
+ readme.gentoo_print_elog
for i in $(lspci -n | egrep '(0280|0200):' | cut -d' ' -f1)
do
@@ -88,12 +88,6 @@ pkg_postinst() {
fi
done
- echo
- elog "NDISwrapper devs need support (_hardware_, cash)."
- elog "Don't hesitate if you can help."
- elog "See ${HOMEPAGE} for details."
- echo
-
if [[ ${ROOT} == "/" ]]; then
einfo "Attempting to automatically reinstall any Windows drivers"
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-12 13:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-12 13:43 [gentoo-commits] repo/gentoo:master commit in: net-wireless/ndiswrapper/files/, net-wireless/ndiswrapper/ Pacho Ramos
-- strict thread matches above, loose matches on Subject: below --
2017-06-09 12:51 Michael Palimaka
2017-06-06 12:33 Pacho Ramos
2015-09-19 17:59 Christoph Mende
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox