diff options
author | Tom Wijsman <tomwij@gentoo.org> | 2013-10-16 01:07:10 +0000 |
---|---|---|
committer | Tom Wijsman <tomwij@gentoo.org> | 2013-10-16 01:07:10 +0000 |
commit | 9351f8e2a9b056e0fee952c030f253cd3216acd2 (patch) | |
tree | a2a2d00e59b670d1a7a5f27320d04271c24d3b63 /net-wireless/broadcom-sta | |
parent | Stable channel bump. (diff) | |
download | gentoo-2-9351f8e2a9b056e0fee952c030f253cd3216acd2.tar.gz gentoo-2-9351f8e2a9b056e0fee952c030f253cd3216acd2.tar.bz2 gentoo-2-9351f8e2a9b056e0fee952c030f253cd3216acd2.zip |
Version bump to 6.30.223.141; proxied commit for M. B. (tomboy64), fixes bug #484676.
(Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)
Diffstat (limited to 'net-wireless/broadcom-sta')
7 files changed, 255 insertions, 1 deletions
diff --git a/net-wireless/broadcom-sta/ChangeLog b/net-wireless/broadcom-sta/ChangeLog index 259047d8368c..3908fd5ed55e 100644 --- a/net-wireless/broadcom-sta/ChangeLog +++ b/net-wireless/broadcom-sta/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for net-wireless/broadcom-sta # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/broadcom-sta/ChangeLog,v 1.54 2013/09/16 11:55:12 pinkbyte Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/broadcom-sta/ChangeLog,v 1.55 2013/10/16 01:07:10 tomwij Exp $ + +*broadcom-sta-6.30.223.141 (16 Oct 2013) + + 16 Oct 2013; Tom Wijsman <TomWij@gentoo.org> + +broadcom-sta-6.30.223.141.ebuild, + +files/broadcom-sta-6.30.223.141-eth-to-wlan.patch, + +files/broadcom-sta-6.30.223.141-gcc.patch, + +files/broadcom-sta-6.30.223.141-license.patch, + +files/broadcom-sta-6.30.223.141-linux-recent.patch, + +files/broadcom-sta-6.30.223.141-makefile.patch: + Version bump to 6.30.223.141; proxied commit for M. B. (tomboy64), fixes bug + #484676. 16 Sep 2013; Sergey Popov <pinkbyte@gentoo.org> -broadcom-sta-5.100.82.112-r2.ebuild, diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild new file mode 100644 index 000000000000..147682380341 --- /dev/null +++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild,v 1.1 2013/10/16 01:07:10 tomwij Exp $ + +EAPI="5" +inherit eutils linux-info linux-mod + +DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver" +HOMEPAGE="http://www.broadcom.com/support/802.11/linux_sta.php" +SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35" +SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz ) + amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )" + +LICENSE="Broadcom" +KEYWORDS="-* ~amd64 ~x86" + +RESTRICT="mirror" + +DEPEND="virtual/linux-sources" +RDEPEND="" + +S="${WORKDIR}" + +MODULE_NAMES="wl(net/wireless)" +MODULESD_WL_ALIASES=("wlan0 wl") + +pkg_setup() { + # bug #300570 + # NOTE<lxnay>: module builds correctly anyway with b43 and SSB enabled + # make checks non-fatal. The correct fix is blackisting ssb and, perhaps + # b43 via udev rules. Moreover, previous fix broke binpkgs support. + CONFIG_CHECK="~!B43 ~!SSB" + CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP" + ERROR_B43="B43: If you insist on building this, you must blacklist it!" + ERROR_SSB="SSB: If you insist on building this, you must blacklist it!" + ERROR_LIB80211="LIB80211: Please enable it. If you can't find it: enabling the driver for \"Intel PRO/Wireless 2100\" or \"Intel PRO/Wireless 2200BG\" (IPW2100 or IPW2200) should suffice." + ERROR_MAC80211="MAC80211: If you insist on building this, you must blacklist it!" + ERROR_PREEMPT_RCU="PREEMPT_RCU: Please do not set the Preemption Model to \"Preemptible Kernel\"; choose something else." + ERROR_LIB80211_CRYPT_TKIP="LIB80211_CRYPT_TKIP: You will need this for WPA." + if kernel_is ge 3 8 8; then + CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211 ~!PREEMPT_RCU" + elif kernel_is ge 2 6 32; then + CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} CFG80211" + elif kernel_is ge 2 6 31; then + CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT ~!MAC80211" + elif kernel_is ge 2 6 29; then + CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK2} WIRELESS_EXT COMPAT_NET_DEV_OPS" + else + CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP" + fi + + linux-mod_pkg_setup + + BUILD_PARAMS="-C ${KV_DIR} M=${S}" + BUILD_TARGETS="wl.ko" +} + +src_prepare() { +# Makefile.patch: keep `emake install` working +# linux-3.9.0.patch: add support for kernel 3.9.0 +# linux-3.10.0.patch: add support for kernel 3.10, bug #477372 + epatch "${FILESDIR}/${P}-license.patch" + epatch "${FILESDIR}/${P}-makefile.patch" + epatch "${FILESDIR}/${P}-linux-recent.patch" + epatch "${FILESDIR}/${P}-eth-to-wlan.patch" + epatch "${FILESDIR}/${P}-gcc.patch" + + epatch_user +} diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-eth-to-wlan.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-eth-to-wlan.patch new file mode 100644 index 000000000000..b23914a0b3d6 --- /dev/null +++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-eth-to-wlan.patch @@ -0,0 +1,12 @@ +diff -urN a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c +--- a/src/wl/sys/wl_linux.c 2013-08-01 09:52:22.000000000 +0300 ++++ b/src/wl/sys/wl_linux.c 2013-09-27 09:20:11.495023471 +0300 +@@ -235,7 +235,7 @@ + #define to_str(s) #s + #define quote_str(s) to_str(s) + +-#define BRCM_WLAN_IFNAME eth%d ++#define BRCM_WLAN_IFNAME wlan%d + + static char intf_name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME); + diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-gcc.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-gcc.patch new file mode 100644 index 000000000000..b5d7e858d78f --- /dev/null +++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-gcc.patch @@ -0,0 +1,11 @@ +diff -urN a/src/wl/sys/wl_iw.h b/src/wl/sys/wl_iw.h +--- a/src/wl/sys/wl_iw.h 2013-08-01 09:52:22.000000000 +0300 ++++ b/src/wl/sys/wl_iw.h 2013-09-27 09:36:07.808067913 +0300 +@@ -21,6 +21,7 @@ + #ifndef _wl_iw_h_ + #define _wl_iw_h_ + ++#include <linux/semaphore.h> + #include <linux/wireless.h> + + #include <typedefs.h> diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch new file mode 100644 index 000000000000..cd4670901202 --- /dev/null +++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch @@ -0,0 +1,10 @@ +--- a/src/wl/sys/wl_linux.c 2013-08-01 08:52:22.000000000 +0200 ++++ b/src/wl/sys/wl_linux.c 2013-09-13 14:26:42.613839899 +0200 +@@ -225,6 +225,7 @@ + + static int nompc = 0; + module_param(nompc, int, 0); ++MODULE_LICENSE("Mixed/Proprietary"); + + #ifdef quote_str + #undef quote_str diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-recent.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-recent.patch new file mode 100644 index 000000000000..97a331a2bd73 --- /dev/null +++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-recent.patch @@ -0,0 +1,126 @@ +--- a/src/wl/sys/wl_linux.c 2013-08-01 08:52:22.000000000 +0200 ++++ b/src/wl/sys/wl_linux.c 2013-09-13 14:25:36.463020788 +0200 +@@ -910,7 +910,11 @@ + pci_set_drvdata(pdev, NULL); + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + static struct pci_driver wl_pci_driver = { ++#else ++static struct pci_driver wl_pci_driver __refdata = { ++#endif + name: "wl", + probe: wl_pci_probe, + suspend: wl_suspend, +@@ -3235,7 +3239,7 @@ + void + wl_tkip_printstats(wl_info_t *wl, bool group_key) + { +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + char debug_buf[512]; + int idx; + if (wl->tkipmodops) { +@@ -3408,6 +3412,7 @@ + return 0; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + static int + wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data) + { +@@ -3462,19 +3467,90 @@ + return length; + } + ++#else ++ ++static int ++wl_proc_read(struct seq_file *seq, void *offset) ++{ ++ wl_info_t * wl = (wl_info_t *)seq->private; ++ int bcmerror, to_user; ++ ++ WL_LOCK(wl); ++ bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL); ++ WL_UNLOCK(wl); ++ ++ seq_printf(seq, "%d\n", to_user); ++ return bcmerror; ++} ++ ++static ssize_t wl_proc_write(struct file *file, const char __user *buff, ++ size_t length, loff_t *ppos) ++{ ++ struct seq_file *seq = file->private_data; ++ wl_info_t * wl = (wl_info_t *)seq->private; ++ int bcmerror, from_user = 0; ++ ++ if (length != 1) { ++ WL_ERROR(("%s: Invalid data length\n", __FUNCTION__)); ++ return -EIO; ++ } ++ ++ if (copy_from_user(&from_user, buff, 1)) { ++ WL_ERROR(("%s: copy from user failed\n", __FUNCTION__)); ++ return -EFAULT; ++ } ++ ++ if (from_user >= 0x30) ++ from_user -= 0x30; ++ ++ WL_LOCK(wl); ++ bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL); ++ WL_UNLOCK(wl); ++ ++ if (bcmerror < 0) { ++ WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror)); ++ return -EIO; ++ } ++ *ppos += length; ++ return length; ++} ++ ++static int wl_proc_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, wl_proc_read, PDE_DATA(inode)); ++} ++ ++static const struct file_operations wl_proc_fops = { ++ .owner = THIS_MODULE, ++ .open = wl_proc_open, ++ .read = seq_read, ++ .write = wl_proc_write, ++ .llseek = seq_lseek, ++ .release = single_release, ++}; ++#endif ++ + static int + wl_reg_proc_entry(wl_info_t *wl) + { + char tmp[32]; + sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit); +- if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) { ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) ++ wl->proc_entry = create_proc_entry(tmp, 0644, NULL); ++ if (wl->proc_entry) { ++ wl->proc_entry->read_proc = wl_proc_read; ++ wl->proc_entry->write_proc = wl_proc_write; ++ wl->proc_entry->data = wl; ++ } ++#else ++ wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_proc_fops, wl); ++#endif ++ if (!wl->proc_entry) { + WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp)); + ASSERT(0); + return -1; + } +- wl->proc_entry->read_proc = wl_proc_read; +- wl->proc_entry->write_proc = wl_proc_write; +- wl->proc_entry->data = wl; + return 0; + } + #ifdef WLOFFLD diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch new file mode 100644 index 000000000000..09c495d2a10f --- /dev/null +++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch @@ -0,0 +1,14 @@ +--- Makefile.old 2013-04-28 22:42:59.000000000 +0200 ++++ Makefile 2013-04-28 22:45:53.000000000 +0200 +@@ -128,9 +128,9 @@ + + EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped + +-KBASE ?= /lib/modules/`uname -r` ++KBASE ?= /lib/modules/${KV_FULL} + KBUILD_DIR ?= $(KBASE)/build +-MDEST_DIR ?= $(KBASE)/kernel/drivers/net/wireless ++MDEST_DIR ?= ${D}$(KBASE)/kernel/drivers/net/wireless + + all: + KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd` |