public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2020-06-01 22:02 Stefan Strogin
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Strogin @ 2020-06-01 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     3742de12e9abd41eebaa87c724b49dc39f7d4ce5
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Mon Jun  1 16:09:39 2020 +0000
Commit:     Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Mon Jun  1 22:01:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3742de12

net-wireless/broadcom-sta: linux 5.6 support

Add patch that resolves compilation error described in #717320.

Closes: https://bugs.gentoo.org/717320
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16043
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>

 .../broadcom-sta-6.30.223.271-r5.ebuild            |  3 +-
 .../broadcom-sta-6.30.223.271-r5-linux-5.6.patch   | 88 ++++++++++++++++++++++
 2 files changed, 90 insertions(+), 1 deletion(-)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
index 91581b52a4e..b84669a9969 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -84,6 +84,7 @@ PATCHES=(
 		"${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"
 )
 
 src_install() {

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
new file mode 100644
index 00000000000..71264346f86
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch
@@ -0,0 +1,88 @@
+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)


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2025-02-24  9:26 Florian Schmaus
  0 siblings, 0 replies; 7+ messages in thread
From: Florian Schmaus @ 2025-02-24  9:26 UTC (permalink / raw
  To: gentoo-commits

commit:     e20d1bb6aceb42070277eb784f1462a082b57ba9
Author:     Sam Petch <111785134+spetch0x5F <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Wed Feb 12 06:17:32 2025 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Feb 24 09:26:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e20d1bb6

net-wireless/broadcom-sta: handle new headers

Handle new header name in kernels >=6.12, handle 6.13 lib80211 code
merge into libiw and fix pointer mismatch compiler error for 6.14

[flow: adjust commit message]

Closes: https://bugs.gentoo.org/947928
Closes: https://bugs.gentoo.org/948947
Closes: https://github.com/gentoo/gentoo/pull/40391
Signed-off-by: Sam Petch <111785134+spetch0x5F <AT> users.noreply.github.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 ....ebuild => broadcom-sta-6.30.223.271-r8.ebuild} | 10 ++++--
 .../broadcom-sta/files/001-null-pointer-fix.patch  | 10 ++----
 net-wireless/broadcom-sta/files/002-rdtscl.patch   |  5 ++-
 net-wireless/broadcom-sta/files/003-linux47.patch  |  4 +--
 net-wireless/broadcom-sta/files/004-linux48.patch  |  6 ----
 net-wireless/broadcom-sta/files/006-linux411.patch |  2 --
 net-wireless/broadcom-sta/files/007-linux412.patch |  6 ----
 net-wireless/broadcom-sta/files/008-linux415.patch |  4 +--
 .../files/009-fix_mac_profile_discrepancy.patch    |  4 +--
 net-wireless/broadcom-sta/files/010-linux56.patch  |  4 ---
 net-wireless/broadcom-sta/files/011-linux59.patch  | 18 ----------
 net-wireless/broadcom-sta/files/012-linux517.patch |  6 ----
 net-wireless/broadcom-sta/files/013-linux518.patch |  5 ++-
 net-wireless/broadcom-sta/files/014-linux414.patch |  6 ----
 net-wireless/broadcom-sta/files/015-linux600.patch |  6 ----
 net-wireless/broadcom-sta/files/016-linux601.patch |  5 ++-
 .../files/017-handle-new-header-name-6.12.patch    | 33 ++++++++++++++++++
 .../files/018-broadcom-wl-fix-linux-6.13.patch     | 27 +++++++++++++++
 .../files/019-broadcom-wl-fix-linux-6.14.patch     | 40 ++++++++++++++++++++++
 19 files changed, 122 insertions(+), 79 deletions(-)

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-r8.ebuild
similarity index 90%
rename from net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r7.ebuild
rename to net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r8.ebuild
index efe1beb913de..8c69ef77329a 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r7.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -39,6 +39,9 @@ PATCHES=(
 	"${FILESDIR}/014-linux414.patch"
 	"${FILESDIR}/015-linux600.patch"
 	"${FILESDIR}/016-linux601.patch"
+	"${FILESDIR}/017-handle-new-header-name-6.12.patch"
+	"${FILESDIR}/018-broadcom-wl-fix-linux-6.13.patch"
+	"${FILESDIR}/019-broadcom-wl-fix-linux-6.14.patch"
 )
 
 pkg_pretend() {
@@ -62,6 +65,7 @@ pkg_setup() {
 	# 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"
+	CONFIG_CHECK3="~!MAC80211"
 	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!"
@@ -70,7 +74,9 @@ pkg_setup() {
 	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
+	if kernel_is ge 6 1 127; then
+		CONFIG_CHECK="${CONFIG_CHECK} ${CONFIG_CHECK3} CFG80211 ~!PREEMPT_RCU ~!PREEMPT"
+	elif 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"

diff --git a/net-wireless/broadcom-sta/files/001-null-pointer-fix.patch b/net-wireless/broadcom-sta/files/001-null-pointer-fix.patch
index 0ebe1e242243..6b1bb33180ff 100644
--- a/net-wireless/broadcom-sta/files/001-null-pointer-fix.patch
+++ b/net-wireless/broadcom-sta/files/001-null-pointer-fix.patch
@@ -4,12 +4,6 @@ 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)
@@ -25,8 +19,8 @@ index 860b935..295156f 100644
 -- 
 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
+--- a/src/wl/sys/wl_linux.a
++++ b/src/wl/sys/wl_linux.c
 @@ -737,9 +737,6 @@
  		dev->name, device,
  		WL_ALL_PASSIVE_ENAB(wl) ?  ", Passive Mode" : "", EPI_VERSION_STR);

diff --git a/net-wireless/broadcom-sta/files/002-rdtscl.patch b/net-wireless/broadcom-sta/files/002-rdtscl.patch
index 1b9862cc3d8d..8612895d7082 100644
--- a/net-wireless/broadcom-sta/files/002-rdtscl.patch
+++ b/net-wireless/broadcom-sta/files/002-rdtscl.patch
@@ -5,9 +5,8 @@ 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
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
 @@ -932,7 +932,11 @@
  	uint cycles;
  

diff --git a/net-wireless/broadcom-sta/files/003-linux47.patch b/net-wireless/broadcom-sta/files/003-linux47.patch
index 566680a09140..3ad02380ebdb 100644
--- a/net-wireless/broadcom-sta/files/003-linux47.patch
+++ b/net-wireless/broadcom-sta/files/003-linux47.patch
@@ -9,8 +9,8 @@ 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
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
 @@ -236,7 +236,7 @@
  #endif				
  

diff --git a/net-wireless/broadcom-sta/files/004-linux48.patch b/net-wireless/broadcom-sta/files/004-linux48.patch
index 20e8a9ae49d2..10315f7f2326 100644
--- a/net-wireless/broadcom-sta/files/004-linux48.patch
+++ b/net-wireless/broadcom-sta/files/004-linux48.patch
@@ -4,12 +4,6 @@ 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,

diff --git a/net-wireless/broadcom-sta/files/006-linux411.patch b/net-wireless/broadcom-sta/files/006-linux411.patch
index 7a2e8c0c6cb0..87715a9c8e2a 100644
--- a/net-wireless/broadcom-sta/files/006-linux411.patch
+++ b/net-wireless/broadcom-sta/files/006-linux411.patch
@@ -1,4 +1,3 @@
-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 @@
@@ -12,7 +11,6 @@ diff -u sys0/wl_cfg80211_hybrid.c sys/wl_cfg80211_hybrid.c
  #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 @@

diff --git a/net-wireless/broadcom-sta/files/007-linux412.patch b/net-wireless/broadcom-sta/files/007-linux412.patch
index 1673f063cdb5..8fb62bdfde5f 100644
--- a/net-wireless/broadcom-sta/files/007-linux412.patch
+++ b/net-wireless/broadcom-sta/files/007-linux412.patch
@@ -5,12 +5,6 @@ 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;

diff --git a/net-wireless/broadcom-sta/files/008-linux415.patch b/net-wireless/broadcom-sta/files/008-linux415.patch
index 1bced2f68ab1..fbaa08bc7057 100644
--- a/net-wireless/broadcom-sta/files/008-linux415.patch
+++ b/net-wireless/broadcom-sta/files/008-linux415.patch
@@ -1,5 +1,5 @@
---- 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
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
 @@ -93,7 +93,11 @@
  
  #include <wlc_wowl.h>

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
index 4260eba5057a..bcc6d50dc8ac 100644
--- a/net-wireless/broadcom-sta/files/009-fix_mac_profile_discrepancy.patch
+++ b/net-wireless/broadcom-sta/files/009-fix_mac_profile_discrepancy.patch
@@ -1,5 +1,5 @@
---- 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
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
 @@ -1444,11 +1444,10 @@
  	s32 rate;
  	s32 err = 0;

diff --git a/net-wireless/broadcom-sta/files/010-linux56.patch b/net-wireless/broadcom-sta/files/010-linux56.patch
index f8d5783819cd..4cee72e9081d 100644
--- a/net-wireless/broadcom-sta/files/010-linux56.patch
+++ b/net-wireless/broadcom-sta/files/010-linux56.patch
@@ -1,5 +1,3 @@
-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)
@@ -11,8 +9,6 @@ index 6157d18..8237ec7 100644
  }
  
  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,

diff --git a/net-wireless/broadcom-sta/files/011-linux59.patch b/net-wireless/broadcom-sta/files/011-linux59.patch
index 6ef476464c0c..9494ed6f1f50 100644
--- a/net-wireless/broadcom-sta/files/011-linux59.patch
+++ b/net-wireless/broadcom-sta/files/011-linux59.patch
@@ -15,16 +15,6 @@ See also: https://lwn.net/Articles/722267/
           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 @@
@@ -67,8 +57,6 @@ index 7b606e0..1e0adb7 100644
  }
  
  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;
@@ -110,8 +98,6 @@ index c4c610b..e346b15 100644
  }
  
  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)
@@ -175,8 +161,6 @@ index 947cef3..f04c148 100644
  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 @@
@@ -195,8 +179,6 @@ index 5b1048e..c8c1f41 100644
  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 @@

diff --git a/net-wireless/broadcom-sta/files/012-linux517.patch b/net-wireless/broadcom-sta/files/012-linux517.patch
index 6f23316691c8..9bc7a11d79cc 100644
--- a/net-wireless/broadcom-sta/files/012-linux517.patch
+++ b/net-wireless/broadcom-sta/files/012-linux517.patch
@@ -16,12 +16,6 @@ Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-28 on
 
 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);

diff --git a/net-wireless/broadcom-sta/files/013-linux518.patch b/net-wireless/broadcom-sta/files/013-linux518.patch
index d837429a6899..dbac7f85c9ad 100644
--- a/net-wireless/broadcom-sta/files/013-linux518.patch
+++ b/net-wireless/broadcom-sta/files/013-linux518.patch
@@ -1,6 +1,5 @@
-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
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
 @@ -599,6 +599,8 @@
  	va = kmalloc(size, GFP_ATOMIC | __GFP_ZERO);
  	if (va)

