summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-wireless/broadcom-sta
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-wireless/broadcom-sta')
-rw-r--r--net-wireless/broadcom-sta/Manifest7
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r1.ebuild66
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r2.ebuild67
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild69
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r1.ebuild75
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r2.ebuild77
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r3.ebuild77
-rw-r--r--net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild83
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch12
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch21
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch11
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch14
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch12
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch60
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch71
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch14
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch32
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch11
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-eth-to-wlan.patch12
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-gcc.patch11
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch10
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch102
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.15.patch17
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-recent.patch126
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch14
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch29
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.18.patch30
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch11
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch350
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch26
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch102
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch17
-rw-r--r--net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch14
-rw-r--r--net-wireless/broadcom-sta/metadata.xml15
34 files changed, 1665 insertions, 0 deletions
diff --git a/net-wireless/broadcom-sta/Manifest b/net-wireless/broadcom-sta/Manifest
new file mode 100644
index 00000000000..97adc135c59
--- /dev/null
+++ b/net-wireless/broadcom-sta/Manifest
@@ -0,0 +1,7 @@
+DIST README-broadcom-sta-6.30.223.248.txt 16775 SHA256 e25eaa7e666a361abff679d7518c75200ee4d90f8e5cb16f69af3f033c68811a SHA512 e635629f0a75059fa13b2bd2a756397631bc0add43786b0064d3f0232c9bd42dae394b9631846bf602f6cea628a49928ec2344df453ec5075168736627494020 WHIRLPOOL 4b0923b276bca6c3a0f8b37c903e3cd1b3f9ea37b07ffe308b831e505c691f4b77489abd491cd2c7334fe692846fe797c7d4b0ac63e8786f4190f5c2791e6b46
+DIST bcmwl-kernel-source_6.30.223.30%2Bbdcom-0ubuntu1%7Eppa1_amd64.deb 1779122 SHA256 de6529ae67f339aee185be93e3c12ffa944ef6b4807d176d6fda661de52136ba SHA512 93b17029538ec17be61902f1e5237a300f532dc88fd7475ac202c249a9cec099c5d170b0ebc043e1bda1987f6f925b6a28d4aa80748218f735a3790ded0565cd WHIRLPOOL 47f54a2fc286e58adef1383496fe3e65430ef643d8e7b8830cb87c0558319780f71944296211c62ccccaa4e3a216019fc5a29dd48903240362c656bb79ae55c2
+DIST bcmwl-kernel-source_6.30.223.30%2Bbdcom-0ubuntu1%7Eppa1_i386.deb 1732452 SHA256 d689040ac2ef67b9947f892b52764cd94c2090499747b57d63c2b40c7bc8eabb SHA512 323db5e6c8fc702990d7137bd11d2e8bba7ed073ee8da00125d147872edf90dd051a959198dbdaf92808403cdcfd582f17afb8a6f5e741382d3a0cffd6ce130a WHIRLPOOL db24f078e2639f609021028304e7caf48b9a3737b6fdf4b2522ab74606c6cb0b11a94706978b1fd1acdf66c59e351a4a433cf9e500862931a1e9dce6e5562c01
+DIST hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz 1735911 SHA256 d57c33f6bf4ebe68cac67ffe39c2260b8990bb0f07413dfd021dd4db845199a7 SHA512 adb3d9d9375888df3317d6af3d6d45c53412a677e5431051cbfe8c9eac3b13760022fd9b970e77caaeb0fa010ee8bd32ad80076d7279b60719bfb8562c09951f WHIRLPOOL f037e26d7f85d9a1bf3f2638fa6d6bbda43384e24fb249e90afcfff792be8013f1e0f2a1876c4675e39911d4e4877f0ab785eab15f7a6460621fe14c21bab486
+DIST hybrid-v35-nodebug-pcoem-6_30_223_248.tar.gz 2824762 SHA256 b196543a429c22b2b8d75d0c1d9e6e7ff212c3d3e1f42cc6fd9e4858f01da1ad SHA512 9f067cf5e1be562c78252791c0b2324b568c8533903842e18e92f2b10c3277e1d15ed42a5925acbd443de373f5113d05447b885a8d52ef57695babe48d68a0ff WHIRLPOOL f3bfef5b3dcbf6d051facbda0078a9850a1cf2f851bca07fd7538ffc3d5c0bf118622d217bb7737fdd87825af73b61ddd2d9a52c3d13a8070be02d1a584a8b14
+DIST hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz 1786627 SHA256 5f37b2b879e29b220dc64ce2e93d922dc231d4241da03bcbab15ced10e649b4a SHA512 a83defe4553f680b984bf49788377436c5f563f2920c129d87a3930fb6501d0f833d353acf229fa4f67b761e4564428c62bc1c8e3e23c0727d01b8c4f797f6af WHIRLPOOL d1ddc19e29a6927ae0f172613d429a92d5009515b4db1bc188b0ced41ff39565512d4f85721bcf4ddd0a951afadfd7bc303219ed93a20f83e1936a9c82717e47
+DIST hybrid-v35_64-nodebug-pcoem-6_30_223_248.tar.gz 2875739 SHA256 3d994cc6c05198f4b6f07a213ac1e9e45a45159899e6c4a7feca5e6c395c3022 SHA512 ce1e9f7f52cd98eaba5cf4ec0c7276bddf3ad906a0111eb236665daca72f36139ca4a8af72658cf91b0eaaa8479e54f5bb3bce77a0cc9bc1966f044b76b8295a WHIRLPOOL 6393507f340f4244d8e40c81102e37f9df0d5dbc0ce4e0fd3ed187ddde6faf3be9bfae59371eb307d031974b5b6d1417c7c11fbdd51b9f3b168ccd83d48276d9
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r1.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r1.ebuild
new file mode 100644
index 00000000000..099e4ae716b
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~!PREEMPT"
+ 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}-makefile.patch" \
+ "${FILESDIR}/${P}-linux-3.10.0.patch"
+
+ epatch_user
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r2.ebuild
new file mode 100644
index 00000000000..2962110678b
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~!PREEMPT"
+ 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() {
+ epatch "${FILESDIR}/${P}-license.patch" \
+ "${FILESDIR}/${P}-makefile.patch" \
+ "${FILESDIR}/${P}-linux-recent.patch" \
+ "${FILESDIR}/${P}-eth-to-wlan.patch" \
+ "${FILESDIR}/${P}-gcc.patch" \
+ "${FILESDIR}/${P}-linux-3.15.patch"
+
+ epatch_user
+}
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 00000000000..65dcb1c8fee
--- /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
+# $Id$
+
+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/broadcom-sta-6.30.223.248-r1.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r1.ebuild
new file mode 100644
index 00000000000..adf6ca55897
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 )
+ http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt"
+
+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 ~!BCMA ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_BCMA="BCMA: 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 ~!PREEMPT"
+ 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() {
+ epatch \
+ "${FILESDIR}/${PN}-6.30.223.141-license.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-makefile.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-gcc.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-linux-3.15.patch"
+
+ epatch_user
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dodoc "${DISTDIR}/README-${P}.txt"
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r2.ebuild
new file mode 100644
index 00000000000..e91828dcf87
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 )
+ http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt"
+
+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 ~!BCMA ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_BCMA="BCMA: 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 ~!PREEMPT"
+ 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() {
+ epatch \
+ "${FILESDIR}/${PN}-6.30.223.141-license.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-makefile.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-gcc.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-linux-3.15.patch" \
+ "${FILESDIR}/${PN}-6.30.223.248-linux-3.17.patch" \
+ "${FILESDIR}/${PN}-6.30.223.248-linux-3.18.patch"
+
+ epatch_user
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dodoc "${DISTDIR}/README-${P}.txt"
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r3.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r3.ebuild
new file mode 100644
index 00000000000..5a647f1950d
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r3.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 )
+ http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt"
+
+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 ~!BCMA ~!SSB"
+ CONFIG_CHECK2="LIB80211 ~!MAC80211 ~LIB80211_CRYPT_TKIP"
+ ERROR_B43="B43: If you insist on building this, you must blacklist it!"
+ ERROR_BCMA="BCMA: 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 ~!PREEMPT"
+ 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() {
+ epatch \
+ "${FILESDIR}/${PN}-6.30.223.141-license.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-makefile.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-eth-to-wlan.patch" \
+ "${FILESDIR}/${PN}-6.30.223.141-gcc.patch" \
+ "${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch" \
+ "${FILESDIR}/${PN}-6.30.223.248-r3-linux-3.15-3.18.patch" \
+ "${FILESDIR}/${PN}-6.30.223.248-r3-linux-4.0.patch"
+
+ epatch_user
+}
+
+src_install() {
+ linux-mod_src_install
+
+ dodoc "${DISTDIR}/README-${P}.txt"
+}
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild
new file mode 100644
index 00000000000..e5cdaf839f0
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils linux-info linux-mod unpacker
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="https://launchpad.net/ubuntu/+source/bcmwl http://www.broadcom.com/support/802.11/linux_sta.php"
+BASE_URI="https://launchpad.net/~albertomilone/+archive/broadcom/+files"
+BASE_NAME="bcmwl-kernel-source_${PV}%2Bbdcom-0ubuntu1%7Eppa1_"
+SRC_URI="amd64? ( ${BASE_URI}/${BASE_NAME}amd64.deb )
+ x86? ( ${BASE_URI}/${BASE_NAME}i386.deb )"
+
+LICENSE="Broadcom"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+#S="${WORKDIR}"
+S="${WORKDIR}/usr/src/bcmwl-${PV}+bdcom"
+
+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_unpack() {
+ local arch_suffix
+ if use amd64; then
+ arch_suffix="amd64"
+ else
+ arch_suffix="i386"
+ fi
+ unpack_deb "${BASE_NAME}${arch_suffix}.deb"
+}
+
+src_prepare() {
+# Filter the outdated patches here
+ EPATCH_FORCE="yes" EPATCH_EXCLUDE="0002* 0004* 0005*" EPATCH_SOURCE="${S}/patches" EPATCH_SUFFIX=patch epatch
+# 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}-makefile.patch" \
+ "${FILESDIR}/${P}-linux-3.9.0.patch" \
+ "${FILESDIR}/${P}-linux-3.10.0.patch"
+ mv "${S}/lib/wlc_hybrid.o_shipped_"* "${S}/lib/wlc_hybrid.o_shipped" \
+ || die "Where is the blob?"
+
+ epatch_user
+}
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch
new file mode 100644
index 00000000000..b320d977e8b
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch
@@ -0,0 +1,12 @@
+diff -Naur hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c
+--- hybrid-portsrc-x86_32-v5_10_91_9.orig/src/wl/sys/wl_linux.c 2009-04-23 02:48:59.000000000 +0900
++++ hybrid-portsrc-x86_32-v5_10_91_9/src/wl/sys/wl_linux.c 2009-05-08 00:48:20.000000000 +0900
+@@ -163,6 +163,8 @@
+ static void wl_free_if(wl_info_t *wl, wl_if_t *wlif);
+ static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info);
+
++MODULE_LICENSE("MIXED/Proprietary");
++
+ static struct pci_device_id wl_id_table[] = {
+ { PCI_VENDOR_ID_BROADCOM, 0x4311, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_BROADCOM, 0x4312, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch
new file mode 100644
index 00000000000..a915aee67fe
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch
@@ -0,0 +1,21 @@
+diff -Naur broadcom-sta-5.100.82.111.orig/Makefile broadcom-sta-5.100.82.111/Makefile
+--- broadcom-sta-5.100.82.111.orig/Makefile 2011-10-06 08:16:10.000000000 +0900
++++ broadcom-sta-5.100.82.111/Makefile 2011-10-24 08:54:26.000000000 +0900
+@@ -16,7 +16,7 @@
+ ifneq ($(KERNELRELEASE),)
+
+ LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \
+- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \
++ if [ "$(VERSION)" -ge "3" -o "$(VERSION)" -eq "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \
+ echo TRUE; \
+ else \
+ echo FALSE; \
+@@ -24,7 +24,7 @@
+ ))
+
+ LINUXVER_WEXT_ONLY:=$(strip $(shell \
+- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
++ if [ "$(VERSION)" -ge "3" -o "$(VERSION)" -eq "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
+ echo FALSE; \
+ else \
+ echo TRUE; \
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch
new file mode 100644
index 00000000000..633b9c858d6
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch
@@ -0,0 +1,11 @@
+--- src/wl/sys/wl_cfg80211.c.orig 2011-10-31 07:57:38.000000000 -0400
++++ src/wl/sys/wl_cfg80211.c 2011-10-31 07:57:46.000000000 -0400
+@@ -1811,7 +1811,7 @@
+ notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +
+ wl_get_ielen(wl);
+ freq = ieee80211_channel_to_frequency(notif_bss_info->channel
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+ ,(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ
+ #endif
+ );
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch
new file mode 100644
index 00000000000..c28bc0ee4ad
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch
@@ -0,0 +1,14 @@
+--- src/wl/sys/wl_linux.c.old 2013-05-02 21:00:51.000000000 +0200
++++ src/wl/sys/wl_linux.c 2013-05-02 21:04:00.000000000 +0200
+@@ -385,7 +385,11 @@
+ #endif
+ .ndo_get_stats = wl_get_stats,
+ .ndo_set_mac_address = wl_set_mac_address,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
+ .ndo_set_multicast_list = wl_set_multicast_list,
++#else
++ .ndo_set_rx_mode = wl_set_multicast_list,
++#endif
+ .ndo_do_ioctl = wl_ioctl
+ };
+
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch
new file mode 100644
index 00000000000..2f1ad562cec
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch
@@ -0,0 +1,12 @@
+--- src/wl/sys/wl_linux.c.old 2013-05-02 14:51:07.000000000 +0200
++++ src/wl/sys/wl_linux.c 2013-05-02 14:51:14.000000000 +0200
+@@ -40,7 +40,9 @@
+ #include <linux/pci_ids.h>
+ #define WLC_MAXBSSCFG 1
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
+ #include <asm/system.h>
++#endif
+ #include <asm/io.h>
+ #include <asm/irq.h>
+ #include <asm/pgtable.h>
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch
new file mode 100644
index 00000000000..17730dbe0c0
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch
@@ -0,0 +1,60 @@
+--- work.orig/src/wl/sys/wl_cfg80211.c 2012-11-05 21:12:30.402421835 +0100
++++ work/src/wl/sys/wl_cfg80211.c 2012-11-05 21:21:13.962421835 +0100
+@@ -40,9 +40,15 @@ u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_I
+
+ static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
+ enum nl80211_iftype type, u32 *flags, struct vif_params *params);
+-static s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++static s32 __wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev,
++#endif
+ struct cfg80211_scan_request *request, struct cfg80211_ssid *this_ssid);
+-static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++static s32 wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev,
++#endif
+ struct cfg80211_scan_request *request);
+ static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
+ static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
+@@ -496,10 +502,16 @@ wl_cfg80211_change_iface(struct wiphy *w
+ }
+
+ static s32
+-__wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++__wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev,
++#endif
+ struct cfg80211_scan_request *request,
+ struct cfg80211_ssid *this_ssid)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev = request->wdev->netdev;
++#endif
+ struct wl_priv *wl = ndev_to_wl(ndev);
+ struct cfg80211_ssid *ssids;
+ struct wl_scan_req *sr = wl_to_sr(wl);
+@@ -570,13 +582,20 @@ scan_out:
+ }
+
+ static s32
+-wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++ struct net_device *ndev,
++#endif
+ struct cfg80211_scan_request *request)
+ {
+ s32 err = 0;
+
+ CHECK_SYS_UP();
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
+ err = __wl_cfg80211_scan(wiphy, ndev, request, NULL);
++#else
++ err = __wl_cfg80211_scan(wiphy, request, NULL);
++#endif
+ if (err) {
+ WL_DBG(("scan error (%d)\n", err));
+ return err;
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch
new file mode 100644
index 00000000000..da2ddcca437
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch
@@ -0,0 +1,71 @@
+--- /src/include/bcmutils.h~ 2011-10-22 18:55:54.000000000 +0200
++++ /src/include/bcmutils.h 2013-02-21 09:08:19.947034424 +0100
+@@ -555,7 +555,11 @@ extern void printbig(char *buf);
+ extern void prhex(const char *msg, uchar *buf, uint len);
+
+ extern bcm_tlv_t *BCMROMFN(bcm_next_tlv)(bcm_tlv_t *elt, int *buflen);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key);
++#else
++extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key);
++#endif
+ extern bcm_tlv_t *BCMROMFN(bcm_parse_ordered_tlvs)(void *buf, int buflen, uint key);
+
+ extern const char *bcmerrorstr(int bcmerror);
+--- /src/wl/sys/wl_cfg80211.c~ 2013-02-21 09:06:18.971297216 +0100
++++ /src/wl/sys/wl_cfg80211.c 2013-02-21 09:10:56.682019739 +0100
+@@ -744,7 +744,11 @@ wl_cfg80211_join_ibss(struct wiphy *wiph
+ else
+ memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
+
+- wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
++ wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
++#else
++ wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
++#endif
+
+ err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
+ if (err) {
+@@ -2047,9 +2051,14 @@ static s32 wl_update_bss_info(struct wl_
+ struct bcm_tlv *tim;
+ u16 beacon_interval;
+ s32 dtim_period;
+- size_t ie_len;
+- u8 *ie;
+ s32 err = 0;
++ size_t ie_len;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
++ u8 *ie;
++#else
++ const u8 *ie;
++ const struct cfg80211_bss_ies *ies;
++#endif
+
+ ssid = &wl->profile->ssid;
+ bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
+@@ -2079,8 +2088,22 @@ static s32 wl_update_bss_info(struct wl_
+ beacon_interval = cpu_to_le16(bi->beacon_period);
+ } else {
+ WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
+- ie = bss->information_elements;
+- ie_len = bss->len_information_elements;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
++ ie = bss->information_elements;
++ ie_len = bss->len_information_elements;
++#else
++ rcu_read_lock();
++ ies = (const struct cfg80211_bss_ies*)rcu_dereference(bss->ies);
++ if (!ies) {
++ /* This should never happen */
++ rcu_read_unlock();
++ err = -EIO;
++ goto update_bss_info_out;
++ }
++ ie = ies->data;
++ ie_len = (size_t)(ies->len);
++ rcu_read_unlock();
++#endif
+ beacon_interval = bss->beacon_interval;
+ cfg80211_put_bss(bss);
+ }
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch
new file mode 100644
index 00000000000..e1f168f1270
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch
@@ -0,0 +1,14 @@
+--- src/wl/sys/wl_cfg80211.c.old 2013-05-02 17:10:36.000000000 +0200
++++ src/wl/sys/wl_cfg80211.c 2013-05-02 17:12:27.000000000 +0200
+@@ -2119,7 +2119,11 @@
+ rcu_read_unlock();
+ #endif
+ beacon_interval = bss->beacon_interval;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
+ cfg80211_put_bss(bss);
++#else
++ cfg80211_put_bss(wl_to_wiphy(wl), bss);
++#endif
+ }
+
+ tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch
new file mode 100644
index 00000000000..7f26746ee7a
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch
@@ -0,0 +1,32 @@
+diff -Naur broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_linux.c broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_linux.c
+--- broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_linux.c 2012-05-24 09:45:02.520119025 +0400
++++ broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_linux.c 2012-05-24 09:46:52.116121834 +0400
+@@ -1581,11 +1581,7 @@
+ }
+
+ WL_LOCK(wl);
+- if (!capable(CAP_NET_ADMIN)) {
+- bcmerror = BCME_EPERM;
+- } else {
+- bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
+- }
++ bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
+ WL_UNLOCK(wl);
+
+ done1:
+
+diff -Naur broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_cfg80211.c broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_cfg80211.c
+--- broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_cfg80211.c 2012-05-24 09:45:33.268119813 +0400
++++ broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_cfg80211.c 2012-05-24 09:55:30.184135098 +0400
+@@ -1466,7 +1466,10 @@
+ scb_val.val = 0;
+ err = wl_dev_ioctl(dev, WLC_GET_RSSI, &scb_val, sizeof(scb_val_t));
+ if (err) {
+- WL_ERR(("Could not get rssi (%d)\n", err));
++ if (err != -EINVAL) {
++ // Don't fill syslog with EINVAL error
++ WL_ERR(("Could not get rssi (%d)\n", err));
++ }
+ return err;
+ }
+ rssi = dtoh32(scb_val.val);
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch
new file mode 100644
index 00000000000..048565376d7
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch
@@ -0,0 +1,11 @@
+diff -Naur broadcom-sta-5.60.246.2.orig//src/wl/sys/wl_iw.h broadcom-sta-5.60.246.2/src/wl/sys/wl_iw.h
+--- broadcom-sta-5.60.246.2.orig//src/wl/sys/wl_iw.h 2010-10-08 07:32:59.000000000 +0900
++++ broadcom-sta-5.60.246.2/src/wl/sys/wl_iw.h 2010-10-28 00:50:57.925351964 +0900
+@@ -15,6 +15,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-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 00000000000..b23914a0b3d
--- /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 00000000000..b5d7e858d78
--- /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 00000000000..cd467090120
--- /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-3.10.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch
new file mode 100644
index 00000000000..c575f289a26
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch
@@ -0,0 +1,102 @@
+diff -Naur bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c
+--- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200
++++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200
+@@ -3229,7 +3229,12 @@
+ 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(3, 10, 0)
++ struct seq_file sfile;
++ struct seq_file *debug_buf = &sfile;
++#else
+ char debug_buf[512];
++#endif
+ int idx;
+ if (wl->tkipmodops) {
+ if (group_key) {
+@@ -3242,7 +3247,11 @@
+ wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
+ else
+ return;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
++#else
+ printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
++#endif
+ }
+ #endif
+ }
+@@ -3401,17 +3410,24 @@
+ 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)
++#else
++static ssize_t
++wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int bcmerror, to_user;
+ int len;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if (offset > 0) {
+ *eof = 1;
+ return 0;
+ }
++#endif
+
+ if (!length) {
+ WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
+@@ -3424,8 +3440,13 @@
+ return len;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
++#else
++static ssize_t
++wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int from_user = 0;
+@@ -3455,19 +3476,34 @@
+ return length;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++static const struct file_operations wl_fops = {
++ .owner = THIS_MODULE,
++ .read = wl_proc_read,
++ .write = wl_proc_write,
++};
++#endif
++
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)
+ {
+ char tmp[32];
+ sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
+ WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
++#else
++ if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
++ WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
++#endif
+ ASSERT(0);
+ return -1;
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ wl->proc_entry->read_proc = wl_proc_read;
+ wl->proc_entry->write_proc = wl_proc_write;
+ wl->proc_entry->data = wl;
++#endif
+ return 0;
+ }
+ #ifdef WLOFFLD
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.15.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.15.patch
new file mode 100644
index 00000000000..5596c0ebcf2
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.15.patch
@@ -0,0 +1,17 @@
+Add channel parameter to cfg80211_ibss_joined call
+
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -1841,7 +1841,12 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ wl_get_assoc_ies(wl);
+ memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
+ wl_update_bss_info(wl);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
+ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
++#else
++ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid,
++ &wl->conf->channel, GFP_KERNEL);
++#endif
+ set_bit(WL_STATUS_CONNECTED, &wl->status);
+ wl->profile->active = true;
+ }
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 00000000000..97a331a2bd7
--- /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 00000000000..09c495d2a10
--- /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`
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch
new file mode 100644
index 00000000000..6ee0092376b
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch
@@ -0,0 +1,29 @@
+From 5f7db08c046bd31b162a102ca868fa334a0357b9 Mon Sep 17 00:00:00 2001
+From: Michael Marineau <mike@marineau.org>
+Date: Sat, 20 Sep 2014 12:49:43 -0700
+Subject: [PATCH] linux 3.17
+
+http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c835a677331495cf137a7f8a023463afd9f032f8
+---
+ src/wl/sys/wl_linux.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 1622127..11c4ec2 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -1308,7 +1308,11 @@ wl_alloc_linux_if(wl_if_t *wlif)
+ dev->priv = priv_link;
+ #else
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
+ dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
++#else
++ dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN, ether_setup);
++#endif
+ if (!dev) {
+ WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
+ (wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
+--
+1.8.5.5
+
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.18.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.18.patch
new file mode 100644
index 00000000000..4860912d9fe
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.18.patch
@@ -0,0 +1,30 @@
+From 5aae9ccfda6dfc680403b4a5ff9a36dcd5331dfd Mon Sep 17 00:00:00 2001
+From: Michael Marineau <mike@marineau.org>
+Date: Tue, 11 Nov 2014 15:17:46 -0800
+Subject: [PATCH] linux 3.18
+
+http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5bc8c1f2b070bab82ed738f98ecfac725e33c57f
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 514a892..e3ebef2 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2010,7 +2010,11 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
+
+ notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+ notify_ielen = le32_to_cpu(bi->ie_length);
+- cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
++ cbss = cfg80211_inform_bss(wiphy, channel,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
++ CFG80211_BSS_FTYPE_UNKNOWN,
++#endif
++ (const u8 *)(bi->BSSID.octet),
+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+
+--
+2.0.4
+
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch
new file mode 100644
index 00000000000..f93e3f1d3a3
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch
@@ -0,0 +1,11 @@
+--- a/Makefile 2014-06-26 10:42:08.000000000 +0000
++++ b/Makefile 2014-07-17 22:44:01.662297228 +0000
+@@ -126,6 +126,8 @@
+ EXTRA_CFLAGS += -I$(src)/src/shared/bcmwifi/include
+ #EXTRA_CFLAGS += -DBCMDBG_ASSERT -DBCMDBG_ERR
+
++EXTRA_CFLAGS += -Wno-date-time
++
+ EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
+
+ KBASE ?= /lib/modules/`uname -r`
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch
new file mode 100644
index 00000000000..7fe63199a0c
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch
@@ -0,0 +1,350 @@
+--- a/src/wl/sys/wl_cfg80211_hybrid.c 2014-06-26 12:42:08.000000000 +0200
++++ b/src/wl/sys/wl_cfg80211_hybrid.c 2015-01-22 01:43:25.378920452 +0100
+@@ -63,8 +63,13 @@
+ static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_ibss_params *params);
+ static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
+ static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
+ struct net_device *dev, u8 *mac, struct station_info *sinfo);
++#else
++static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
++ struct net_device *dev, const u8 *mac, struct station_info *sinfo);
++#endif
+ static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy,
+ struct net_device *dev, bool enabled, s32 timeout);
+ static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
+@@ -1387,7 +1392,7 @@
+ key_endian_to_host(&key);
+
+ params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len);
+- memcpy(params.key, key.data, params.key_len);
++ memcpy((char *)params.key, key.data, params.key_len);
+
+ if ((err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec)))) {
+ return err;
+@@ -1421,9 +1426,15 @@
+ return err;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
+ static s32
+ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+ u8 *mac, struct station_info *sinfo)
++#else
++static s32
++wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
++ const u8 *mac, struct station_info *sinfo)
++#endif
+ {
+ struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
+ scb_val_t scb_val;
+@@ -2010,9 +2021,15 @@
+
+ notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+ notify_ielen = le32_to_cpu(bi->ie_length);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
+ cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
++#else
++ cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
++ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
++ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
++#endif
+
+ if (unlikely(!cbss))
+ return -ENOMEM;
+@@ -2071,7 +2088,26 @@
+ wl_get_assoc_ies(wl);
+ memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
+ wl_update_bss_info(wl);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
++ {
++ struct wl_bss_info *bi;
++ u16 bss_info_channel;
++ struct ieee80211_channel *channel;
++ u32 freq;
++
++ bi = (struct wl_bss_info *)(wl->extra_buf + 4);
++ bss_info_channel = bi->ctl_ch ? bi->ctl_ch : CHSPEC_CHANNEL(bi->chanspec);
++
++ freq = ieee80211_channel_to_frequency(bss_info_channel,
++ (bss_info_channel <= CH_MAX_2G_CHANNEL) ?
++ IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
++
++ channel = ieee80211_get_channel(wl_to_wiphy(wl), freq);
++ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
++ }
++#else
+ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
++#endif
+ set_bit(WL_STATUS_CONNECTED, &wl->status);
+ wl->profile->active = true;
+ }
+@@ -2629,7 +2665,15 @@
+
+ void wl_cfg80211_detach(struct net_device *ndev)
+ {
+- struct wl_cfg80211_priv *wl = ndev_to_wl(ndev);
++ struct wl_cfg80211_priv *wl;
++ struct wireless_dev *wdev;
++
++ wdev = ndev->ieee80211_ptr;
++ if (wdev == NULL) {
++ printk(KERN_ERR "[%s()] in ndev=%p: IEEE80211ptr=%p\n", __FUNCTION__, ndev, wdev);
++ return;
++ }
++ wl = ndev_to_wl(ndev);
+
+ wl_deinit_cfg80211_priv(wl);
+ wl_free_wdev(wl);
+--- a/src/wl/sys/wl_dbg.h 2014-06-26 12:42:08.000000000 +0200
++++ b/src/wl/sys/wl_dbg.h 2015-01-22 01:43:25.379920462 +0100
+@@ -55,10 +55,12 @@
+
+ #define WL_NONE(args)
+
++#define FORCE_TRACE_LEVEL(fmt, ...) do { printk(KERN_ERR fmt, ## __VA_ARGS__); } while (0) /* ## is GCC specific syntax to remove comma when single arg */
++
+ #ifdef BCMDBG_ERR
+ #define WL_ERROR(args) WL_PRINT(args)
+ #else
+-#define WL_ERROR(args)
++#define WL_ERROR(args) FORCE_TRACE_LEVEL args
+ #endif
+ #define WL_TRACE(args)
+ #define WL_APSTA_UPDN(args)
+--- a/src/wl/sys/wl_linux.c 2014-06-26 12:42:08.000000000 +0200
++++ b/src/wl/sys/wl_linux.c 2015-01-22 01:44:58.580453805 +0100
+@@ -878,7 +878,7 @@
+ static SIMPLE_DEV_PM_OPS(wl_pm_ops, wl_suspend, wl_resume);
+ #endif
+
+-static struct pci_driver wl_pci_driver = {
++static struct pci_driver wl_pci_driver __refdata = {
+ .name = "wl",
+ .probe = wl_pci_probe,
+ .remove = __devexit_p(wl_remove),
+@@ -1270,6 +1270,7 @@
+ MFREE(wl->osh, wlif->dev, sizeof(struct net_device));
+ #else
+ free_netdev(wlif->dev);
++ wlif->dev = NULL;
+ #endif
+ }
+
+@@ -1307,7 +1308,12 @@
+ dev->priv = priv_link;
+ #else
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
+ dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
++#else
++ dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN,
++ ether_setup);
++#endif
+ if (!dev) {
+ WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
+ (wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
+@@ -1651,11 +1657,7 @@
+ }
+
+ WL_LOCK(wl);
+- if (!capable(CAP_NET_ADMIN)) {
+- bcmerror = BCME_EPERM;
+- } else {
+- bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
+- }
++ bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
+ WL_UNLOCK(wl);
+
+ done1:
+@@ -2157,8 +2159,8 @@
+ wlif = WL_DEV_IF(dev);
+ wl = WL_INFO(dev);
+
++ skb->prev = NULL;
+ if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
+- skb->prev = NULL;
+
+ TXQ_LOCK(wl);
+
+@@ -2455,8 +2457,10 @@
+ p80211msg_t *phdr;
+
+ len = sizeof(p80211msg_t) + oskb->len - D11_PHY_HDR_LEN;
+- if ((skb = dev_alloc_skb(len)) == NULL)
++ if ((skb = dev_alloc_skb(len)) == NULL) {
++ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
+ return;
++ }
+
+ skb_put(skb, len);
+ phdr = (p80211msg_t*)skb->data;
+@@ -2535,8 +2539,10 @@
+ rtap_len = sizeof(wl_radiotap_ht_brcm_2_t);
+
+ len = rtap_len + (oskb->len - D11_PHY_HDR_LEN);
+- if ((skb = dev_alloc_skb(len)) == NULL)
++ if ((skb = dev_alloc_skb(len)) == NULL) {
++ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
+ return;
++ }
+
+ skb_put(skb, len);
+
+@@ -2664,8 +2670,10 @@
+ len += amsdu_len;
+ }
+
+- if ((skb = dev_alloc_skb(len)) == NULL)
++ if ((skb = dev_alloc_skb(len)) == NULL) {
++ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
+ return;
++ }
+
+ skb_put(skb, len);
+
+@@ -2990,7 +2998,7 @@
+ }
+
+ void
+-wl_set_monitor(wl_info_t *wl, int val)
++wl_set_monitor(wl_info_t *wl, int val) /* public => is called by wlc_hybrid.o_shipped */
+ {
+ const char *devname;
+ wl_if_t *wlif;
+@@ -3224,42 +3232,75 @@
+ #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)
++{
++ wl_info_t * wl = (wl_info_t *)data;
+ #else
+ static ssize_t
+-wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *data)
+-#endif
++wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp)
+ {
+- wl_info_t * wl = (wl_info_t *)data;
+- int to_user;
+- int len;
++ wl_info_t * wl = PDE_DATA(file_inode(filp));
++#endif
++ int bcmerror, len;
++ int to_user = 0;
++ char tmp[8];
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if (offset > 0) {
+ *eof = 1;
+ return 0;
+ }
++#else
++ if (*offp > 0) { /* for example, stop: cat /proc/brcm_monitor0 */
++ return 0; /* 0 <=> EOF */
++ }
+ #endif
+
+- if (!length) {
+- WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
+- return 0;
+- }
+ WL_LOCK(wl);
+- wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
+- len = sprintf(buffer, "%d\n", to_user);
+- WL_UNLOCK(wl);
+- return len;
++ bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
++ WL_UNLOCK(wl);
++
++ if (bcmerror != BCME_OK) {
++ WL_ERROR(("%s: GET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
++ return -EIO;
++ }
++
++ len = snprintf(tmp, ARRAY_SIZE(tmp), "%d\n", to_user);
++ tmp[ARRAY_SIZE(tmp) - 1] = '\0';
++ if (len >= ARRAY_SIZE(tmp)) {
++ printk(KERN_ERR "%s:%d [%s()] output would be truncated (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len);
++ return -ERANGE;
++ }
++ else if (len < 0) {
++ printk(KERN_ERR "%s:%d [%s()] unable to convert value (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len);
++ return len;
++ }
++ if (length < len) {
++ printk(KERN_ERR "%s:%d [%s()] user buffer is too small (at least=%d ; user=%d)!", __FILE__, __LINE__, __FUNCTION__, len, (int)length);
++ return -EMSGSIZE;
++ }
++ if (copy_to_user(buffer, tmp, len) != 0) {
++ printk(KERN_ERR "%s:%d [%s()] unable to copy data!", __FILE__, __LINE__, __FUNCTION__);
++ return -EFAULT;
++ }
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ *offp += len;
++#endif
++
++ return len;
+ }
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
++{
++ wl_info_t * wl = (wl_info_t *)data;
+ #else
+ static ssize_t
+-wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *data)
+-#endif
++wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp)
+ {
+- wl_info_t * wl = (wl_info_t *)data;
++ wl_info_t * wl = PDE_DATA(file_inode(filp));
++#endif
+ int from_user = 0;
+ int bcmerror;
+
+@@ -3270,7 +3311,11 @@
+ }
+ if (copy_from_user(&from_user, buff, 1)) {
+ WL_ERROR(("%s: copy from user failed\n", __FUNCTION__));
+- return -EIO;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
++ return -EIO;
++#else
++ return -EFAULT;
++#endif
+ }
+
+ if (from_user >= 0x30)
+@@ -3280,10 +3325,15 @@
+ bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL);
+ WL_UNLOCK(wl);
+
+- if (bcmerror < 0) {
++ if (bcmerror != BCME_OK) {
+ WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
+ return -EIO;
+ }
++
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) && 0 /* no need to update offset because this file should only trigger action... */
++ *offp += length;
++#endif
++
+ return length;
+ }
+
+@@ -3304,8 +3354,8 @@
+ if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
+ WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
+ #else
+- if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
+- WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
++ if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
++ WL_ERROR(("%s: proc_create_data %s failed\n", __FUNCTION__, tmp));
+ #endif
+ ASSERT(0);
+ return -1;
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch
new file mode 100644
index 00000000000..6d18c19bd43
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch
@@ -0,0 +1,26 @@
+--- src/wl/sys/wl_cfg80211_hybrid.c.orig 2015-04-27 11:08:10.252439465 +0000
++++ src/wl/sys/wl_cfg80211_hybrid.c 2015-04-27 11:10:52.454433122 +0000
+@@ -1441,7 +1441,11 @@ wl_cfg80211_get_station(struct wiphy *wi
+ WL_DBG(("Could not get rate (%d)\n", err));
+ } else {
+ rate = dtoh32(rate);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
+ sinfo->filled |= STATION_INFO_TX_BITRATE;
++#else
++ sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
++#endif
+ sinfo->txrate.legacy = rate * 5;
+ WL_DBG(("Rate %d Mbps\n", (rate / 2)));
+ }
+@@ -1454,7 +1458,11 @@ wl_cfg80211_get_station(struct wiphy *wi
+ return err;
+ }
+ rssi = dtoh32(scb_val.val);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
+ sinfo->filled |= STATION_INFO_SIGNAL;
++#else
++ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
++#endif
+ sinfo->signal = rssi;
+ WL_DBG(("RSSI %d dBm\n", rssi));
+ }
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch
new file mode 100644
index 00000000000..c575f289a26
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch
@@ -0,0 +1,102 @@
+diff -Naur bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c
+--- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200
++++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200
+@@ -3229,7 +3229,12 @@
+ 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(3, 10, 0)
++ struct seq_file sfile;
++ struct seq_file *debug_buf = &sfile;
++#else
+ char debug_buf[512];
++#endif
+ int idx;
+ if (wl->tkipmodops) {
+ if (group_key) {
+@@ -3242,7 +3247,11 @@
+ wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
+ else
+ return;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
++#else
+ printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
++#endif
+ }
+ #endif
+ }
+@@ -3401,17 +3410,24 @@
+ 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)
++#else
++static ssize_t
++wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int bcmerror, to_user;
+ int len;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if (offset > 0) {
+ *eof = 1;
+ return 0;
+ }
++#endif
+
+ if (!length) {
+ WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
+@@ -3424,8 +3440,13 @@
+ return len;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
++#else
++static ssize_t
++wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data)
++#endif
+ {
+ wl_info_t * wl = (wl_info_t *)data;
+ int from_user = 0;
+@@ -3455,19 +3476,34 @@
+ return length;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++static const struct file_operations wl_fops = {
++ .owner = THIS_MODULE,
++ .read = wl_proc_read,
++ .write = wl_proc_write,
++};
++#endif
++
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)
+ {
+ char tmp[32];
+ sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
+ WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
++#else
++ if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
++ WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
++#endif
+ ASSERT(0);
+ return -1;
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ wl->proc_entry->read_proc = wl_proc_read;
+ wl->proc_entry->write_proc = wl_proc_write;
+ wl->proc_entry->data = wl;
++#endif
+ return 0;
+ }
+ #ifdef WLOFFLD
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch
new file mode 100644
index 00000000000..a6e3d3d1f9f
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch
@@ -0,0 +1,17 @@
+--- src.orig/wl/sys/wl_cfg80211_hybrid.c
++++ src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2013,8 +2013,12 @@
+ ie_len = (size_t)(ies->len);
+ rcu_read_unlock();
+ #endif
+- cfg80211_put_bss(bss);
+- }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
++ cfg80211_put_bss(bss);
++#else
++ cfg80211_put_bss(wl_to_wiphy(wl), bss);
++#endif
++ }
+
+ tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
+ if (tim) {
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch
new file mode 100644
index 00000000000..09c495d2a10
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-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`
diff --git a/net-wireless/broadcom-sta/metadata.xml b/net-wireless/broadcom-sta/metadata.xml
new file mode 100644
index 00000000000..81110864a84
--- /dev/null
+++ b/net-wireless/broadcom-sta/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mattst88@gentoo.org</email>
+ <name>Matt Turner</name>
+ </maintainer>
+ <maintainer>
+ <email>mpagano@gentoo.org</email>
+ <name>Mike Pagano</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">~albertomilone</remote-id>
+ </upstream>
+</pkgmetadata>