public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2015-11-25 19:24 Patrice Clement
  0 siblings, 0 replies; 10+ messages in thread
From: Patrice Clement @ 2015-11-25 19:24 UTC (permalink / raw
  To: gentoo-commits

commit:     b0df1f11504b32265e665ba0a69fcdb6194e8c3c
Author:     Matthew Brewer <tomboy64 <AT> sina <DOT> cn>
AuthorDate: Mon Nov 16 12:31:14 2015 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Nov 17 08:25:38 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0df1f11

net-wireless/broadcom-sta: patch for compatibility with kernel-4.3

 .../broadcom-sta-6.30.223.271-r2.ebuild            | 76 ++++++++++++++++++++++
 .../broadcom-sta-6.30.223.271-linux-4.3.patch      | 11 ++++
 2 files changed, 87 insertions(+)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r2.ebuild
new file mode 100644
index 0000000..4859053
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r2.ebuild
@@ -0,0 +1,76 @@
+# 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-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.271-r1-linux-3.18.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3.patch"
+
+	epatch_user
+}
+
+src_install() {
+	linux-mod_src_install
+
+	dodoc "${DISTDIR}/README-${P}.txt"
+}

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-linux-4.3.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-linux-4.3.patch
new file mode 100644
index 0000000..ae0dc56
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-linux-4.3.patch
@@ -0,0 +1,11 @@
+--- a/src/shared/linux_osl.c    2015-09-19 00:47:15.000000000 +0200
++++ b/src/shared/linux_osl.c    2015-11-09 17:02:22.000000000 +0100
+@@ -932,7 +932,7 @@
+       	uint cycles;
+ 
+ #if defined(__i386__)
+-       rdtscl(cycles);
++       cycles = (u32)native_read_tsc();
+ #else
+       	cycles = 0;
+ #endif 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2016-02-09 20:26 Matt Turner
  0 siblings, 0 replies; 10+ messages in thread
From: Matt Turner @ 2016-02-09 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     156954e2a0e304b68faf11e59ed00a88723b8f60
Author:     Matthew Brewer <tomboy64 <AT> sina <DOT> cn>
AuthorDate: Sat Feb  6 03:25:44 2016 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 16:53:27 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=156954e2

net-wireless/broadcom-sta: cleaning out old revisions

Package-Manager: portage-2.2.26
RepoMan-Options: --ignore-arches

 .../broadcom-sta-6.30.223.141-r1.ebuild            | 66 -------------------
 .../broadcom-sta/broadcom-sta-6.30.223.141.ebuild  | 69 -------------------
 .../broadcom-sta-6.30.223.248-r1.ebuild            | 75 ---------------------
 .../broadcom-sta-6.30.223.248-r2.ebuild            | 77 ----------------------
 .../broadcom-sta-6.30.223.248-r3.ebuild            | 77 ----------------------
 .../broadcom-sta-6.30.223.271-r1.ebuild            | 75 ---------------------
 .../files/broadcom-sta-5.10.91.9-license.patch     | 12 ----
 .../broadcom-sta-5.100.82.111-linux-3.0.patch      | 21 ------
 .../broadcom-sta-5.100.82.112-linux-2.6.39.patch   | 11 ----
 ...sta-5.100.82.112-linux-3.2-with-multicast.patch | 14 ----
 .../broadcom-sta-5.100.82.112-linux-3.4.patch      | 12 ----
 .../broadcom-sta-5.100.82.112-linux-3.6.patch      | 60 -----------------
 .../broadcom-sta-5.100.82.112-linux-3.8.patch      | 71 --------------------
 .../broadcom-sta-5.100.82.112-linux-3.9.patch      | 14 ----
 ...adcom-sta-5.100.82.112-remove-rssi-errors.patch | 32 ---------
 .../files/broadcom-sta-5.100.82.38-gcc.patch       | 11 ----
 16 files changed, 697 deletions(-)

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
deleted file mode 100644
index 099e4ae..0000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r1.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# 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.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild
deleted file mode 100644
index 65dcb1c..0000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# 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
deleted file mode 100644
index adf6ca5..0000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r1.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# 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
deleted file mode 100644
index e91828d..0000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r2.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# 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
deleted file mode 100644
index 5a647f1..0000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r3.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# 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.271-r1.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r1.ebuild
deleted file mode 100644
index a0fe86a..0000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r1.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# 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-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.271-r1-linux-3.18.patch" \
-		"${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch"
-
-	epatch_user
-}
-
-src_install() {
-	linux-mod_src_install
-
-	dodoc "${DISTDIR}/README-${P}.txt"
-}

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
deleted file mode 100644
index b320d97..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-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
deleted file mode 100644
index a915aee..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-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
deleted file mode 100644
index 633b9c8..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index c28bc0e..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- 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
deleted file mode 100644
index 2f1ad56..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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
deleted file mode 100644
index 17730db..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- 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
deleted file mode 100644
index da2ddcc..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- /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
deleted file mode 100644
index e1f168f..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- 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
deleted file mode 100644
index 7f26746..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-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
deleted file mode 100644
index 0485653..0000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-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>


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2016-02-09 20:26 Matt Turner
  0 siblings, 0 replies; 10+ messages in thread
From: Matt Turner @ 2016-02-09 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     96c5f980d1625514f710712f0bf92291536481ff
Author:     Matthew Brewer <tomboy64 <AT> sina <DOT> cn>
AuthorDate: Sat Feb  6 05:24:13 2016 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 17:55:32 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96c5f980

net-wireless/broadcom-sta: fix for bug#573854

reincarnation of #565254 (tsc mess)
=> update the patch to use a non-deprecated function and to be
applicable to pre- and post-4.3 kernels

Package-Manager: portage-2.2.26
RepoMan-Options: --ignore-arches

 .../broadcom-sta-6.30.223.248-r5.ebuild            | 79 ++++++++++++++++++++++
 .../broadcom-sta-6.30.223.271-r3.ebuild            | 76 +++++++++++++++++++++
 ...broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch | 16 +++++
 3 files changed, 171 insertions(+)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r5.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r5.ebuild
new file mode 100644
index 0000000..28098da
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r5.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 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/"
+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" \
+		"${FILESDIR}/${PN}-6.30.223.248-r4-linux-4.2.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.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.271-r3.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r3.ebuild
new file mode 100644
index 0000000..d28e50e
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r3.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2016 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/"
+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-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.271-r1-linux-3.18.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch"
+
+	epatch_user
+}
+
+src_install() {
+	linux-mod_src_install
+
+	dodoc "${DISTDIR}/README-${P}.txt"
+}

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch
new file mode 100644
index 0000000..588f77a
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch
@@ -0,0 +1,16 @@
+diff -ruN a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+--- a/src/shared/linux_osl.c	2015-11-26 12:16:23.343091098 -0800
++++ b/src/shared/linux_osl.c	2015-11-26 12:17:08.657092739 -0800
+@@ -932,7 +932,11 @@
+ 	uint cycles;
+ 
+ #if defined(__i386__)
+-	rdtscl(cycles);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
++	cycles = (u32)rdtsc();
++#else
++	rdtscl(cycles);
++#endif
+ #else
+ 	cycles = 0;
+ #endif 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2016-08-20 22:01 Luca Barbato
  0 siblings, 0 replies; 10+ messages in thread
From: Luca Barbato @ 2016-08-20 22:01 UTC (permalink / raw
  To: gentoo-commits

commit:     5c291bb9ba5f428de8e85865b1733b19a4c6a0fd
Author:     Luca Barbato <lu_zero <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 20 21:58:01 2016 +0000
Commit:     Luca Barbato <lu_zero <AT> gentoo <DOT> org>
CommitDate: Sat Aug 20 22:00:49 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c291bb9

net-wireless/broadcom-sta: Add linux-4.7 support

Bug #590078

Package-Manager: portage-2.3.0

 .../broadcom-sta/broadcom-sta-6.30.223.271-r3.ebuild       |  3 ++-
 .../files/broadcom-sta-6.30.223.271-r3-linux-4.7.patch     | 14 ++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r3.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r3.ebuild
index d28e50e..6029b0c 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r3.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r3.ebuild
@@ -64,7 +64,8 @@ src_prepare() {
 		"${FILESDIR}/${PN}-6.30.223.141-gcc.patch" \
 		"${FILESDIR}/${PN}-6.30.223.248-r3-Wno-date-time.patch" \
 		"${FILESDIR}/${PN}-6.30.223.271-r1-linux-3.18.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r3-linux-4.7.patch"
 
 	epatch_user
 }

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r3-linux-4.7.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r3-linux-4.7.patch
new file mode 100644
index 0000000..55b30e3
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r3-linux-4.7.patch
@@ -0,0 +1,14 @@
+--- a/src/wl/sys/wl_cfg80211_hybrid.c	2016-08-20 17:19:11.285578121 +0200
++++ b/src/wl/sys/wl_cfg80211_hybrid.c	2016-08-20 17:20:55.611574041 +0200
+@@ -49,6 +49,11 @@
+ u32 wl_dbg_level = WL_DBG_ERR;
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
++#define IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ
++#endif
++
+ static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
+            enum nl80211_iftype type, u32 *flags, struct vif_params *params);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2016-11-21  4:18 Matt Turner
  0 siblings, 0 replies; 10+ messages in thread