diff --git a/net-wireless/broadcom-sta/files/014-linux414.patch b/net-wireless/broadcom-sta/files/014-linux414.patch
index 0576aa5cf97c..256a4d90216b 100644
--- a/net-wireless/broadcom-sta/files/014-linux414.patch
+++ b/net-wireless/broadcom-sta/files/014-linux414.patch
@@ -4,12 +4,6 @@ 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)

diff --git a/net-wireless/broadcom-sta/files/015-linux600.patch b/net-wireless/broadcom-sta/files/015-linux600.patch
index 8645907bbae4..2b02046cb328 100644
--- a/net-wireless/broadcom-sta/files/015-linux600.patch
+++ b/net-wireless/broadcom-sta/files/015-linux600.patch
@@ -9,12 +9,6 @@ See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/com
 
 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,

diff --git a/net-wireless/broadcom-sta/files/016-linux601.patch b/net-wireless/broadcom-sta/files/016-linux601.patch
index 721967d275c2..e099b789bd6c 100644
--- a/net-wireless/broadcom-sta/files/016-linux601.patch
+++ b/net-wireless/broadcom-sta/files/016-linux601.patch
@@ -1,6 +1,5 @@
-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
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
 @@ -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

diff --git a/net-wireless/broadcom-sta/files/017-handle-new-header-name-6.12.patch b/net-wireless/broadcom-sta/files/017-handle-new-header-name-6.12.patch
new file mode 100644
index 000000000000..f9906f16aeb0
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/017-handle-new-header-name-6.12.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/947928
+
+Adds support for the new name of the asm/unaligned.h header file for kernels >=6.12.0 (header file was renamed to "linux/unaligned.h")
+Bug found by Sam Petch 
+Patch by Sam Petch
+
+TESTING DETAILS:
+
+Bugfix tested by Sam Petch on kernels: gentoo-sources:6.6.67, gentoo-sources:6.12.4-r1, gentoo-sources:6.12.9
+
+Patch tested on kernels: gentoo-sources:6.6.67, gentoo-sources:6.12.9
+
+Bugfix and patch tested on device: 2012 Macbook Pro (A1278) running Gentoo Linux with Gnome Desktop / OpenRC profile
+
+Chipset: BCM4331 (Broadcom)
+
+Contact: sam.petch.recall824@passinbox.com
+
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -56,7 +56,12 @@
+ #include <asm/irq.h>
+ #include <asm/pgtable.h>
+ #include <asm/uaccess.h>
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
++#include <linux/unaligned.h>
++#else
+ #include <asm/unaligned.h>
++#endif
+ 
+ #include <proto/802.1d.h>
+ 

diff --git a/net-wireless/broadcom-sta/files/018-broadcom-wl-fix-linux-6.13.patch b/net-wireless/broadcom-sta/files/018-broadcom-wl-fix-linux-6.13.patch
new file mode 100644
index 000000000000..940eb7978c53
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/018-broadcom-wl-fix-linux-6.13.patch
@@ -0,0 +1,27 @@
+From  https://gist.github.com/joanbm/72189c81ff67b39d36a660cf00483ccb
+From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
+Date: Sat, 12 Oct 2024 11:54:40 +0000
+Subject: [PATCH] Tentative patch for broadcom-wl 6.30.223.271 driver for Linux
+ 6.13-rc1
+
+The net/lib80211.h header has been removed by commit
+"wifi: ipw2x00/lib80211: move remaining lib80211 into libipw"
+(Johannes Berg, 7 Oct 2024).
+The header does not appear to be actually used anywhere, so remove it.
+
+ #include <asm/irq.h>
+ #include <asm/pgtable.h>
+--- a/src/include/linuxver.h
++++ b/src/include/linuxver.h
+@@ -147,7 +147,7 @@ typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs *ptregs);
+ #include <linux/sched.h>
+ #endif
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
+ #include <net/lib80211.h>
+ #endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
+-- 
+2.47.0
+

diff --git a/net-wireless/broadcom-sta/files/019-broadcom-wl-fix-linux-6.14.patch b/net-wireless/broadcom-sta/files/019-broadcom-wl-fix-linux-6.14.patch
new file mode 100644
index 000000000000..a431b8f060d8
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/019-broadcom-wl-fix-linux-6.14.patch
@@ -0,0 +1,40 @@
+From https://gist.github.com/joanbm/b711bafdcb065d57364a701061b902a3
+From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
+Date: Sun, 8 Dec 2024 17:57:43 +0000
+Subject: [PATCH] Tentative fix for broadcom-wl 6.30.223.271 driver for Linux
+ 6.14-rc1
+
+Related to the new parameter for get_tx_power introduced in
+"wifi: cfg80211: send MLO links tx power info in GET_INTERFACE"
+(Rameshkumar Sundaram, 25 Nov 2024).
+
+As the driver doesn't support Multi-Link, we just ignore it afterwards.
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -99,7 +99,10 @@ static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy,
+            enum tx_power_setting type, s32 dbm);
+ #endif
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)
++static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
++                                    unsigned int link_id, s32 *dbm);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
+ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm);
+ #else
+ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm);
+@@ -1152,7 +1155,10 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type, s32 db
+ 	return err;
+ }
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)
++static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
++                                    unsigned int link_id, s32 *dbm)
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
+ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm)
+ #else
+ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm)
+-- 
+2.48.1
+


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2021-04-11  8:09 Joonas Niilola
  0 siblings, 0 replies; 7+ messages in thread
From: Joonas Niilola @ 2021-04-11  8:09 UTC (permalink / raw
  To: gentoo-commits

commit:     1460a7472a1a86edb1bb089bb321b4f5562ddc9d
Author:     Marco Genasci <fedeliallalinea <AT> gmail <DOT> com>
AuthorDate: Sat Apr  3 16:23:35 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Apr 11 08:06:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1460a747

net-wireless/broadcom-sta: linux >=5.9 support

Closes: https://bugs.gentoo.org/761286
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Marco Genasci <fedeliallalinea <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20246
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../broadcom-sta-6.30.223.271-r6.ebuild            |   1 +
 .../broadcom-sta-6.30.223.271-r6-linux-5.9.patch   | 211 +++++++++++++++++++++
 2 files changed, 212 insertions(+)

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
index a75c785b267..57a5de8d0d2 100644
--- 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
@@ -34,6 +34,7 @@ PATCHES=(
 	"${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)"

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
new file mode 100644
index 00000000000..6ef476464c0
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r6-linux-5.9.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


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2019-08-20 11:47 Louis Sautier
  0 siblings, 0 replies; 7+ messages in thread
From: Louis Sautier @ 2019-08-20 11:47 UTC (permalink / raw
  To: gentoo-commits

commit:     50d614cc8c602bbc5ced0bab0c5de1ca3a91567d
Author:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 21 19:16:54 2019 +0000
Commit:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Tue Aug 20 11:47:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d614cc

net-wireless/broadcom-sta: fix build for kernel 5.1, EAPI=7

* Apply Ubuntu's patch for the 5.1 kernel, taken from
  http://launchpadlibrarian.net/429676743/bcmwl_6.30.223.271+bdcom-0ubuntu4_6.30.223.271+bdcom-0ubuntu5.diff.gz.
* Bump to EAPI 7 and use an array for PATCHES, fix one patch that didn't
  apply with -p1.

Closes: https://bugs.gentoo.org/685214
Closes: https://github.com/gentoo/gentoo/pull/12500
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>

 ....ebuild => broadcom-sta-6.30.223.271-r5.ebuild} | 32 ++++++++++------------
 .../files/broadcom-sta-6.30.223.141-makefile.patch |  4 +--
 .../broadcom-sta-6.30.223.271-r5-linux-5.1.patch   | 29 ++++++++++++++++++++
 3 files changed, 46 insertions(+), 19 deletions(-)

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-r5.ebuild
similarity index 82%
rename from net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r4.ebuild
rename to net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
index 95eeba5c483..91581b52a4e 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-r5.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 inherit eutils linux-info linux-mod
 
 DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
@@ -71,22 +71,20 @@ pkg_setup() {
 	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" \
-		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.11.patch" \
-		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch" \
+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"
-
-	epatch_user
-}
+		"${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.1.patch"
+)
 
 src_install() {
 	linux-mod_src_install

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
index 09c495d2a10..d5b97fe87eb 100644
--- 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
@@ -1,5 +1,5 @@
---- Makefile.old	2013-04-28 22:42:59.000000000 +0200
-+++ Makefile	2013-04-28 22:45:53.000000000 +0200
+--- 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

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
new file mode 100644
index 00000000000..fcee46ea3d0
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.1.patch
@@ -0,0 +1,29 @@
+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


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2018-03-25 22:07 Gilles Dartiguelongue
  0 siblings, 0 replies; 7+ messages in thread
From: Gilles Dartiguelongue @ 2018-03-25 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     512c492ad7da750b2d9e1c794b2dee8c774eb3aa
Author:     Nick Sarnie <commendsarnex <AT> gmail <DOT> com>
AuthorDate: Tue Mar 13 19:17:30 2018 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Sun Mar 25 22:07:42 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=512c492a

net-wireless/broadcom-sta: Fix build on 4.15

Bug: https://bugs.gentoo.org/646106
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Closes: https://github.com/gentoo/gentoo/pull/7449

 .../broadcom-sta-6.30.223.271-r4.ebuild            |  5 +-
 .../broadcom-sta-6.30.223.271-r4-linux-4.15.patch  | 63 ++++++++++++++++++++++
 2 files changed, 66 insertions(+), 2 deletions(-)

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 34b37eceeaf..b5e03a3184f 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
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -81,7 +81,8 @@ src_prepare() {
 		"${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.12.patch" \
+		"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.15.patch"
 
 	epatch_user
 }

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
new file mode 100644
index 00000000000..91c4d89519c
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch
@@ -0,0 +1,63 @@
+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


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2015-11-02 17:31 Matt Turner
  0 siblings, 0 replies; 7+ messages in thread
From: Matt Turner @ 2015-11-02 17:31 UTC (permalink / raw
  To: gentoo-commits

commit:     156b8869e520a9ba53e0e02bafd9831c4a78b2c9
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  2 17:30:44 2015 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Nov  2 17:31:59 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=156b8869

net-wireless/broadcom-sta: Readd necessary patch hunk.

Necessary to prevent a hang.

Bug: https://bugs.gentoo.org/562620

 ...30.223.271.ebuild => broadcom-sta-6.30.223.271-r1.ebuild} |  1 +
 .../files/broadcom-sta-6.30.223.271-r1-linux-3.18.patch      | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r1.ebuild
similarity index 97%
rename from net-wireless/broadcom-sta/broadcom-sta-6.30.223.271.ebuild
rename to net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r1.ebuild
index bf18fda..0d61639 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r1.ebuild
@@ -63,6 +63,7 @@ src_prepare() {
 		"${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

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
new file mode 100644
index 0000000..9a0e713
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r1-linux-3.18.patch
@@ -0,0 +1,12 @@
+--- 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);
+ 


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
@ 2015-08-22 19:19 Matt Turner
  0 siblings, 0 replies; 7+ messages in thread
From: Matt Turner @ 2015-08-22 19:19 UTC (permalink / raw
  To: gentoo-commits

commit:     f64619dcd60422663f465644a6f2171b78ec181d
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 22 19:23:11 2015 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Aug 22 19:23:27 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f64619dc

net-wireless/broadcom-sta: Add patch for Linux 4.2.

Package-Manager: portage-2.2.20.1
Bug: https://bugs.gentoo.org/557338

 .../broadcom-sta-6.30.223.248-r4.ebuild            | 78 ++++++++++++++++++++++
 .../broadcom-sta-6.30.223.248-r4-linux-4.2.patch   | 16 +++++
 2 files changed, 94 insertions(+)

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
new file mode 100644
index 0000000..350bef9
--- /dev/null
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.248-r4.ebuild
@@ -0,0 +1,78 @@
+# 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"
+		"${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/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
new file mode 100644
index 0000000..9e9f8a1
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch
@@ -0,0 +1,16 @@
+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);


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

end of thread, other threads:[~2025-02-24  9:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-01 22:02 [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/ Stefan Strogin
  -- strict thread matches above, loose matches on Subject: below --
2025-02-24  9:26 Florian Schmaus
2021-04-11  8:09 Joonas Niilola
2019-08-20 11:47 Louis Sautier
2018-03-25 22:07 Gilles Dartiguelongue
2015-11-02 17:31 Matt Turner
2015-08-22 19:19 Matt Turner

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