From: Matt Turner @ 2016-11-21  4:18 UTC (permalink / raw
  To: gentoo-commits

commit:     c6d3f917370292c267bb05d447db028125946dfe
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 21 04:17:58 2016 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Nov 21 04:18:21 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6d3f917

net-wireless/broadcom-sta: Add support for Linux v4.8

Bug: https://bugs.gentoo.org/590078
Bug: https://bugs.gentoo.org/596342

 .../broadcom-sta-6.30.223.271-r4.ebuild            |  78 +++++++++++++++
 .../broadcom-sta-6.30.223.271-r4-linux-4.7.patch   | 109 +++++++++++++++++++++
 .../broadcom-sta-6.30.223.271-r4-linux-4.8.patch   |  64 ++++++++++++
 3 files changed, 251 insertions(+)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
new file mode 100644
index 00000000..76d80f9
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2016 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/"
+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-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.271-r1-linux-3.18.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch"
+
+	epatch_user
+}
+
+src_install() {
+	linux-mod_src_install
+
+	dodoc "${DISTDIR}/README-${P}.txt"
+}

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.7.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.7.patch
new file mode 100644
index 00000000..566680a
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.7.patch
@@ -0,0 +1,109 @@
+Since Linux 4.7, the enum ieee80211_band is no longer used
+
+This shall cause no problem's since both enums ieee80211_band
+and nl80211_band were added in the same commit:
+https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
+
+This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
+
+Reference:
+https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
+
+--- a/src/wl/sys/wl_cfg80211_hybrid.c	2016-06-13 11:57:36.159340297 -0500
++++ b/src/wl/sys/wl_cfg80211_hybrid.c	2016-06-13 11:58:18.442323435 -0500
+@@ -236,7 +236,7 @@
+ #endif				
+ 
+ #define CHAN2G(_channel, _freq, _flags) {			\
+-	.band			= IEEE80211_BAND_2GHZ,		\
++	.band			= NL80211_BAND_2GHZ,		\
+ 	.center_freq		= (_freq),			\
+ 	.hw_value		= (_channel),			\
+ 	.flags			= (_flags),			\
+@@ -245,7 +245,7 @@
+ }
+ 
+ #define CHAN5G(_channel, _flags) {				\
+-	.band			= IEEE80211_BAND_5GHZ,		\
++	.band			= NL80211_BAND_5GHZ,		\
+ 	.center_freq		= 5000 + (5 * (_channel)),	\
+ 	.hw_value		= (_channel),			\
+ 	.flags			= (_flags),			\
+@@ -379,7 +379,7 @@
+ };
+ 
+ static struct ieee80211_supported_band __wl_band_2ghz = {
+-	.band = IEEE80211_BAND_2GHZ,
++	.band = NL80211_BAND_2GHZ,
+ 	.channels = __wl_2ghz_channels,
+ 	.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
+ 	.bitrates = wl_g_rates,
+@@ -387,7 +387,7 @@
+ };
+ 
+ static struct ieee80211_supported_band __wl_band_5ghz_a = {
+-	.band = IEEE80211_BAND_5GHZ,
++	.band = NL80211_BAND_5GHZ,
+ 	.channels = __wl_5ghz_a_channels,
+ 	.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
+ 	.bitrates = wl_a_rates,
+@@ -395,7 +395,7 @@
+ };
+ 
+ static struct ieee80211_supported_band __wl_band_5ghz_n = {
+-	.band = IEEE80211_BAND_5GHZ,
++	.band = NL80211_BAND_5GHZ,
+ 	.channels = __wl_5ghz_n_channels,
+ 	.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
+ 	.bitrates = wl_a_rates,
+@@ -1876,8 +1876,8 @@
+ 	wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
+ #endif
+ 	wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
+-	wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
+-	wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
++	wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
++	wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
+ 	wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
+ 	wdev->wiphy->cipher_suites = __wl_cipher_suites;
+ 	wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
+@@ -2000,7 +2000,7 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+ 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
+ 		(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
+-		IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
++		NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
+ #else
+ 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
+ #endif
+@@ -2116,7 +2116,7 @@
+ 				return err;
+ 			}
+ 			chan = wf_chspec_ctlchan(chanspec);
+-			band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
++			band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
+ 			freq = ieee80211_channel_to_frequency(chan, band);
+ 			channel = ieee80211_get_channel(wiphy, freq);
+ 			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
+@@ -2250,10 +2250,10 @@
+ 		join_params->params.chanspec_list[0] =
+ 		    ieee80211_frequency_to_channel(chan->center_freq);
+ 
+-		if (chan->band == IEEE80211_BAND_2GHZ) {
++		if (chan->band == NL80211_BAND_2GHZ) {
+ 			chanspec |= WL_CHANSPEC_BAND_2G;
+ 		}
+-		else if (chan->band == IEEE80211_BAND_5GHZ) {
++		else if (chan->band == NL80211_BAND_5GHZ) {
+ 			chanspec |= WL_CHANSPEC_BAND_5G;
+ 		}
+ 		else {
+@@ -2885,7 +2885,7 @@
+ 
+ 	if (phy == 'n' || phy == 'a' || phy == 'v') {
+ 		wiphy = wl_to_wiphy(wl);
+-		wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
++		wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
+ 	}
+ 
+ 	return err;

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.8.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.8.patch
new file mode 100644
index 00000000..20e8a9a
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.8.patch
@@ -0,0 +1,64 @@
+From d3f93542326a06d920c6eb89b703384290d37b8b Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Fri, 2 Sep 2016 17:35:34 +0200
+Subject: [PATCH 1/1] Add support for Linux 4.8
+
+Orginal author: Krzysztof Kolasa
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 2fc71fe..ec5e472 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2388,8 +2388,16 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 	s32 err = 0;
+ 
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = true,
++		};
++		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
+ 		cfg80211_scan_done(wl->scan_request, true);     
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
+@@ -2490,7 +2498,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 
+ scan_done_out:
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = false,
++		};
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		cfg80211_scan_done(wl->scan_request, false);
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 	rtnl_unlock();
+@@ -2909,7 +2924,14 @@ s32 wl_cfg80211_down(struct net_device *ndev)
+ 	s32 err = 0;
+ 
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = true,
++		};
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		cfg80211_scan_done(wl->scan_request, true);	
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
+-- 
+2.7.4
+


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2016-12-09 19:39 Matt Turner
  0 siblings, 0 replies; 10+ messages in thread
From: Matt Turner @ 2016-12-09 19:39 UTC (permalink / raw
  To: gentoo-commits

commit:     ddc55138ecddc88b3472b97235fbe3078b9b35db
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  9 19:37:03 2016 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Dec  9 19:39:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddc55138

net-wireless/broadcom-sta: Drop old versions.

All of the upstream download links have changed, and I since I doubt
anyone uses any of these old versions, throw them out instead of fixing
them.

 net-wireless/broadcom-sta/Manifest                 |   7 -
 .../broadcom-sta-6.30.223.141-r2.ebuild            |  67 ----
 .../broadcom-sta-6.30.223.248-r4.ebuild            |  78 -----
 .../broadcom-sta-6.30.223.248-r5.ebuild            |  79 -----
 .../broadcom-sta-6.30.223.271-r2.ebuild            |  76 -----
 .../broadcom-sta-6.30.223.271-r3.ebuild            |  77 -----
 .../broadcom-sta-6.30.223.30-r2.ebuild             |  83 -----
 .../files/broadcom-sta-6.30.223.141-license.patch  |  10 -
 .../broadcom-sta-6.30.223.141-linux-3.10.0.patch   | 102 ------
 .../broadcom-sta-6.30.223.141-linux-3.15.patch     |  17 -
 .../broadcom-sta-6.30.223.141-linux-recent.patch   | 126 --------
 .../broadcom-sta-6.30.223.248-linux-3.17.patch     |  29 --
 .../broadcom-sta-6.30.223.248-linux-3.18.patch     |  30 --
 ...adcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch | 350 ---------------------
 .../broadcom-sta-6.30.223.248-r3-linux-4.0.patch   |  26 --
 .../broadcom-sta-6.30.223.248-r4-linux-4.2.patch   |  16 -
 .../broadcom-sta-6.30.223.271-r2-linux-4.3.patch   |  12 -
 .../broadcom-sta-6.30.223.271-r3-linux-4.7.patch   |  14 -
 .../broadcom-sta-6.30.223.30-linux-3.10.0.patch    | 102 ------
 .../broadcom-sta-6.30.223.30-linux-3.9.0.patch     |  17 -
 .../files/broadcom-sta-6.30.223.30-makefile.patch  |  14 -
 21 files changed, 1332 deletions(-)

diff --git a/net-wireless/broadcom-sta/Manifest b/net-wireless/broadcom-sta/Manifest
index e39f94d..d298806 100644
--- a/net-wireless/broadcom-sta/Manifest
+++ b/net-wireless/broadcom-sta/Manifest
@@ -1,10 +1,3 @@
-DIST README-broadcom-sta-6.30.223.248.txt 16775 SHA256 e25eaa7e666a361abff679d7518c75200ee4d90f8e5cb16f69af3f033c68811a SHA512 e635629f0a75059fa13b2bd2a756397631bc0add43786b0064d3f0232c9bd42dae394b9631846bf602f6cea628a49928ec2344df453ec5075168736627494020 WHIRLPOOL 4b0923b276bca6c3a0f8b37c903e3cd1b3f9ea37b07ffe308b831e505c691f4b77489abd491cd2c7334fe692846fe797c7d4b0ac63e8786f4190f5c2791e6b46
 DIST README-broadcom-sta-6.30.223.271.txt 16755 SHA256 4d6d63f6eb40f84359be06f1f6f26075827a0d25cdaa364d8ccb6561bf162e34 SHA512 ce277af132b656705aee3f8072d1082bfd2a1b7c63a9e330a470546437d4034e7964c64a4f9c326bf15c5f74b9c09a56d720542a41e5ae6e0d42d335488f31f5 WHIRLPOOL 3a544132315cbbc633ac6b6102d71109fea3b9e7742c299f2fe403ecc43206380051c91353c4d79033ac1939fe862b84cb8e435f06687af804fdc2ad5619beb7
-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-nodebug-pcoem-6_30_223_271.tar.gz 2869247 SHA256 4f8b70b293ac8cc5c70e571ad5d1878d0f29d133a46fe7869868d9c19b5058cd SHA512 0361ba30d97bcb1dedf46c11ef1b9a16f09cde3faa6be87b3ccc28679f34183c2fdf511e7c3b5c26b304f6961da454ccf71844b92bbb2f25aa876249496a2f1b WHIRLPOOL c96c21e4d497136c4ac5a8f3f1d3e84a7b5f5478ca7c1276262481d66b919639f475b99783ad993c01c94e380275fdd6eb39dd53f224b43912f7a395cada575c
-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
 DIST hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz 2928541 SHA256 5f79774d5beec8f7636b59c0fb07a03108eef1e3fd3245638b20858c714144be SHA512 6855781f7c69a9aecb9461932423688964879d5a4df571f01ae7adaa7bf21a410bef839605d555afb6c8f4eec92fe8510af6cb120930095617ff6cdcccedaf17 WHIRLPOOL 8a905a35581f5c4a1177a3da7356731a360ba5c72e2897d363682afc49b73c46b031776012bba983842b894505d71e6f20f9404120b676e0b79b9ef003342e56

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
deleted file mode 100644
index 1cc1f5f..00000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.141-r2.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2016 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/"
-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.248-r4.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r4.ebuild
deleted file mode 100644
index 34689fd..00000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r4.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2016 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/"
-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" \
-		"${FILESDIR}/${PN}-6.30.223.248-r4-linux-4.2.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-r5.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r5.ebuild
deleted file mode 100644
index 28098da..00000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r5.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2016 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/"
-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" \
-		"${FILESDIR}/${PN}-6.30.223.248-r4-linux-4.2.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.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.271-r2.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r2.ebuild
deleted file mode 100644
index adaeedb..00000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r2.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2016 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/"
-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-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.271-r1-linux-3.18.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3.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.271-r3.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r3.ebuild
deleted file mode 100644
index 6029b0c..00000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r3.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2016 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/"
-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-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.271-r1-linux-3.18.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r3-linux-4.7.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
deleted file mode 100644
index e5cdaf8..00000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.30-r2.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# 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-6.30.223.141-license.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch
deleted file mode 100644
index cd46709..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-license.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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
deleted file mode 100644
index c575f28..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-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
deleted file mode 100644
index 5596c0e..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.15.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-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
deleted file mode 100644
index 97a331a..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-recent.patch
+++ /dev/null
@@ -1,126 +0,0 @@
---- 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.248-linux-3.17.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch
deleted file mode 100644
index 6ee0092..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.17.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-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
deleted file mode 100644
index 4860912..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-linux-3.18.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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-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
deleted file mode 100644
index 7fe6319..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch
+++ /dev/null
@@ -1,350 +0,0 @@
---- 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
deleted file mode 100644
index 6d18c19..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- 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.248-r4-linux-4.2.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch
deleted file mode 100644
index 9e9f8a1..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
-index ea0726f..1541dad 100644
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -2047,7 +2047,11 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
- 		}
- 		else if ((event == WLC_E_LINK && ~(flags & WLC_EVENT_MSG_LINK)) ||
- 			event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
-+			cfg80211_disconnected(ndev, 0, NULL, 0, false, GFP_KERNEL);
-+#else
- 			cfg80211_disconnected(ndev, 0, NULL, 0, GFP_KERNEL);
-+#endif
- 			clear_bit(WL_STATUS_CONNECTED, &wl->status);
- 			wl_link_down(wl);
- 			wl_init_prof(wl->profile);

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r2-linux-4.3.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r2-linux-4.3.patch
deleted file mode 100644
index 7869dbf..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r2-linux-4.3.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN a/src/shared/linux_osl.c b/src/shared/linux_osl.c
---- a/src/shared/linux_osl.c	2015-11-26 12:16:23.343091098 -0800
-+++ b/src/shared/linux_osl.c	2015-11-26 12:17:08.657092739 -0800
-@@ -932,7 +932,7 @@
- 	uint cycles;
- 
- #if defined(__i386__)
--	rdtscl(cycles);
-+	cycles = (u32)native_read_tsc();
- #else
- 	cycles = 0;
- #endif 

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r3-linux-4.7.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r3-linux-4.7.patch
deleted file mode 100644
index 55b30e3..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r3-linux-4.7.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/src/wl/sys/wl_cfg80211_hybrid.c	2016-08-20 17:19:11.285578121 +0200
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c	2016-08-20 17:20:55.611574041 +0200
-@@ -49,6 +49,11 @@
- u32 wl_dbg_level = WL_DBG_ERR;
- #endif
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
-+#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
-+#define IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ
-+#endif
-+
- static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
-            enum nl80211_iftype type, u32 *flags, struct vif_params *params);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)

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
deleted file mode 100644
index c575f28..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-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
deleted file mode 100644
index a6e3d3d..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- 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
deleted file mode 100644
index 09c495d..00000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.30-makefile.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- 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`


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2017-06-10 23:20 Matt Turner
  0 siblings, 0 replies; 10+ messages in thread
From: Matt Turner @ 2017-06-10 23:20 UTC (permalink / raw
  To: gentoo-commits

commit:     585c4d59c257faae50dd714419b97683381b1432
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 10 22:55:01 2017 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 22:55:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=585c4d59

net-wireless/broadcom-sta: Patch for Linux 4.12 changes

 .../broadcom-sta-6.30.223.271-r4.ebuild            |  3 +-
 .../broadcom-sta-6.30.223.271-r4-linux-4.12.patch  | 64 ++++++++++++++++++++++
 2 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
index d86dba144a2..5cf284a4ceb 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
@@ -66,7 +66,8 @@ src_prepare() {
 		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch" \
 		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch" \
 		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch"
 
 	epatch_user
 }

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.12.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.12.patch
new file mode 100644
index 00000000000..94c6253f803
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.12.patch
@@ -0,0 +1,64 @@
+diff -ru work.orig/src/wl/sys/wl_cfg80211_hybrid.c work.patched/src/wl/sys/wl_cfg80211_hybrid.c
+--- work.orig/src/wl/sys/wl_cfg80211_hybrid.c	2017-06-10 15:50:27.328823384 -0700
++++ work.patched/src/wl/sys/wl_cfg80211_hybrid.c	2017-06-10 15:52:40.540809187 -0700
+@@ -52,8 +52,13 @@
+ u32 wl_dbg_level = WL_DBG_ERR;
+ #endif
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
++           enum nl80211_iftype type, struct vif_params *params);
++#else
+ static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
+            enum nl80211_iftype type, u32 *flags, struct vif_params *params);
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
+ static s32
+ wl_cfg80211_scan(struct wiphy *wiphy,
+@@ -466,7 +471,11 @@
+ 
+ static s32
+ wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++                         enum nl80211_iftype type,
++#else
+                          enum nl80211_iftype type, u32 *flags,
++#endif
+    struct vif_params *params)
+ {
+ 	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
+@@ -2361,12 +2370,26 @@
+                     const wl_event_msg_t *e, void *data)
+ {
+ 	struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++	struct cfg80211_roam_info roam_info = {};
++#endif
+ 	s32 err = 0;
+ 
+ 	wl_get_assoc_ies(wl);
+ 	memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
+ 	memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
+ 	wl_update_bss_info(wl);
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++	roam_info.channel = &wl->conf->channel,
++	roam_info.bssid = (u8 *)&wl->bssid,
++	roam_info.req_ie = conn_info->req_ie,
++	roam_info.req_ie_len = conn_info->req_ie_len,
++	roam_info.resp_ie = conn_info->resp_ie,
++	roam_info.resp_ie_len = conn_info->resp_ie_len,
++
++	cfg80211_roamed(ndev, &roam_info, GFP_KERNEL);
++#else
+ 	cfg80211_roamed(ndev,
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
+ 			&wl->conf->channel,	 
+@@ -2374,6 +2397,7 @@
+ 			(u8 *)&wl->bssid,
+ 			conn_info->req_ie, conn_info->req_ie_len,
+ 			conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
++#endif
+ 	WL_DBG(("Report roaming result\n"));
+ 
+ 	set_bit(WL_STATUS_CONNECTED, &wl->status);


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2017-06-10 23:20 Matt Turner
  0 siblings, 0 replies; 10+ messages in thread
From: Matt Turner @ 2017-06-10 23:20 UTC (permalink / raw
  To: gentoo-commits

commit:     0272772c6bcb89b49774dedd7eda8dee26d905b1
Author:     Yehoshua Pesach Wallach <yehoshuapw <AT> gmail <DOT> com>
AuthorDate: Thu Jun  1 18:37:54 2017 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 22:28:30 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0272772c

net-wireless/broadcom-sta: apply archlinux patch fixing bugs for kernel 4.11

https://bugs.archlinux.org/task/53974
https://aur.archlinux.org/cgit/aur.git/tree/linux411.patch?h=broadcom-wl

Package-Manager: Portage-2.3.5, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4822

 .../broadcom-sta-6.30.223.271-r4.ebuild            |  3 +-
 .../broadcom-sta-6.30.223.271-r4-linux-4.11.patch  | 52 ++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
index 91929969983..d86dba144a2 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
@@ -65,7 +65,8 @@ src_prepare() {
 		"${FILESDIR}/${PN}-6.30.223.271-r1-linux-3.18.patch" \
 		"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch" \
 		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch"
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch"
 
 	epatch_user
 }

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.11.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.11.patch
new file mode 100644
index 00000000000..a779f8c84cf
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.11.patch
@@ -0,0 +1,52 @@
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index a9671e2..da36405 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -30,6 +30,9 @@
+ #include <linux/kthread.h>
+ #include <linux/netdevice.h>
+ #include <linux/ieee80211.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++#include <linux/sched/signal.h>
++#endif
+ #include <net/cfg80211.h>
+ #include <linux/nl80211.h>
+ #include <net/rtnetlink.h>
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 489c9f5..f8278ad 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -117,6 +117,9 @@ int wl_found = 0;
+ 
+ typedef struct priv_link {
+ 	wl_if_t *wlif;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++	unsigned long last_rx;
++#endif
+ } priv_link_t;
+ 
+ #define WL_DEV_IF(dev)          ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif)
+@@ -2450,6 +2453,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
+ {
+ 	struct sk_buff *oskb = (struct sk_buff *)p;
+ 	struct sk_buff *skb;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++	priv_link_t *priv_link;
++#endif
+ 	uchar *pdata;
+ 	uint len;
+ 
+@@ -2916,7 +2922,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
+ 	if (skb == NULL) return;
+ 
+ 	skb->dev = wl->monitor_dev;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++	priv_link = MALLOC(wl->osh, sizeof(priv_link_t));
++	priv_link = netdev_priv(skb->dev);
++	priv_link->last_rx = jiffies;
++#else
+ 	skb->dev->last_rx = jiffies;
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
+ 	skb_reset_mac_header(skb);
+ #else


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2023-06-24 16:13 Mike Pagano
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Pagano @ 2023-06-24 16:13 UTC (permalink / raw
  To: gentoo-commits

commit:     b1469bc903cac37bff61b41532127110909d5f57
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 24 16:09:49 2023 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Sat Jun 24 16:09:49 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1469bc9

net-wireless/broadcom-sta: add 6.30.223.271-r7

Bump to EAPI-8
Migrate to linux-mod-r1
Include arch patches
Address pkgcheck errors concerning S in pkg_setup
Fix compilation errors

Thanks to the following users that provided patches
ShadowOne333
Alan Kyder

Closes: https://bugs.gentoo.org/836093
Closes: https://bugs.gentoo.org/852569
Closes: https://bugs.gentoo.org/836165
Closes: https://bugs.gentoo.org/839648
Closes: https://bugs.gentoo.org/908711

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 .../broadcom-sta-6.30.223.271-r7.ebuild            | 103 ++++++++++
 .../broadcom-sta/files/001-null-pointer-fix.patch  |  48 +++++
 net-wireless/broadcom-sta/files/002-rdtscl.patch   |  22 +++
 net-wireless/broadcom-sta/files/003-linux47.patch  | 109 +++++++++++
 net-wireless/broadcom-sta/files/004-linux48.patch  |  64 +++++++
 .../files/005-debian-fix-kernel-warnings.patch     | 161 ++++++++++++++++
 net-wireless/broadcom-sta/files/006-linux411.patch |  27 +++
 net-wireless/broadcom-sta/files/007-linux412.patch |  78 ++++++++
 net-wireless/broadcom-sta/files/008-linux415.patch |  46 +++++
 .../files/009-fix_mac_profile_discrepancy.patch    |  14 ++
 net-wireless/broadcom-sta/files/010-linux56.patch  |  55 ++++++
 net-wireless/broadcom-sta/files/011-linux59.patch  | 211 +++++++++++++++++++++
 net-wireless/broadcom-sta/files/012-linux517.patch |  80 ++++++++
 net-wireless/broadcom-sta/files/013-linux518.patch |  71 +++++++
 net-wireless/broadcom-sta/files/014-linux414.patch |  37 ++++
 net-wireless/broadcom-sta/files/015-linux600.patch |  31 +++
 net-wireless/broadcom-sta/files/016-linux601.patch |  90 +++++++++
 .../broadcom-sta/files/broadcom-sta-modules.conf   |  17 ++
 18 files changed, 1264 insertions(+)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r7.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r7.ebuild
new file mode 100644
index 000000000000..efe1beb913de
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r7.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit linux-mod-r1
+
+DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+HOMEPAGE="https://www.broadcom.com/support/802.11"
+SRC_BASE="https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35"
+SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz )
+	amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )
+	https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/README_${PV}.txt -> README-${P}.txt"
+
+LICENSE="Broadcom"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/linux-sources"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+PATCHES=(
+	"${FILESDIR}/001-null-pointer-fix.patch"
+	"${FILESDIR}/002-rdtscl.patch"
+	"${FILESDIR}/003-linux47.patch"
+	"${FILESDIR}/004-linux48.patch"
+	"${FILESDIR}/005-debian-fix-kernel-warnings.patch"
+	"${FILESDIR}/006-linux411.patch"
+	"${FILESDIR}/007-linux412.patch"
+	"${FILESDIR}/008-linux415.patch"
+	"${FILESDIR}/009-fix_mac_profile_discrepancy.patch"
+	"${FILESDIR}/010-linux56.patch"
+	"${FILESDIR}/011-linux59.patch"
+	"${FILESDIR}/012-linux517.patch"
+	"${FILESDIR}/013-linux518.patch"
+	"${FILESDIR}/014-linux414.patch"
+	"${FILESDIR}/015-linux600.patch"
+	"${FILESDIR}/016-linux601.patch"
+)
+
+pkg_pretend() {
+	ewarn
+	ewarn "If you are stuck using this unmaintained driver (likely in a MacBook),"
+	ewarn "you may be interested to know that a newer compatible wireless card"
+	ewarn "is supported by the in-tree brcmfmac driver. It has a model number "
+	ewarn "BCM943602CS and is for sale on the second hand market for less than "
+	ewarn "20 USD."
+	ewarn
+	ewarn "See https://wikidevi.com/wiki/Broadcom_Wireless_Adapters and"
+	ewarn "    https://wikidevi.com/wiki/Broadcom_BCM943602CS"
+	ewarn "for more information."
+	ewarn
+}
+
+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 ~!X86_INTEL_LPSS"
+	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."
+	ERROR_X86_INTEL_LPSS="X86_INTEL_LPSS: Please disable it. The module does not work with it enabled."
+	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-r1_pkg_setup
+}
+
+src_compile() {
+	local modlist=( wl )
+	local modargs=(
+			-C ${KV_DIR} M="${S}"
+	)
+
+	linux-mod-r1_src_compile
+}
+
+src_install() {
+	linux-mod-r1_src_install
+
+	insinto /etc/modprobe.d
+	newins "${FILESDIR}"/broadcom-sta-modules.conf wl.conf
+	dodoc "${DISTDIR}/README-${P}.txt"
+}

diff --git a/net-wireless/broadcom-sta/files/001-null-pointer-fix.patch b/net-wireless/broadcom-sta/files/001-null-pointer-fix.patch
new file mode 100644
index 000000000000..0ebe1e242243
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/001-null-pointer-fix.patch
@@ -0,0 +1,48 @@
+Description: Fixing null pointer crash
+
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773713
+Bug-Ubuntu: https://launchpad.net/bugs/1415880
+Last-Update: 2015-08-18
+
+---
+ src/wl/sys/wl_linux.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 860b935..295156f 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -2157,8 +2157,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
+ 	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);
+ 
+-- 
+1.9.1
+
+--- a/src/wl/sys/wl_linux.a	2023-04-16 23:06:52.255588442 -0500
++++ b/src/wl/sys/wl_linux.c	2023-04-16 23:07:22.315309655 -0500
+@@ -737,9 +737,6 @@
+ 		dev->name, device,
+ 		WL_ALL_PASSIVE_ENAB(wl) ?  ", Passive Mode" : "", EPI_VERSION_STR);
+ 
+-#ifdef BCMDBG
+-	printf(" (Compiled in " SRCBASE " at " __TIME__ " on " __DATE__ ")");
+-#endif 
+ 	printf("\n");
+ 
+ 	wl_found++;
+@@ -2098,7 +2095,7 @@
+ wl_dump_ver(wl_info_t *wl, struct bcmstrbuf *b)
+ {
+ 	bcm_bprintf(b, "wl%d: %s %s version %s\n", wl->pub->unit,
+-		__DATE__, __TIME__, EPI_VERSION_STR);
++		"X", "Y", EPI_VERSION_STR);
+ }
+ 
+ #if defined(BCMDBG)

diff --git a/net-wireless/broadcom-sta/files/002-rdtscl.patch b/net-wireless/broadcom-sta/files/002-rdtscl.patch
new file mode 100644
index 000000000000..1b9862cc3d8d
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/002-rdtscl.patch
@@ -0,0 +1,22 @@
+Since Linux 4.3, rdtscl() is no longer available and native_read_tsc()
+is renamed to rdtsc(). Move the macro contents in-line and call the
+new function. References:
+
+https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
+https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
+
+diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+--- a/src/shared/linux_osl.c	2015-09-19 01:47:15.000000000 +0300
++++ b/src/shared/linux_osl.c	2015-11-21 15:20:30.585902518 +0200
+@@ -932,7 +932,11 @@
+ 	uint cycles;
+ 
+ #if defined(__i386__)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
++	cycles = (u32)rdtsc();
++#else
+ 	rdtscl(cycles);
++#endif
+ #else
+ 	cycles = 0;
+ #endif 

diff --git a/net-wireless/broadcom-sta/files/003-linux47.patch b/net-wireless/broadcom-sta/files/003-linux47.patch
new file mode 100644
index 000000000000..566680a09140
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/003-linux47.patch
@@ -0,0 +1,109 @@
+Since Linux 4.7, the enum ieee80211_band is no longer used
+
+This shall cause no problem's since both enums ieee80211_band
+and nl80211_band were added in the same commit:
+https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
+
+This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
+
+Reference:
+https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
+
+--- a/src/wl/sys/wl_cfg80211_hybrid.c	2016-06-13 11:57:36.159340297 -0500
++++ b/src/wl/sys/wl_cfg80211_hybrid.c	2016-06-13 11:58:18.442323435 -0500
+@@ -236,7 +236,7 @@
+ #endif				
+ 
+ #define CHAN2G(_channel, _freq, _flags) {			\
+-	.band			= IEEE80211_BAND_2GHZ,		\
++	.band			= NL80211_BAND_2GHZ,		\
+ 	.center_freq		= (_freq),			\
+ 	.hw_value		= (_channel),			\
+ 	.flags			= (_flags),			\
+@@ -245,7 +245,7 @@
+ }
+ 
+ #define CHAN5G(_channel, _flags) {				\
+-	.band			= IEEE80211_BAND_5GHZ,		\
++	.band			= NL80211_BAND_5GHZ,		\
+ 	.center_freq		= 5000 + (5 * (_channel)),	\
+ 	.hw_value		= (_channel),			\
+ 	.flags			= (_flags),			\
+@@ -379,7 +379,7 @@
+ };
+ 
+ static struct ieee80211_supported_band __wl_band_2ghz = {
+-	.band = IEEE80211_BAND_2GHZ,
++	.band = NL80211_BAND_2GHZ,
+ 	.channels = __wl_2ghz_channels,
+ 	.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
+ 	.bitrates = wl_g_rates,
+@@ -387,7 +387,7 @@
+ };
+ 
+ static struct ieee80211_supported_band __wl_band_5ghz_a = {
+-	.band = IEEE80211_BAND_5GHZ,
++	.band = NL80211_BAND_5GHZ,
+ 	.channels = __wl_5ghz_a_channels,
+ 	.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
+ 	.bitrates = wl_a_rates,
+@@ -395,7 +395,7 @@
+ };
+ 
+ static struct ieee80211_supported_band __wl_band_5ghz_n = {
+-	.band = IEEE80211_BAND_5GHZ,
++	.band = NL80211_BAND_5GHZ,
+ 	.channels = __wl_5ghz_n_channels,
+ 	.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
+ 	.bitrates = wl_a_rates,
+@@ -1876,8 +1876,8 @@
+ 	wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
+ #endif
+ 	wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
+-	wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
+-	wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
++	wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
++	wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
+ 	wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
+ 	wdev->wiphy->cipher_suites = __wl_cipher_suites;
+ 	wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
+@@ -2000,7 +2000,7 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+ 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
+ 		(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
+-		IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
++		NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
+ #else
+ 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
+ #endif
+@@ -2116,7 +2116,7 @@
+ 				return err;
+ 			}
+ 			chan = wf_chspec_ctlchan(chanspec);
+-			band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
++			band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
+ 			freq = ieee80211_channel_to_frequency(chan, band);
+ 			channel = ieee80211_get_channel(wiphy, freq);
+ 			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
+@@ -2250,10 +2250,10 @@
+ 		join_params->params.chanspec_list[0] =
+ 		    ieee80211_frequency_to_channel(chan->center_freq);
+ 
+-		if (chan->band == IEEE80211_BAND_2GHZ) {
++		if (chan->band == NL80211_BAND_2GHZ) {
+ 			chanspec |= WL_CHANSPEC_BAND_2G;
+ 		}
+-		else if (chan->band == IEEE80211_BAND_5GHZ) {
++		else if (chan->band == NL80211_BAND_5GHZ) {
+ 			chanspec |= WL_CHANSPEC_BAND_5G;
+ 		}
+ 		else {
+@@ -2885,7 +2885,7 @@
+ 
+ 	if (phy == 'n' || phy == 'a' || phy == 'v') {
+ 		wiphy = wl_to_wiphy(wl);
+-		wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
++		wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
+ 	}
+ 
+ 	return err;

diff --git a/net-wireless/broadcom-sta/files/004-linux48.patch b/net-wireless/broadcom-sta/files/004-linux48.patch
new file mode 100644
index 000000000000..20e8a9ae49d2
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/004-linux48.patch
@@ -0,0 +1,64 @@
+From d3f93542326a06d920c6eb89b703384290d37b8b Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Fri, 2 Sep 2016 17:35:34 +0200
+Subject: [PATCH 1/1] Add support for Linux 4.8
+
+Orginal author: Krzysztof Kolasa
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 2fc71fe..ec5e472 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2388,8 +2388,16 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 	s32 err = 0;
+ 
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = true,
++		};
++		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
+ 		cfg80211_scan_done(wl->scan_request, true);     
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
+@@ -2490,7 +2498,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 
+ scan_done_out:
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = false,
++		};
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		cfg80211_scan_done(wl->scan_request, false);
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 	rtnl_unlock();
+@@ -2909,7 +2924,14 @@ s32 wl_cfg80211_down(struct net_device *ndev)
+ 	s32 err = 0;
+ 
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = true,
++		};
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		cfg80211_scan_done(wl->scan_request, true);	
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
+-- 
+2.7.4
+

diff --git a/net-wireless/broadcom-sta/files/005-debian-fix-kernel-warnings.patch b/net-wireless/broadcom-sta/files/005-debian-fix-kernel-warnings.patch
new file mode 100644
index 000000000000..e9bf66a959b8
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/005-debian-fix-kernel-warnings.patch
@@ -0,0 +1,161 @@
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -1968,7 +1968,7 @@
+ 
+ 	if (dtoh32(bi->length) > WL_BSS_INFO_MAX) {
+ 		WL_DBG(("Beacon is larger than buffer. Discarding\n"));
+-		return err;
++		return -E2BIG;
+ 	}
+ 	notif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) - sizeof(u8) +
+ 	                         WL_BSS_INFO_MAX, GFP_KERNEL);
+@@ -1992,9 +1992,15 @@
+ 	beacon_proberesp->capab_info = cpu_to_le16(bi->capability);
+ 	wl_rst_ie(wl);
+ 
+-	wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
+-	wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
++	err = wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
++	if (err)
++		goto inform_single_bss_out;
++
++	err = wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
+ 	         offsetof(struct wl_cfg80211_bss_info, frame_buf));
++	if (err)
++		goto inform_single_bss_out;
++
+ 	notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +
+ 	                            wl_get_ielen(wl);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+@@ -2006,14 +2012,14 @@
+ #endif
+ 	if (freq == 0) {
+ 		WL_ERR(("Invalid channel, fail to chcnage channel to freq\n"));
+-		kfree(notif_bss_info);
+-		return -EINVAL;
++		err = -EINVAL;
++		goto inform_single_bss_out;
+ 	}
+ 	channel = ieee80211_get_channel(wiphy, freq);
+ 	if (unlikely(!channel)) {
+ 		WL_ERR(("ieee80211_get_channel error\n"));
+-		kfree(notif_bss_info);
+-		return -EINVAL;
++		err = -EINVAL;
++		goto inform_single_bss_out;
+ 	}
+ 
+ 	WL_DBG(("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\n",
+@@ -2021,28 +2027,37 @@
+ 		mgmt->u.beacon.capab_info, &bi->BSSID));
+ 
+ 	signal = notif_bss_info->rssi * 100;
+-	cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
+-	    le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
+-	if (unlikely(!cbss)) {
+-		WL_ERR(("cfg80211_inform_bss_frame error\n"));
+-		kfree(notif_bss_info);
+-		return -EINVAL;
+-	}
+ 
+-	notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+-	notify_ielen = le32_to_cpu(bi->ie_length);
++	if (!wl->scan_request) {
++		cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
++			le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
++		if (unlikely(!cbss)) {
++			WL_ERR(("cfg80211_inform_bss_frame error\n"));
++			err = -ENOMEM;
++			goto inform_single_bss_out;
++		}
++	} else {
++		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);
++		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);
++		cbss = cfg80211_inform_bss(wiphy, channel,
++				wl->active_scan ?
++				CFG80211_BSS_FTYPE_PRESP : CFG80211_BSS_FTYPE_BEACON,
++				(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;
++		if (unlikely(!cbss)) {
++			WL_ERR(("cfg80211_inform_bss error\n"));
++			err = -ENOMEM;
++			goto inform_single_bss_out;
++		}
++	}
+ 
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
+ 	cfg80211_put_bss(wiphy, cbss);
+@@ -2050,6 +2065,7 @@
+ 	cfg80211_put_bss(cbss);
+ #endif
+ 
++inform_single_bss_out:
+ 	kfree(notif_bss_info);
+ 
+ 	return err;
+@@ -2316,6 +2332,9 @@
+ 		if (err)
+ 			goto update_bss_info_out;
+ 
++		bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
++		      ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
++
+ 		ie = ((u8 *)bi) + bi->ie_offset;
+ 		ie_len = bi->ie_length;
+ 	} else {
+@@ -2328,11 +2347,18 @@
+ 		ie_len = bss->len_information_elements;
+ #endif
+ 		wl->conf->channel = *bss->channel;
++	}
++
++	if (bss) {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
+ 		cfg80211_put_bss(wiphy, bss);
+ #else
+ 		cfg80211_put_bss(bss);
+ #endif
++	} else {
++		WL_DBG(("Could not update BSS\n"));
++		err = -EINVAL;
++		goto update_bss_info_out;
+ 	}
+ 
+ 	tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
+@@ -2360,10 +2386,17 @@
+ 	struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
+ 	s32 err = 0;
+ 
+-	wl_get_assoc_ies(wl);
++	err = wl_get_assoc_ies(wl);
++	if (err)
++		return err;
++
+ 	memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
+ 	memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
+-	wl_update_bss_info(wl);
++
++	err = wl_update_bss_info(wl);
++	if (err)
++		return err;
++
+ 	cfg80211_roamed(ndev,
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
+ 			&wl->conf->channel,	 

diff --git a/net-wireless/broadcom-sta/files/006-linux411.patch b/net-wireless/broadcom-sta/files/006-linux411.patch
new file mode 100644
index 000000000000..7a2e8c0c6cb0
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/006-linux411.patch
@@ -0,0 +1,27 @@
+diff -u sys0/wl_cfg80211_hybrid.c sys/wl_cfg80211_hybrid.c
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -39,6 +39,10 @@
+ #include <proto/802.11.h>
+ #include <wl_cfg80211_hybrid.h>
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++#include <linux/sched/signal.h>
++#endif
++
+ #define EVENT_TYPE(e) dtoh32((e)->event_type)
+ #define EVENT_FLAGS(e) dtoh16((e)->flags)
+ #define EVENT_STATUS(e) dtoh32((e)->status)
+diff -u sys0/wl_linux.c sys/wl_linux.c
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -2915,7 +2915,9 @@
+ 	if (skb == NULL) return;
+ 
+ 	skb->dev = wl->monitor_dev;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ 	skb->dev->last_rx = jiffies;
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
+ 	skb_reset_mac_header(skb);
+ #else

diff --git a/net-wireless/broadcom-sta/files/007-linux412.patch b/net-wireless/broadcom-sta/files/007-linux412.patch
new file mode 100644
index 000000000000..1673f063cdb5
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/007-linux412.patch
@@ -0,0 +1,78 @@
+From 0b888bf115612074df99654140a1980111c29748 Mon Sep 17 00:00:00 2001
+From: Antoine Cotten <tonio.cotten@gmail.com>
+Date: Fri, 7 Jul 2017 15:17:47 +0200
+Subject: [PATCH] Apply patch from Debian bug #867258
+
+Compile fix with kernel 4.12
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867258
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 29 +++++++++++++++++++++++++----
+ 1 file changed, 25 insertions(+), 4 deletions(-)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index c46944a..1a9840a 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -53,7 +53,11 @@ u32 wl_dbg_level = WL_DBG_ERR;
+ #endif
+ 
+ static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
+-           enum nl80211_iftype type, u32 *flags, struct vif_params *params);
++           enum nl80211_iftype type,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
++           u32 *flags,
++#endif
++	   struct vif_params *params);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
+ static s32
+ wl_cfg80211_scan(struct wiphy *wiphy,
+@@ -466,8 +470,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
+ 
+ static s32
+ wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
+-                         enum nl80211_iftype type, u32 *flags,
+-   struct vif_params *params)
++                         enum nl80211_iftype type,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
++                         u32 *flags,
++#endif
++                         struct vif_params *params)
+ {
+ 	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
+ 	struct wireless_dev *wdev;
+@@ -2387,6 +2394,15 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+                     const wl_event_msg_t *e, void *data)
+ {
+ 	struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++	struct cfg80211_roam_info roam_info = {
++		.bssid = wl->profile->bssid,
++		.req_ie = conn_info->req_ie,
++		.req_ie_len = conn_info->req_ie_len,
++		.resp_ie = conn_info->resp_ie,
++		.resp_ie_len = conn_info->resp_ie_len,
++	};
++#endif
+ 	s32 err = 0;
+ 
+ 	err = wl_get_assoc_ies(wl);
+@@ -2401,12 +2417,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 		return err;
+ 
+ 	cfg80211_roamed(ndev,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++			&roam_info,
++#else
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
+ 			&wl->conf->channel,	 
+ #endif
+ 			(u8 *)&wl->bssid,
+ 			conn_info->req_ie, conn_info->req_ie_len,
+-			conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
++			conn_info->resp_ie, conn_info->resp_ie_len,
++#endif
++			GFP_KERNEL);
+ 	WL_DBG(("Report roaming result\n"));
+ 
+ 	set_bit(WL_STATUS_CONNECTED, &wl->status);
+

diff --git a/net-wireless/broadcom-sta/files/008-linux415.patch b/net-wireless/broadcom-sta/files/008-linux415.patch
new file mode 100644
index 000000000000..1bced2f68ab1
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/008-linux415.patch
@@ -0,0 +1,46 @@
+--- a/src/wl/sys/wl_linux.c	2017-07-17 00:11:24.000000000 +0100
++++ b/src/wl/sys/wl_linux.c	2018-01-27 09:49:47.057799596 +0000
+@@ -93,7 +93,11 @@
+ 
+ #include <wlc_wowl.h>
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++static void wl_timer(struct timer_list *tl);
++#else
+ static void wl_timer(ulong data);
++#endif
+ static void _wl_timer(wl_timer_t *t);
+ static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
+ 
+@@ -2297,10 +2301,17 @@
+ 	atomic_dec(&t->wl->callbacks);
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++static void
++wl_timer(struct timer_list *tl)
++{
++	wl_timer_t *t = (wl_timer_t *)tl;
++#else
+ static void
+ wl_timer(ulong data)
+ {
+ 	wl_timer_t *t = (wl_timer_t *)data;
++#endif
+ 
+ 	if (!WL_ALL_PASSIVE_ENAB(t->wl))
+ 		_wl_timer(t);
+@@ -2352,9 +2363,13 @@
+ 
+ 	bzero(t, sizeof(wl_timer_t));
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++	timer_setup(&t->timer, wl_timer, 0);
++#else
+ 	init_timer(&t->timer);
+ 	t->timer.data = (ulong) t;
+ 	t->timer.function = wl_timer;
++#endif
+ 	t->wl = wl;
+ 	t->fn = fn;
+ 	t->arg = arg;

diff --git a/net-wireless/broadcom-sta/files/009-fix_mac_profile_discrepancy.patch b/net-wireless/broadcom-sta/files/009-fix_mac_profile_discrepancy.patch
new file mode 100644
index 000000000000..4260eba5057a
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/009-fix_mac_profile_discrepancy.patch
@@ -0,0 +1,14 @@
+--- a/src/wl/sys/wl_cfg80211_hybrid.c	2015-09-19 00:47:30.000000000 +0200
++++ b/src/wl/sys/wl_cfg80211_hybrid.c	2018-11-14 14:06:03.313487995 +0100
+@@ -1444,11 +1444,10 @@
+ 	s32 rate;
+ 	s32 err = 0;
+ 
+ 	if (memcmp(mac, wl->profile->bssid, ETHER_ADDR_LEN)) {
+ 		WL_ERR(("Wrong Mac address, mac = %pM   profile =%pM\n", mac, wl->profile->bssid));
+-		return -ENOENT;
+ 	}
+ 
+ 	err = wl_dev_ioctl(dev, WLC_GET_RATE, &rate, sizeof(rate));
+ 	if (err) {
+ 		WL_DBG(("Could not get rate (%d)\n", err));

diff --git a/net-wireless/broadcom-sta/files/010-linux56.patch b/net-wireless/broadcom-sta/files/010-linux56.patch
new file mode 100644
index 000000000000..f8d5783819cd
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/010-linux56.patch
@@ -0,0 +1,55 @@
+diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+index 6157d18..8237ec7 100644
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
+@@ -942,7 +942,7 @@ osl_getcycles(void)
+ void *
+ osl_reg_map(uint32 pa, uint size)
+ {
+-	return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
++	return (ioremap((unsigned long)pa, (unsigned long)size));
+ }
+ 
+ void
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 0d05100..2ed1f0d 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -582,7 +582,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
+ 	}
+ 	wl->bcm_bustype = bustype;
+ 
+-	if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
++	if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
+ 		WL_ERROR(("wl%d: ioremap() failed\n", unit));
+ 		goto fail;
+ 	}
+@@ -772,7 +772,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ 	if ((val & 0x0000ff00) != 0)
+ 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
+ 		bar1_size = pci_resource_len(pdev, 2);
+-		bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
++		bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
+ 			bar1_size);
+ 	wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
+ 		pdev->irq, bar1_addr, bar1_size);
+@@ -3335,12 +3335,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
+ }
+ 
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++static struct proc_ops wl_fops = {
++        .proc_read     = wl_proc_read,
++        .proc_write    = wl_proc_write,
++};
++#else
+ static const struct file_operations wl_fops = {
+ 	.owner	= THIS_MODULE,
+ 	.read	= wl_proc_read,
+ 	.write	= wl_proc_write,
+ };
+ #endif
++#endif
+ 
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)

diff --git a/net-wireless/broadcom-sta/files/011-linux59.patch b/net-wireless/broadcom-sta/files/011-linux59.patch
new file mode 100644
index 000000000000..6ef476464c0c
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/011-linux59.patch
@@ -0,0 +1,211 @@
+From f3d652840f8dd959395065a1cf67ca40b04ec69b Mon Sep 17 00:00:00 2001
+From: Joan Bruguera <joanbrugueram@gmail.com>
+Date: Tue, 13 Oct 2020 19:35:55 +0200
+Subject: [PATCH] Get rid of get_fs/set_fs calls in Broadcom WL driver.
+
+Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1)
+
+Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux.
+
+NB: Some checks in wlc_ioctl_internal are likely superfluous,
+    but I'm not familiar enough with the driver to remove them with confidence.
+
+See also: https://lwn.net/Articles/722267/
+          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47058bb54b57962b3958a936ddbc59355e4c5504
+          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5
+
+Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 25 ++-------------------
+ src/wl/sys/wl_iw.c              | 25 ++-------------------
+ src/wl/sys/wl_linux.c           | 40 ++++++++++++++++++++++++++++-----
+ src/wl/sys/wl_linux.h           |  2 ++
+ src/wl/sys/wlc_pub.h            |  1 +
+ 5 files changed, 42 insertions(+), 51 deletions(-)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 7b606e0..1e0adb7 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -38,6 +38,7 @@
+ #include <wlioctl.h>
+ #include <proto/802.11.h>
+ #include <wl_cfg80211_hybrid.h>
++#include <wl_linux.h>
+ 
+ #define EVENT_TYPE(e) dtoh32((e)->event_type)
+ #define EVENT_FLAGS(e) dtoh16((e)->flags)
+@@ -435,30 +436,7 @@ static void key_endian_to_host(struct wl_wsec_key *key)
+ static s32
+ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
+ {
+-	struct ifreq ifr;
+-	struct wl_ioctl ioc;
+-	mm_segment_t fs;
+-	s32 err = 0;
+-
+-	BUG_ON(len < sizeof(int));
+-
+-	memset(&ioc, 0, sizeof(ioc));
+-	ioc.cmd = cmd;
+-	ioc.buf = arg;
+-	ioc.len = len;
+-	strcpy(ifr.ifr_name, dev->name);
+-	ifr.ifr_data = (caddr_t)&ioc;
+-
+-	fs = get_fs();
+-	set_fs(get_ds());
+-#if defined(WL_USE_NETDEV_OPS)
+-	err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#else
+-	err = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#endif
+-	set_fs(fs);
+-
+-	return err;
++	return wlc_ioctl_internal(dev, cmd, arg, len);
+ }
+ 
+ static s32
+diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
+index c4c610b..e346b15 100644
+--- a/src/wl/sys/wl_iw.c
++++ b/src/wl/sys/wl_iw.c
+@@ -37,6 +37,7 @@ typedef const struct si_pub	si_t;
+ 
+ #include <wl_dbg.h>
+ #include <wl_iw.h>
++#include <wl_linux.h>
+ 
+ extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
+ 	uint32 reason, char* stringBuf, uint buflen);
+@@ -103,29 +104,7 @@ dev_wlc_ioctl(
+ 	int len
+ )
+ {
+-	struct ifreq ifr;
+-	wl_ioctl_t ioc;
+-	mm_segment_t fs;
+-	int ret;
+-
+-	memset(&ioc, 0, sizeof(ioc));
+-	ioc.cmd = cmd;
+-	ioc.buf = arg;
+-	ioc.len = len;
+-
+-	strcpy(ifr.ifr_name, dev->name);
+-	ifr.ifr_data = (caddr_t) &ioc;
+-
+-	fs = get_fs();
+-	set_fs(get_ds());
+-#if defined(WL_USE_NETDEV_OPS)
+-	ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#else
+-	ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
+-#endif
+-	set_fs(fs);
+-
+-	return ret;
++	return wlc_ioctl_internal(dev, cmd, arg, len);
+ }
+ 
+ static int
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 947cef3..f04c148 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -1643,10 +1643,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ 		goto done2;
+ 	}
+ 
+-	if (segment_eq(get_fs(), KERNEL_DS))
+-		buf = ioc.buf;
+-
+-	else if (ioc.buf) {
++	if (ioc.buf) {
+ 		if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
+ 			bcmerror = BCME_NORESOURCE;
+ 			goto done2;
+@@ -1667,7 +1664,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ 	WL_UNLOCK(wl);
+ 
+ done1:
+-	if (ioc.buf && (ioc.buf != buf)) {
++	if (ioc.buf) {
+ 		if (copy_to_user(ioc.buf, buf, ioc.len))
+ 			bcmerror = BCME_BADADDR;
+ 		MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
+@@ -1680,6 +1677,39 @@ done2:
+ 	return (OSL_ERROR(bcmerror));
+ }
+ 
++int
++wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len)
++{
++	wl_info_t *wl;
++	wl_if_t *wlif;
++	int bcmerror;
++
++	if (!dev)
++		return -ENETDOWN;
++
++	wl = WL_INFO(dev);
++	wlif = WL_DEV_IF(dev);
++	if (wlif == NULL || wl == NULL || wl->dev == NULL)
++		return -ENETDOWN;
++
++	bcmerror = 0;
++
++	WL_TRACE(("wl%d: wlc_ioctl_internal: cmd 0x%x\n", wl->pub->unit, cmd));
++
++	WL_LOCK(wl);
++	if (!capable(CAP_NET_ADMIN)) {
++		bcmerror = BCME_EPERM;
++	} else {
++		bcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif);
++	}
++	WL_UNLOCK(wl);
++
++	ASSERT(VALID_BCMERROR(bcmerror));
++	if (bcmerror != 0)
++		wl->pub->bcmerror = bcmerror;
++	return (OSL_ERROR(bcmerror));
++}
++
+ static struct net_device_stats*
+ wl_get_stats(struct net_device *dev)
+ {
+diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
+index 5b1048e..c8c1f41 100644
+--- a/src/wl/sys/wl_linux.h
++++ b/src/wl/sys/wl_linux.h
+@@ -22,6 +22,7 @@
+ #define _wl_linux_h_
+ 
+ #include <wlc_types.h>
++#include <wlc_pub.h>
+ 
+ typedef struct wl_timer {
+ 	struct timer_list 	timer;
+@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs);
+ extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
+ extern void wl_free(wl_info_t *wl);
+ extern int  wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
++extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len);
+ extern struct net_device * wl_netdev_get(wl_info_t *wl);
+ 
+ #endif 
+diff --git a/src/wl/sys/wlc_pub.h b/src/wl/sys/wlc_pub.h
+index 53a98b8..2b5a029 100644
+--- a/src/wl/sys/wlc_pub.h
++++ b/src/wl/sys/wlc_pub.h
+@@ -24,6 +24,7 @@
+ 
+ #include <wlc_types.h>
+ #include <wlc_utils.h>
++#include <siutils.h>
+ #include "proto/802.11.h"
+ #include "proto/bcmevent.h"
+ 
+--
+2.28.0

diff --git a/net-wireless/broadcom-sta/files/012-linux517.patch b/net-wireless/broadcom-sta/files/012-linux517.patch
new file mode 100644
index 000000000000..6f23316691c8
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/012-linux517.patch
@@ -0,0 +1,80 @@
+From 31b7849092c43805c7fbaf7518b99874aa1b310c Mon Sep 17 00:00:00 2001
+From: Joan Bruguera <joanbrugueram@gmail.com>
+Date: Wed, 12 Jan 2022 20:49:20 +0100
+Subject: [PATCH] Tentative fix for broadcom-wl 6.30.223.271 driver for Linux 5.17-rc1
+
+Set netdev->dev_addr through dev_addr_mod + PDE_DATA fix
+
+Since Linux 5.17 netdev->dev_addr is const and must be changed through
+dev_addr_mod, otherwise a warning is logged in dmesg and bad things may happen.
+
+NB: The #if is not wrong, dev_addr_mod is defined since Linux 5.15-rc1
+
+Plus a trivial fix for PDE_DATA.
+
+Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-28 on Arch Linux.
+
+See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adeef3e32146a8d2a73c399dc6f5d76a449131b1
+          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=359745d78351c6f5442435f81549f0207ece28aa
+---
+ src/wl/sys/wl_linux.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index e491df7..e4614fb 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -93,6 +93,10 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev);
+ 
+ #include <wlc_wowl.h>
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
++#define PDE_DATA pde_data
++#endif
++
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+ static void wl_timer(struct timer_list *tl);
+ #else
+@@ -490,6 +494,12 @@ wl_if_setup(struct net_device *dev)
+ #endif
+ }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
++static inline void eth_hw_addr_set(struct net_device *dev, const void *addr) {
++	memcpy(dev->dev_addr, addr, ETHER_ADDR_LEN);
++}
++#endif
++
+ static wl_info_t *
+ wl_attach(uint16 vendor, uint16 device, ulong regs,
+ 	uint bustype, void *btparam, uint irq, uchar* bar1_addr, uint32 bar1_size)
+@@ -634,7 +644,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
+ 			WL_ERROR(("wl%d: Error setting MAC ADDRESS\n", unit));
+ 	}
+ #endif 
+-	bcopy(&wl->pub->cur_etheraddr, dev->dev_addr, ETHER_ADDR_LEN);
++	eth_hw_addr_set(dev, wl->pub->cur_etheraddr.octet);
+ 
+ 	online_cpus = 1;
+ 
+@@ -1835,7 +1845,7 @@ wl_set_mac_address(struct net_device *dev, void *addr)
+ 
+ 	WL_LOCK(wl);
+ 
+-	bcopy(sa->sa_data, dev->dev_addr, ETHER_ADDR_LEN);
++	eth_hw_addr_set(dev, sa->sa_data);
+ 	err = wlc_iovar_op(wl->wlc, "cur_etheraddr", NULL, 0, sa->sa_data, ETHER_ADDR_LEN,
+ 		IOV_SET, (WL_DEV_IF(dev))->wlcif);
+ 	WL_UNLOCK(wl);
+@@ -3010,7 +3020,7 @@ _wl_add_monitor_if(wl_task_t *task)
+ 	else
+ 		dev->type = ARPHRD_IEEE80211_RADIOTAP;
+ 
+-	bcopy(wl->dev->dev_addr, dev->dev_addr, ETHER_ADDR_LEN);
++	eth_hw_addr_set(dev, wl->dev->dev_addr);
+ 
+ #if defined(WL_USE_NETDEV_OPS)
+ 	dev->netdev_ops = &wl_netdev_monitor_ops;
+-- 
+2.35.1
+

diff --git a/net-wireless/broadcom-sta/files/013-linux518.patch b/net-wireless/broadcom-sta/files/013-linux518.patch
new file mode 100644
index 000000000000..d837429a6899
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/013-linux518.patch
@@ -0,0 +1,71 @@
+diff -u -r a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+--- a/src/shared/linux_osl.c	2022-05-24 20:51:15.662604980 +0000
++++ b/src/shared/linux_osl.c	2022-05-24 21:13:38.264472425 +0000
+@@ -599,6 +599,8 @@
+ 	va = kmalloc(size, GFP_ATOMIC | __GFP_ZERO);
+ 	if (va)
+ 		*pap = (ulong)__virt_to_phys(va);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++	va = dma_alloc_coherent(&((struct pci_dev *)osh->pdev)->dev, size, (dma_addr_t*)pap, GFP_ATOMIC);
+ #else
+ 	va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap);
+ #endif
+@@ -612,6 +614,8 @@
+ 
+ #ifdef __ARM_ARCH_7A__
+ 	kfree(va);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++	dma_free_coherent(&((struct pci_dev *)osh->pdev)->dev, size, va, (dma_addr_t)pa);
+ #else
+ 	pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa);
+ #endif
+@@ -623,7 +627,11 @@
+ 	int dir;
+ 
+ 	ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++	dir = (direction == DMA_TX)? DMA_TO_DEVICE: DMA_FROM_DEVICE;
++#else
+ 	dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
++#endif
+ 
+ #if defined(__ARM_ARCH_7A__) && defined(BCMDMASGLISTOSL)
+ 	if (dmah != NULL) {
+@@ -641,7 +649,11 @@
+ 				ASSERT(totsegs + nsegs <= MAX_DMA_SEGS);
+ 				sg->page_link = 0;
+ 				sg_set_buf(sg, PKTDATA(osh, skb), PKTLEN(osh, skb));
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++				dma_map_single(&((struct pci_dev *)osh->pdev)->dev, PKTDATA(osh, skb), PKTLEN(osh, skb), dir);
++#else
+ 				pci_map_single(osh->pdev, PKTDATA(osh, skb), PKTLEN(osh, skb), dir);
++#endif
+ 			}
+ 			totsegs += nsegs;
+ 			totlen += PKTLEN(osh, skb);
+@@ -656,7 +668,11 @@
+ 	}
+ #endif 
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++	return (dma_map_single(&((struct pci_dev *)osh->pdev)->dev, va, size, dir));
++#else
+ 	return (pci_map_single(osh->pdev, va, size, dir));
++#endif
+ }
+ 
+ void BCMFASTPATH
+@@ -665,8 +681,13 @@
+ 	int dir;
+ 
+ 	ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++	dir = (direction == DMA_TX)? DMA_TO_DEVICE: DMA_FROM_DEVICE;
++	dma_unmap_single(&((struct pci_dev *)osh->pdev)->dev, (uint32)pa, size, dir);
++#else
+ 	dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
+ 	pci_unmap_single(osh->pdev, (uint32)pa, size, dir);
++#endif
+ }
+ 
+ #if defined(BCMDBG_ASSERT)

diff --git a/net-wireless/broadcom-sta/files/014-linux414.patch b/net-wireless/broadcom-sta/files/014-linux414.patch
new file mode 100644
index 000000000000..0576aa5cf97c
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/014-linux414.patch
@@ -0,0 +1,37 @@
+From: Gerardo Esteban Malazdrewicz <gerardo@malazdrewicz.com.ar>
+Date: Fri, 29 Dec 2017 23:44:24 -0400
+Subject: linux414
+Origin: https://bugs.debian.org/885885
+
+linux 4.14 changed the kernel_read function prototype.
+---
+ src/shared/linux_osl.c | 12 +++++++++++-
+ 1 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+index 9adc392..b24a973 100644
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
+@@ -1076,11 +1076,21 @@ osl_os_get_image_block(char *buf, int len, void *image)
+ {
+ 	struct file *fp = (struct file *)image;
+ 	int rdlen;
++	loff_t pos;
+ 
+ 	if (!image)
+ 		return 0;
+ 
+-	rdlen = kernel_read(fp, fp->f_pos, buf, len);
++	pos = fp->f_pos;
++	rdlen = kernel_read(fp,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
++			pos,
++#endif
++			buf, len
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
++			,&pos
++#endif
++	);
+ 	if (rdlen > 0)
+ 		fp->f_pos += rdlen;
+ 

diff --git a/net-wireless/broadcom-sta/files/015-linux600.patch b/net-wireless/broadcom-sta/files/015-linux600.patch
new file mode 100644
index 000000000000..8645907bbae4
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/015-linux600.patch
@@ -0,0 +1,31 @@
+From 933540c63f33e6ac2825d65c4b681ef3387d9146 Mon Sep 17 00:00:00 2001
+From: Antoine Cotten <hello@acotten.com>
+Date: Mon, 15 Aug 2022 17:53:51 +0200
+Subject: [PATCH] cfg80211_roam_info compat for MLO APIs in Linux >= 6.0
+
+The 'bssid' struct field is now under 'links.bssid'.
+
+See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=efbabc11650040c64884ff3019b88c7bcc0ceb1d
+
+Original patch by Joan Bruguera:
+https://gist.github.com/joanbm/207210d74637870c01ef5a3c262a597d
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 5e9e6d3..5ec35c5 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2412,7 +2412,11 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 	struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+ 	struct cfg80211_roam_info roam_info = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
+ 		.bssid = wl->profile->bssid,
++#else
++		.links[0].bssid = wl->profile->bssid,
++#endif
+ 		.req_ie = conn_info->req_ie,
+ 		.req_ie_len = conn_info->req_ie_len,
+ 		.resp_ie = conn_info->resp_ie,

diff --git a/net-wireless/broadcom-sta/files/016-linux601.patch b/net-wireless/broadcom-sta/files/016-linux601.patch
new file mode 100644
index 000000000000..721967d275c2
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/016-linux601.patch
@@ -0,0 +1,90 @@
+diff -Nurp -u -r a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+--- a/src/wl/sys/wl_cfg80211_hybrid.c	2022-12-12 00:23:30.821615599 +0000
++++ b/src/wl/sys/wl_cfg80211_hybrid.c	2022-12-12 00:35:47.854975024 +0000
+@@ -105,14 +105,28 @@ static s32 wl_cfg80211_get_tx_power(stru
+ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm);
+ #endif
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
++static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy,
++           struct net_device *dev, int link_id, u8 key_idx, bool unicast,
++           bool multicast);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
+ static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy,
+            struct net_device *dev, u8 key_idx, bool unicast, bool multicast);
+ #else
+ static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy,
+            struct net_device *dev, u8 key_idx);
+ #endif
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
++static s32 wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
++           int link_id, u8 key_idx, bool pairwise, const u8 *mac_addr,
++           struct key_params *params);
++static s32 wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
++           int link_id, u8 key_idx, bool pairwise, const u8 *mac_addr);
++static s32 wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,
++           int link_id, u8 key_idx, bool pairwise, const u8 *mac_addr,
++           void *cookie,
++           void (*callback) (void *cookie, struct key_params *params));
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+ static s32 wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
+            u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params);
+ static s32 wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
+@@ -1161,7 +1175,12 @@ static s32 wl_cfg80211_get_tx_power(stru
+ 	return err;
+ }
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
++static s32
++wl_cfg80211_config_default_key(struct wiphy *wiphy,
++	struct net_device *dev, int link_id, u8 key_idx, bool unicast,
++	bool multicast)
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
+ static s32
+ wl_cfg80211_config_default_key(struct wiphy *wiphy,
+ 	struct net_device *dev, u8 key_idx, bool unicast, bool multicast)
+@@ -1186,7 +1205,12 @@ wl_cfg80211_config_default_key(struct wi
+ 	return 0;
+ }
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
++static s32
++wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
++                    int link_id, u8 key_idx, bool pairwise, const u8 *mac_addr,
++                    struct key_params *params)
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+ static s32
+ wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
+                     u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params)
+@@ -1307,7 +1331,11 @@ wl_cfg80211_add_key(struct wiphy *wiphy,
+ 	return err;
+ }
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
++static s32
++wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
++                    int link_id, u8 key_idx, bool pairwise, const u8 *mac_addr)
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+ static s32
+ wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
+                     u8 key_idx, bool pairwise, const u8 *mac_addr)
+@@ -1350,7 +1378,13 @@ wl_cfg80211_del_key(struct wiphy *wiphy,
+ 	return err;
+ }
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
++static s32
++wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,
++                    int link_id, u8 key_idx, bool pairwise, const u8 *mac_addr,
++                    void *cookie,
++                    void (*callback) (void *cookie, struct key_params * params))
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+ static s32
+ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,
+                     u8 key_idx, bool pairwise, const u8 *mac_addr, void *cookie,

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-modules.conf b/net-wireless/broadcom-sta/files/broadcom-sta-modules.conf
new file mode 100644
index 000000000000..458947e335b4
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-modules.conf
@@ -0,0 +1,17 @@
+# modprobe.d configuration file for WL
+
+# Internal Aliases - Do not edit
+# ------------------------------
+alias wlan0 wl
+
+
+# Configurable module parameters
+# ------------------------------
+# passivemode:	 (int)
+# wl_txq_thresh:	 (int)
+# oneonly:	 (int)
+# piomode:	 (int)
+# instance_base:	 (int)
+# nompc:	 (int)
+# intf_name:	 (string)
+


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/
@ 2023-06-24 16:13 Mike Pagano
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Pagano @ 2023-06-24 16:13 UTC (permalink / raw
  To: gentoo-commits

commit:     b3538887b69d698359ce340805ab5c19e6e14bad
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 24 16:07:17 2023 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Sat Jun 24 16:07:17 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3538887

net-wireless/broadcom-sta: Remove old and corresponding patches

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 .../broadcom-sta-6.30.223.271-r6.ebuild            |  94 ---------
 .../broadcom-sta-6.30.223.141-eth-to-wlan.patch    |  12 --
 .../files/broadcom-sta-6.30.223.141-gcc.patch      |  11 --
 .../files/broadcom-sta-6.30.223.141-makefile.patch |  14 --
 ...roadcom-sta-6.30.223.248-r3-Wno-date-time.patch |  11 --
 .../broadcom-sta-6.30.223.271-r1-linux-3.18.patch  |  12 --
 ...broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch |  16 --
 .../broadcom-sta-6.30.223.271-r4-linux-4.11.patch  |  52 -----
 .../broadcom-sta-6.30.223.271-r4-linux-4.12.patch  |  64 -------
 .../broadcom-sta-6.30.223.271-r4-linux-4.15.patch  |  63 ------
 .../broadcom-sta-6.30.223.271-r4-linux-4.7.patch   | 109 -----------
 .../broadcom-sta-6.30.223.271-r4-linux-4.8.patch   |  64 -------
 .../broadcom-sta-6.30.223.271-r5-linux-5.1.patch   |  29 ---
 .../broadcom-sta-6.30.223.271-r5-linux-5.6.patch   |  88 ---------
 .../broadcom-sta-6.30.223.271-r6-linux-5.9.patch   | 211 ---------------------
 15 files changed, 850 deletions(-)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r6.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r6.ebuild
deleted file mode 100644
index 118df993b314..000000000000
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r6.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit linux-info linux-mod
-
-DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
-HOMEPAGE="https://www.broadcom.com/support/802.11"
-SRC_BASE="https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35"
-SRC_URI="x86? ( ${SRC_BASE}-nodebug-pcoem-${PV//\./_}.tar.gz )
-	amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz )
-	https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/README_${PV}.txt -> README-${P}.txt"
-S="${WORKDIR}"
-
-LICENSE="Broadcom"
-KEYWORDS="-* ~amd64 ~x86"
-
-RESTRICT="mirror"
-
-DEPEND="virtual/linux-sources"
-
-PATCHES=(
-	"${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.271-r1-linux-3.18.patch"
-	"${FILESDIR}/${PN}-6.30.223.271-r2-linux-4.3-v2.patch"
-	"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.7.patch"
-	"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.8.patch"
-	"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch"
-	"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch"
-	"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.15.patch"
-	"${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.1.patch"
-	"${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.6.patch"
-	"${FILESDIR}/${PN}-6.30.223.271-r6-linux-5.9.patch"
-)
-
-MODULE_NAMES="wl(net/wireless)"
-MODULESD_WL_ALIASES=("wlan0 wl")
-
-pkg_pretend() {
-	ewarn
-	ewarn "If you are stuck using this unmaintained driver (likely in a MacBook),"
-	ewarn "you may be interested to know that a newer compatible wireless card"
-	ewarn "is supported by the in-tree brcmfmac driver. It has a model number "
-	ewarn "BCM943602CS and is for sale on the second hand market for less than "
-	ewarn "20 USD."
-	ewarn
-	ewarn "See https://wikidevi.com/wiki/Broadcom_Wireless_Adapters and"
-	ewarn "    https://wikidevi.com/wiki/Broadcom_BCM943602CS"
-	ewarn "for more information."
-	ewarn
-}
-
-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 ~!X86_INTEL_LPSS"
-	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."
-	ERROR_X86_INTEL_LPSS="X86_INTEL_LPSS: Please disable it. The module does not work with it enabled."
-	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_install() {
-	linux-mod_src_install
-
-	dodoc "${DISTDIR}/README-${P}.txt"
-}

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
deleted file mode 100644
index b23914a0b3d6..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-eth-to-wlan.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-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
deleted file mode 100644
index b5d7e858d78f..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-gcc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-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-makefile.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch
deleted file mode 100644
index d5b97fe87ebe..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-makefile.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/Makefile	2013-04-28 22:42:59.000000000 +0200
-+++ b/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-r3-Wno-date-time.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch
deleted file mode 100644
index f93e3f1d3a3f..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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.271-r1-linux-3.18.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r1-linux-3.18.patch
deleted file mode 100644
index 9a0e7136c53b..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r1-linux-3.18.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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
-@@ -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);
- 

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch
deleted file mode 100644
index 588f77ad16f2..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -ruN a/src/shared/linux_osl.c b/src/shared/linux_osl.c
---- a/src/shared/linux_osl.c	2015-11-26 12:16:23.343091098 -0800
-+++ b/src/shared/linux_osl.c	2015-11-26 12:17:08.657092739 -0800
-@@ -932,7 +932,11 @@
- 	uint cycles;
- 
- #if defined(__i386__)
--	rdtscl(cycles);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
-+	cycles = (u32)rdtsc();
-+#else
-+	rdtscl(cycles);
-+#endif
- #else
- 	cycles = 0;
- #endif 

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.11.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.11.patch
deleted file mode 100644
index a779f8c84cfd..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.11.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
-index a9671e2..da36405 100644
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -30,6 +30,9 @@
- #include <linux/kthread.h>
- #include <linux/netdevice.h>
- #include <linux/ieee80211.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+#include <linux/sched/signal.h>
-+#endif
- #include <net/cfg80211.h>
- #include <linux/nl80211.h>
- #include <net/rtnetlink.h>
-diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
-index 489c9f5..f8278ad 100644
---- a/src/wl/sys/wl_linux.c
-+++ b/src/wl/sys/wl_linux.c
-@@ -117,6 +117,9 @@ int wl_found = 0;
- 
- typedef struct priv_link {
- 	wl_if_t *wlif;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+	unsigned long last_rx;
-+#endif
- } priv_link_t;
- 
- #define WL_DEV_IF(dev)          ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif)
-@@ -2450,6 +2453,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
- {
- 	struct sk_buff *oskb = (struct sk_buff *)p;
- 	struct sk_buff *skb;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+	priv_link_t *priv_link;
-+#endif
- 	uchar *pdata;
- 	uint len;
- 
-@@ -2916,7 +2922,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
- 	if (skb == NULL) return;
- 
- 	skb->dev = wl->monitor_dev;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+	priv_link = MALLOC(wl->osh, sizeof(priv_link_t));
-+	priv_link = netdev_priv(skb->dev);
-+	priv_link->last_rx = jiffies;
-+#else
- 	skb->dev->last_rx = jiffies;
-+#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
- 	skb_reset_mac_header(skb);
- #else

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.12.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.12.patch
deleted file mode 100644
index 94c6253f803e..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.12.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff -ru work.orig/src/wl/sys/wl_cfg80211_hybrid.c work.patched/src/wl/sys/wl_cfg80211_hybrid.c
---- work.orig/src/wl/sys/wl_cfg80211_hybrid.c	2017-06-10 15:50:27.328823384 -0700
-+++ work.patched/src/wl/sys/wl_cfg80211_hybrid.c	2017-06-10 15:52:40.540809187 -0700
-@@ -52,8 +52,13 @@
- u32 wl_dbg_level = WL_DBG_ERR;
- #endif
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
-+           enum nl80211_iftype type, struct vif_params *params);
-+#else
- static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
-            enum nl80211_iftype type, u32 *flags, struct vif_params *params);
-+#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
- static s32
- wl_cfg80211_scan(struct wiphy *wiphy,
-@@ -466,7 +471,11 @@
- 
- static s32
- wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+                         enum nl80211_iftype type,
-+#else
-                          enum nl80211_iftype type, u32 *flags,
-+#endif
-    struct vif_params *params)
- {
- 	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
-@@ -2361,12 +2370,26 @@
-                     const wl_event_msg_t *e, void *data)
- {
- 	struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+	struct cfg80211_roam_info roam_info = {};
-+#endif
- 	s32 err = 0;
- 
- 	wl_get_assoc_ies(wl);
- 	memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
- 	memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
- 	wl_update_bss_info(wl);
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+	roam_info.channel = &wl->conf->channel,
-+	roam_info.bssid = (u8 *)&wl->bssid,
-+	roam_info.req_ie = conn_info->req_ie,
-+	roam_info.req_ie_len = conn_info->req_ie_len,
-+	roam_info.resp_ie = conn_info->resp_ie,
-+	roam_info.resp_ie_len = conn_info->resp_ie_len,
-+
-+	cfg80211_roamed(ndev, &roam_info, GFP_KERNEL);
-+#else
- 	cfg80211_roamed(ndev,
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
- 			&wl->conf->channel,	 
-@@ -2374,6 +2397,7 @@
- 			(u8 *)&wl->bssid,
- 			conn_info->req_ie, conn_info->req_ie_len,
- 			conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
-+#endif
- 	WL_DBG(("Report roaming result\n"));
- 
- 	set_bit(WL_STATUS_CONNECTED, &wl->status);

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch
deleted file mode 100644
index 91c4d89519c1..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
-index 489c9f5..f8278ad 100644
---- a/src/wl/sys/wl_linux.c
-+++ b/src/wl/sys/wl_linux.c
-@@ -93,7 +93,11 @@
- 
- #include <wlc_wowl.h>
- 
-+#ifdef HAVE_TIMER_SETUP
-+static void wl_timer(struct timer_list *list);
-+#else
- static void wl_timer(ulong data);
-+#endif
- static void _wl_timer(wl_timer_t *t);
- static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
- 
-@@ -2296,12 +2300,17 @@
- 
- 	atomic_dec(&t->wl->callbacks);
- }
--
-+#ifdef HAVE_TIMER_SETUP
-+static void
-+wl_timer(struct timer_list *list)
-+{
-+	wl_timer_t *t = from_timer(t,list,timer);
-+#else
- static void
- wl_timer(ulong data)
- {
- 	wl_timer_t *t = (wl_timer_t *)data;
--
-+#endif
- 	if (!WL_ALL_PASSIVE_ENAB(t->wl))
- 		_wl_timer(t);
- 	else
-@@ -2351,10 +2360,13 @@
- 	}
- 
- 	bzero(t, sizeof(wl_timer_t));
--
-+#ifdef HAVE_TIMER_SETUP
-+	timer_setup(&t->timer, wl_timer,0);
-+#else
- 	init_timer(&t->timer);
- 	t->timer.data = (ulong) t;
- 	t->timer.function = wl_timer;
-+#endif
- 	t->wl = wl;
- 	t->fn = fn;
- 	t->arg = arg;
-diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
-index 489c9f5..f8278ad 100644
---- a/src/wl/sys/wl_linux.h
-+++ b/src/wl/sys/wl_linux.h
-@@ -190,3 +190,7 @@
- extern struct net_device * wl_netdev_get(wl_info_t *wl);
- 
- #endif 
-+
-+#if defined(timer_setup) && defined(from_timer)
-+#define HAVE_TIMER_SETUP
-+#endif

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.7.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.7.patch
deleted file mode 100644
index 566680a09140..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.7.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-Since Linux 4.7, the enum ieee80211_band is no longer used
-
-This shall cause no problem's since both enums ieee80211_band
-and nl80211_band were added in the same commit:
-https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
-
-This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
-
-Reference:
-https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
-
---- a/src/wl/sys/wl_cfg80211_hybrid.c	2016-06-13 11:57:36.159340297 -0500
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c	2016-06-13 11:58:18.442323435 -0500
-@@ -236,7 +236,7 @@
- #endif				
- 
- #define CHAN2G(_channel, _freq, _flags) {			\
--	.band			= IEEE80211_BAND_2GHZ,		\
-+	.band			= NL80211_BAND_2GHZ,		\
- 	.center_freq		= (_freq),			\
- 	.hw_value		= (_channel),			\
- 	.flags			= (_flags),			\
-@@ -245,7 +245,7 @@
- }
- 
- #define CHAN5G(_channel, _flags) {				\
--	.band			= IEEE80211_BAND_5GHZ,		\
-+	.band			= NL80211_BAND_5GHZ,		\
- 	.center_freq		= 5000 + (5 * (_channel)),	\
- 	.hw_value		= (_channel),			\
- 	.flags			= (_flags),			\
-@@ -379,7 +379,7 @@
- };
- 
- static struct ieee80211_supported_band __wl_band_2ghz = {
--	.band = IEEE80211_BAND_2GHZ,
-+	.band = NL80211_BAND_2GHZ,
- 	.channels = __wl_2ghz_channels,
- 	.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
- 	.bitrates = wl_g_rates,
-@@ -387,7 +387,7 @@
- };
- 
- static struct ieee80211_supported_band __wl_band_5ghz_a = {
--	.band = IEEE80211_BAND_5GHZ,
-+	.band = NL80211_BAND_5GHZ,
- 	.channels = __wl_5ghz_a_channels,
- 	.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
- 	.bitrates = wl_a_rates,
-@@ -395,7 +395,7 @@
- };
- 
- static struct ieee80211_supported_band __wl_band_5ghz_n = {
--	.band = IEEE80211_BAND_5GHZ,
-+	.band = NL80211_BAND_5GHZ,
- 	.channels = __wl_5ghz_n_channels,
- 	.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
- 	.bitrates = wl_a_rates,
-@@ -1876,8 +1876,8 @@
- 	wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
- #endif
- 	wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
--	wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
--	wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
-+	wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
-+	wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
- 	wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
- 	wdev->wiphy->cipher_suites = __wl_cipher_suites;
- 	wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
-@@ -2000,7 +2000,7 @@
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
- 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
- 		(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
--		IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
-+		NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
- #else
- 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
- #endif
-@@ -2116,7 +2116,7 @@
- 				return err;
- 			}
- 			chan = wf_chspec_ctlchan(chanspec);
--			band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
-+			band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
- 			freq = ieee80211_channel_to_frequency(chan, band);
- 			channel = ieee80211_get_channel(wiphy, freq);
- 			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
-@@ -2250,10 +2250,10 @@
- 		join_params->params.chanspec_list[0] =
- 		    ieee80211_frequency_to_channel(chan->center_freq);
- 
--		if (chan->band == IEEE80211_BAND_2GHZ) {
-+		if (chan->band == NL80211_BAND_2GHZ) {
- 			chanspec |= WL_CHANSPEC_BAND_2G;
- 		}
--		else if (chan->band == IEEE80211_BAND_5GHZ) {
-+		else if (chan->band == NL80211_BAND_5GHZ) {
- 			chanspec |= WL_CHANSPEC_BAND_5G;
- 		}
- 		else {
-@@ -2885,7 +2885,7 @@
- 
- 	if (phy == 'n' || phy == 'a' || phy == 'v') {
- 		wiphy = wl_to_wiphy(wl);
--		wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
-+		wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
- 	}
- 
- 	return err;

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.8.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.8.patch
deleted file mode 100644
index 20e8a9ae49d2..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.8.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From d3f93542326a06d920c6eb89b703384290d37b8b Mon Sep 17 00:00:00 2001
-From: Alberto Milone <alberto.milone@canonical.com>
-Date: Fri, 2 Sep 2016 17:35:34 +0200
-Subject: [PATCH 1/1] Add support for Linux 4.8
-
-Orginal author: Krzysztof Kolasa
----
- src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
-index 2fc71fe..ec5e472 100644
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -2388,8 +2388,16 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
- 	s32 err = 0;
- 
- 	if (wl->scan_request) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
-+		struct cfg80211_scan_info info = {
-+			.aborted = true,
-+		};
-+		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
-+		cfg80211_scan_done(wl->scan_request, &info);
-+#else
- 		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
- 		cfg80211_scan_done(wl->scan_request, true);     
-+#endif
- 		wl->scan_request = NULL;
- 	}
- 
-@@ -2490,7 +2498,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
- 
- scan_done_out:
- 	if (wl->scan_request) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
-+		struct cfg80211_scan_info info = {
-+			.aborted = false,
-+		};
-+		cfg80211_scan_done(wl->scan_request, &info);
-+#else
- 		cfg80211_scan_done(wl->scan_request, false);
-+#endif
- 		wl->scan_request = NULL;
- 	}
- 	rtnl_unlock();
-@@ -2909,7 +2924,14 @@ s32 wl_cfg80211_down(struct net_device *ndev)
- 	s32 err = 0;
- 
- 	if (wl->scan_request) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
-+		struct cfg80211_scan_info info = {
-+			.aborted = true,
-+		};
-+		cfg80211_scan_done(wl->scan_request, &info);
-+#else
- 		cfg80211_scan_done(wl->scan_request, true);	
-+#endif
- 		wl->scan_request = NULL;
- 	}
- 
--- 
-2.7.4
-

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch
deleted file mode 100644
index fcee46ea3d02..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 20bb1a6da26c496572ee63d310cdf69a2f1553f8 Mon Sep 17 00:00:00 2001
-From: Seth Forshee <seth.forshee@canonical.com>
-Date: Fri, 17 May 2019 20:32:20 +0000
-Subject: [PATCH] add support for linux 5.1
-
-get_ds() was removed and replaced universally with KERNEL_DS.
-Provide a version of get_ds() to do likewise for 5.1 and later.
-
-Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
----
- src/include/linuxver.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/include/linuxver.h b/src/include/linuxver.h
-index b05bc32..2b88b30 100644
---- a/src/include/linuxver.h
-+++ b/src/include/linuxver.h
-@@ -591,4 +591,9 @@ do {									\
- #define netdev_priv(dev) dev->priv
- #endif 
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
-+#include <linux/uaccess.h>
-+#define get_ds() (KERNEL_DS)
-+#endif
-+
- #endif 
--- 
-2.20.1

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch
deleted file mode 100644
index 71264346f86e..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From: Herman van Hazendonk <github.com@herrie.org>
-Date: Tue, 31 Mar 2020 17:09:55 +0200
-Subject: [PATCH] Add fixes for 5.6 kernel
-Origin: https://salsa.debian.org/Herrie82-guest/broadcom-sta/-/merge_requests/1
-
-Use ioremap instead of ioremap_nocache and proc_ops instead of
-file_operations on Linux kernel 5.6 and above.
-
-<rosh> Patch amended to adapt i386 arch.
----
- src/shared/linux_osl.c |  6 +++++-
- src/wl/sys/wl_linux.c  | 21 ++++++++++++++++++++-
- 2 files changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
-index b24a973..9bce9b1 100644
---- a/src/shared/linux_osl.c
-+++ b/src/shared/linux_osl.c
-@@ -946,7 +946,11 @@ osl_getcycles(void)
- void *
- osl_reg_map(uint32 pa, uint size)
- {
--	return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
-+	#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
-+		return (ioremap((unsigned long)pa, (unsigned long)size));
-+	#else
-+		return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
-+	#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
- }
- 
- void
-diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
-index ab7b883..10621c2 100644
---- a/src/wl/sys/wl_linux.c
-+++ b/src/wl/sys/wl_linux.c
-@@ -590,10 +590,17 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
- 	}
- 	wl->bcm_bustype = bustype;
- 
-+	#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
-+	if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
-+		WL_ERROR(("wl%d: ioremap() failed\n", unit));
-+		goto fail;
-+	}
-+	#else
- 	if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
- 		WL_ERROR(("wl%d: ioremap() failed\n", unit));
- 		goto fail;
- 	}
-+	#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
- 
- 	wl->bar1_addr = bar1_addr;
- 	wl->bar1_size = bar1_size;
-@@ -780,8 +787,13 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
- 	if ((val & 0x0000ff00) != 0)
- 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
- 		bar1_size = pci_resource_len(pdev, 2);
-+		#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
-+		bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
-+			bar1_size);
-+		#else
- 		bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
- 			bar1_size);
-+		#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
- 	wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
- 		pdev->irq, bar1_addr, bar1_size);
- 
-@@ -3354,12 +3366,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
- }
- 
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
-+static const struct proc_ops wl_fops = {
-+	.proc_read	= wl_proc_read,
-+	.proc_write	= wl_proc_write,
-+};
-+#else
- static const struct file_operations wl_fops = {
- 	.owner	= THIS_MODULE,
- 	.read	= wl_proc_read,
- 	.write	= wl_proc_write,
- };
--#endif
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
-+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) */
- 
- static int
- wl_reg_proc_entry(wl_info_t *wl)

diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r6-linux-5.9.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r6-linux-5.9.patch
deleted file mode 100644
index 6ef476464c0c..000000000000
--- a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r6-linux-5.9.patch
+++ /dev/null
@@ -1,211 +0,0 @@
-From f3d652840f8dd959395065a1cf67ca40b04ec69b Mon Sep 17 00:00:00 2001
-From: Joan Bruguera <joanbrugueram@gmail.com>
-Date: Tue, 13 Oct 2020 19:35:55 +0200
-Subject: [PATCH] Get rid of get_fs/set_fs calls in Broadcom WL driver.
-
-Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1)
-
-Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux.
-
-NB: Some checks in wlc_ioctl_internal are likely superfluous,
-    but I'm not familiar enough with the driver to remove them with confidence.
-
-See also: https://lwn.net/Articles/722267/
-          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47058bb54b57962b3958a936ddbc59355e4c5504
-          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5
-
-Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
----
- src/wl/sys/wl_cfg80211_hybrid.c | 25 ++-------------------
- src/wl/sys/wl_iw.c              | 25 ++-------------------
- src/wl/sys/wl_linux.c           | 40 ++++++++++++++++++++++++++++-----
- src/wl/sys/wl_linux.h           |  2 ++
- src/wl/sys/wlc_pub.h            |  1 +
- 5 files changed, 42 insertions(+), 51 deletions(-)
-
-diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
-index 7b606e0..1e0adb7 100644
---- a/src/wl/sys/wl_cfg80211_hybrid.c
-+++ b/src/wl/sys/wl_cfg80211_hybrid.c
-@@ -38,6 +38,7 @@
- #include <wlioctl.h>
- #include <proto/802.11.h>
- #include <wl_cfg80211_hybrid.h>
-+#include <wl_linux.h>
- 
- #define EVENT_TYPE(e) dtoh32((e)->event_type)
- #define EVENT_FLAGS(e) dtoh16((e)->flags)
-@@ -435,30 +436,7 @@ static void key_endian_to_host(struct wl_wsec_key *key)
- static s32
- wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
- {
--	struct ifreq ifr;
--	struct wl_ioctl ioc;
--	mm_segment_t fs;
--	s32 err = 0;
--
--	BUG_ON(len < sizeof(int));
--
--	memset(&ioc, 0, sizeof(ioc));
--	ioc.cmd = cmd;
--	ioc.buf = arg;
--	ioc.len = len;
--	strcpy(ifr.ifr_name, dev->name);
--	ifr.ifr_data = (caddr_t)&ioc;
--
--	fs = get_fs();
--	set_fs(get_ds());
--#if defined(WL_USE_NETDEV_OPS)
--	err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
--#else
--	err = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
--#endif
--	set_fs(fs);
--
--	return err;
-+	return wlc_ioctl_internal(dev, cmd, arg, len);
- }
- 
- static s32
-diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
-index c4c610b..e346b15 100644
---- a/src/wl/sys/wl_iw.c
-+++ b/src/wl/sys/wl_iw.c
-@@ -37,6 +37,7 @@ typedef const struct si_pub	si_t;
- 
- #include <wl_dbg.h>
- #include <wl_iw.h>
-+#include <wl_linux.h>
- 
- extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
- 	uint32 reason, char* stringBuf, uint buflen);
-@@ -103,29 +104,7 @@ dev_wlc_ioctl(
- 	int len
- )
- {
--	struct ifreq ifr;
--	wl_ioctl_t ioc;
--	mm_segment_t fs;
--	int ret;
--
--	memset(&ioc, 0, sizeof(ioc));
--	ioc.cmd = cmd;
--	ioc.buf = arg;
--	ioc.len = len;
--
--	strcpy(ifr.ifr_name, dev->name);
--	ifr.ifr_data = (caddr_t) &ioc;
--
--	fs = get_fs();
--	set_fs(get_ds());
--#if defined(WL_USE_NETDEV_OPS)
--	ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
--#else
--	ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
--#endif
--	set_fs(fs);
--
--	return ret;
-+	return wlc_ioctl_internal(dev, cmd, arg, len);
- }
- 
- static int
-diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
-index 947cef3..f04c148 100644
---- a/src/wl/sys/wl_linux.c
-+++ b/src/wl/sys/wl_linux.c
-@@ -1643,10 +1643,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
- 		goto done2;
- 	}
- 
--	if (segment_eq(get_fs(), KERNEL_DS))
--		buf = ioc.buf;
--
--	else if (ioc.buf) {
-+	if (ioc.buf) {
- 		if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
- 			bcmerror = BCME_NORESOURCE;
- 			goto done2;
-@@ -1667,7 +1664,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
- 	WL_UNLOCK(wl);
- 
- done1:
--	if (ioc.buf && (ioc.buf != buf)) {
-+	if (ioc.buf) {
- 		if (copy_to_user(ioc.buf, buf, ioc.len))
- 			bcmerror = BCME_BADADDR;
- 		MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
-@@ -1680,6 +1677,39 @@ done2:
- 	return (OSL_ERROR(bcmerror));
- }
- 
-+int
-+wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len)
-+{
-+	wl_info_t *wl;
-+	wl_if_t *wlif;
-+	int bcmerror;
-+
-+	if (!dev)
-+		return -ENETDOWN;
-+
-+	wl = WL_INFO(dev);
-+	wlif = WL_DEV_IF(dev);
-+	if (wlif == NULL || wl == NULL || wl->dev == NULL)
-+		return -ENETDOWN;
-+
-+	bcmerror = 0;
-+
-+	WL_TRACE(("wl%d: wlc_ioctl_internal: cmd 0x%x\n", wl->pub->unit, cmd));
-+
-+	WL_LOCK(wl);
-+	if (!capable(CAP_NET_ADMIN)) {
-+		bcmerror = BCME_EPERM;
-+	} else {
-+		bcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif);
-+	}
-+	WL_UNLOCK(wl);
-+
-+	ASSERT(VALID_BCMERROR(bcmerror));
-+	if (bcmerror != 0)
-+		wl->pub->bcmerror = bcmerror;
-+	return (OSL_ERROR(bcmerror));
-+}
-+
- static struct net_device_stats*
- wl_get_stats(struct net_device *dev)
- {
-diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
-index 5b1048e..c8c1f41 100644
---- a/src/wl/sys/wl_linux.h
-+++ b/src/wl/sys/wl_linux.h
-@@ -22,6 +22,7 @@
- #define _wl_linux_h_
- 
- #include <wlc_types.h>
-+#include <wlc_pub.h>
- 
- typedef struct wl_timer {
- 	struct timer_list 	timer;
-@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs);
- extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
- extern void wl_free(wl_info_t *wl);
- extern int  wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
-+extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len);
- extern struct net_device * wl_netdev_get(wl_info_t *wl);
- 
- #endif 
-diff --git a/src/wl/sys/wlc_pub.h b/src/wl/sys/wlc_pub.h
-index 53a98b8..2b5a029 100644
---- a/src/wl/sys/wlc_pub.h
-+++ b/src/wl/sys/wlc_pub.h
-@@ -24,6 +24,7 @@
- 
- #include <wlc_types.h>
- #include <wlc_utils.h>
-+#include <siutils.h>
- #include "proto/802.11.h"
- #include "proto/bcmevent.h"
- 
---
-2.28.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-24 16:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-20 22:01 [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/files/, net-wireless/broadcom-sta/ Luca Barbato
  -- strict thread matches above, loose matches on Subject: below --
2023-06-24 16:13 Mike Pagano
2023-06-24 16:13 Mike Pagano
2017-06-10 23:20 Matt Turner
2017-06-10 23:20 Matt Turner
2016-12-09 19:39 Matt Turner
2016-11-21  4:18 Matt Turner
2016-02-09 20:26 Matt Turner
2016-02-09 20:26 Matt Turner
2015-11-25 19:24 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox