You are not logged in.

#1 2022-10-13 16:35:01

gingerglaahk
Member
Registered: 2022-10-13
Posts: 6

[Solved] Lost wifi connectivity after upgrading to linux kernel 6

After upgrading from kernel 5.19 to 6, I lost wifi connectivity.

I looked here and moved from broadcom-wl to broadcom-wl-dkms, installed linux-headers, and running

sudo dkms autoinstall

I get:

make -j12 KERNELRELEASE=6.0.1-arch1-1 -C /usr/lib/modules/6.0.1-arch1-1/build M=/var/lib/dkms/broadcom-wl/6.30.223.271/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.0.1-arch1-1 (x86_64)

The full build log file is here.

More possibly useful information is output of:

sudo lspci -vnn -d 14e4:                                   
06:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4352 802.11ac Wireless Network Adapter [14e4:43b1] (rev 03)
	Subsystem: ASUSTeK Computer Inc. Device [1043:85ba]
	Flags: fast devsel, IRQ 255, IOMMU group 24
	Memory at fc400000 (64-bit, non-prefetchable) [disabled] [size=32K]
	Memory at fc200000 (64-bit, non-prefetchable) [disabled] [size=2M]
	Capabilities: [48] Power Management version 3
	Capabilities: [58] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [68] Vendor Specific Information: Len=44 <?>
	Capabilities: [ac] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [13c] Device Serial Number <redacted-serial-number>
	Capabilities: [150] Power Budgeting <?>
	Capabilities: [160] Virtual Channel
	Capabilities: [1b0] Latency Tolerance Reporting
	Capabilities: [220] Physical Resizable BAR
	Kernel modules: bcma

Any help?

Last edited by gingerglaahk (2022-10-13 18:38:26)

Offline

#2 2022-10-13 16:42:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

Do the revisions reported by uname -a and by pacman -Q linux match?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2022-10-13 16:46:39

gingerglaahk
Member
Registered: 2022-10-13
Posts: 6

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

Yep - both are 6.0.1.arch1-1

Offline

#4 2022-10-13 16:47:29

gingerglaahk
Member
Registered: 2022-10-13
Posts: 6

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

Maybe I rushed to upgrade to 6 too early and package maintainer hasn't made/merged the relevant dkms patch for the new kernel?

Offline

#5 2022-10-13 17:33:08

loqs
Member
Registered: 2014-03-06
Posts: 17,480

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

Try applying this patch

diff --git a/trunk/007-linux412.patch b/trunk/007-linux412.patch
index 8abc73d..1673f06 100644
--- a/trunk/007-linux412.patch
+++ b/trunk/007-linux412.patch
@@ -1,43 +1,52 @@
+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 da36405..d3741eb 100644
+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,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+           enum nl80211_iftype type, struct vif_params *params);
-+#else
-            enum nl80211_iftype type, u32 *flags, struct vif_params *params);
+-           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,7 +470,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
+@@ -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,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+-                         enum nl80211_iftype type, u32 *flags,
+-   struct vif_params *params)
 +                         enum nl80211_iftype type,
-+#else
-                          enum nl80211_iftype type, u32 *flags,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
++                         u32 *flags,
 +#endif
-    struct vif_params *params)
++                         struct vif_params *params)
  {
  	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
-@@ -2361,6 +2369,20 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 	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_bss *bss;
-+	struct wlc_ssid *ssid;
-+	ssid = &wl->profile->ssid;
-+	bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
-+	ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
 +	struct cfg80211_roam_info roam_info = {
-+		.bss = bss,
++		.bssid = wl->profile->bssid,
 +		.req_ie = conn_info->req_ie,
 +		.req_ie_len = conn_info->req_ie_len,
 +		.resp_ie = conn_info->resp_ie,
@@ -46,10 +55,10 @@ index da36405..d3741eb 100644
 +#endif
  	s32 err = 0;
  
- 	wl_get_assoc_ies(wl);
-@@ -2368,12 +2390,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
- 	memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
- 	wl_update_bss_info(wl);
+ 	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,
@@ -66,3 +75,4 @@ index da36405..d3741eb 100644
  	WL_DBG(("Report roaming result\n"));
  
  	set_bit(WL_STATUS_CONNECTED, &wl->status);
+
diff --git a/trunk/014-linux414.patch b/trunk/014-linux414.patch
new file mode 100644
index 0000000..0576aa5
--- /dev/null
+++ b/trunk/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/trunk/015-linux600.patch b/trunk/015-linux600.patch
new file mode 100644
index 0000000..8645907
--- /dev/null
+++ b/trunk/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/trunk/PKGBUILD b/trunk/PKGBUILD
index ec40249..66ae688 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -11,7 +11,7 @@ pkgdesc='Broadcom 802.11 Linux STA wireless driver'
 arch=(x86_64)
 url='https://www.broadcom.com/site-search?filters[pages][content_type][type]=and&filters[pages][content_type][values][]=Downloads&page=1&per_page=10&q=802.11%20linux%20sta%20wireless%20driver'
 license=(custom)
-depends=(dkms)
+depends=(dkms linux linux-headers)
 conflicts=(broadcom-wl)
 install=broadcom-wl-dkms.install
 source=(broadcom-wl-dkms.conf
@@ -29,22 +29,26 @@ source=(broadcom-wl-dkms.conf
         011-linux59.patch
         012-linux517.patch
         013-linux518.patch
+        014-linux414.patch
+        015-linux600.patch
         "https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${pkgver//./_}.tar.gz")
 b2sums=('7c4eaa825a37358509a08e5105665eeabc9f097945b6fa163cd5722b00638da5889f5466bd2c5f1b01172f2d0c9fb195f6e18329f2880adb2774406684cbc4c0'
-        '9c271945a30069d01cefa24c7dae84f359dd2f181699464b34ab884e279fdf5c2d2673a0b2ebdee50df92f76d22da68c77bfd22d003becfd1879b4fd2d10c412'
+        'd16abde06bd5e74027994c0d32dc1207dc14aa7cec6c835f56989814e9346dd4760168ce899b1b41784c7922d9c590718c29f84bab514d31bcf6c613c872172a'
         '038150b9a50025dbd3c81d09755956216b83c0b54db29dc4bfbc3b46bd67cf4640ad643d69ba7f8d486f52cedeb00929b97e02152e72404e6126a05855f97d6f'
         'bbc80e1ac01683ccc2d940212347fc11c74bdc252d492ca79a292015ac25df6a153ac97cb6c0f0a8d51c1c33d5dc0de4fdd61b1958499b946dc817d29646b72f'
         'ecf3eb75f8eb3331b0a36b39851536de43cffd3b303db9e9f4fe6fe55d463c3343aba17a99668448427764a719e15e3e862d6a3dc0bc61cb68da9934fb427c6f'
         '7e091ac44616ea4cfa80b3a5563f4c6a235d2431b911f6bc52074a76b2c1d609dc546430f048abf042f862907f573c6b1dfa24c8c424aeefe73ff13ae3f34900'
         '3b65cccde7ed80bd88bf945cca6b71fca9eccc4a910666dad4df56a24471535e1d6007e1ea24567002c927357b525683b02c6a7ad2986aca738fc81ab736219f'
         '28ef5e50fa11fc15b409f3b3ee42aaf329756354ba8b7923d1b27939a6b21bd64b72a4adfb2eeff3c48bb8c4c1bc4294e8fd7744b83768974bf5d0592e20c148'
-        '8954b0005b84be6028affd21c114efe1ed3ffa3a3f5653b86fb8ece1850adcd0675649ce7faa418afaf48eb0ac4c9f4c1c0f7e19a5d1371b491b4a6130f70360'
+        '06035b1bca121c72b5e6bf120df644d5496d6020cf8537ec83917bb0f5b5a0a25129730f46201da2cc61e48cbcf4e9d3ed7757f3223e1d3b6e29b531c4c8fabb'
         '091e1da266ebaa0d429663facf3e81c849fe900c446e1c270ba23b65c15a99efeb1ae6c20905dfcc21b5f4bc3f91b32eb3b7bc9841f2a23508c71312403af774'
         '7c8012fa51592a3fca6dfde7a7a9c6dd37eb6c406d3f8695927e32c9e714c3faa23295b116a6cd97ec0403b123747b9095883bd7e3abe6c1888c3c9a4630f9f4'
         '21f7fc163ffcf6857f3a21a8519a42600fd6b3658d14b32191ef1142c817c10c8dc691a3bc39228927ac29d7b7ac5c3a62eb786853046bacb9cc74efb51b6cb0'
         'c1f522f6554a7bfe0f7b789b042ada14316ecc87bc196c83bec95f684152f323a4c31f60ff26843e36338b8c7949bf36719a5c8afa439ff71f7c74dae4c755b6'
         'd84d08161530bb9f05f627ec798a0897643869ea9b80781ae9eee85b072922c52e5127e55f04265c53fcfedc4e9da166eb3bb9f9fc2e139d62517ec54c2f45bb'
         'e5ae3570dc2f27105c50e6dec807c1f4f1a2824995e0951e7ff405114d519e4f33992d8d2ea2c2d4fc3f9271d57f89bfb5b6b5c79af2c89492209a86ad673456'
+        '0b1075bd59e8046969052ceb9cbe305ac2373b5d1600701ffcffb5219d3765ef5d15465c3aff63bbc547ed4f663dc4816d1b4fa09176d6c78828e488a9a863c4'
+        '7d4dfe48577456436d0932bd1eca78fc1f0a952e141f13641b93bb24161a9f6847152966631cc05a6d707f9cf8adbded55a19aeaa2c15c963fffb5db9eff9f63'
         'e9d01c1a1a63c07f720e3ee53ee3ef634ab12694135300cb0ce47ade0e9e0084967a0b6df64d983e8184240eb3defb128f650bddb7727e901d50315307f3398a')
 
 prepare() {
diff --git a/trunk/dkms.conf.in b/trunk/dkms.conf.in
index de5ab1e..9a80166 100644
--- a/trunk/dkms.conf.in
+++ b/trunk/dkms.conf.in
@@ -14,4 +14,6 @@ PATCH[8]="010-linux56.patch"
 PATCH[9]="011-linux59.patch"
 PATCH[10]="012-linux517.patch"
 PATCH[11]="013-linux518.patch"
+PATCH[12]="014-linux414.patch"
+PATCH[13]="015-linux600.patch"
 AUTOINSTALL="yes"

Offline

#6 2022-10-13 17:48:15

gingerglaahk
Member
Registered: 2022-10-13
Posts: 6

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

loqs wrote:

Try applying this patch

How do I apply it?
Do the changes manually to the src files?

Last edited by gingerglaahk (2022-10-13 17:48:58)

Offline

#7 2022-10-13 17:56:01

loqs
Member
Registered: 2014-03-06
Posts: 17,480

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

$ git clone https://github.com/archlinux/svntogit-community.git --single-branch --branch 'packages/broadcom-wl-dkms' broadcom-wl-dkms # Fetch the PKGBUILD and patches
$ cd broadcom-wl-dkms/trunk/
$ curl -o PKGBUILD.diff http://ix.io/4d4b # download the diff
$ git apply PKGBUILD.diff # apply it
$ makepkg -rsi # build new package

Offline

#8 2022-10-13 18:09:18

gingerglaahk
Member
Registered: 2022-10-13
Posts: 6

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

Works! WiFi connectivity restored smile

Thanks for the quick tutorial on editing PKGBUILDs (also never used git apply before), new to Arch so haven't had the chance to do that yet.

Offline

#9 2022-10-13 18:39:18

loqs
Member
Registered: 2014-03-06
Posts: 17,480

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

Please consider opening a bug report to let the package maintainer know it needs updating for 6.0 and link it to this thread.

Offline

#10 2022-10-13 21:49:54

gingerglaahk
Member
Registered: 2022-10-13
Posts: 6

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

It seems like you (or somebody else) already did and linked to this thread.
I'll be sure to do this as well in the future.
Thanks again!

Offline

#11 2022-10-14 07:20:32

xyproto
Package Maintainer (PM)
From: Oslo
Registered: 2011-01-11
Posts: 43
Website

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

I updated the broadcom-wl-dkms package just now. Thanks for the bug report and patches. I really appreciate the contributions, loqs, they are always precise and useful!

Offline

#12 2022-10-14 07:56:10

froli
Member
From: Germany
Registered: 2008-06-17
Posts: 455

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

loqs wrote:

Try applying this patch

diff --git a/trunk/007-linux412.patch b/trunk/007-linux412.patch
index 8abc73d..1673f06 100644
--- a/trunk/007-linux412.patch
+++ b/trunk/007-linux412.patch
@@ -1,43 +1,52 @@
+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 da36405..d3741eb 100644
+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,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+           enum nl80211_iftype type, struct vif_params *params);
-+#else
-            enum nl80211_iftype type, u32 *flags, struct vif_params *params);
+-           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,7 +470,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
+@@ -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,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+-                         enum nl80211_iftype type, u32 *flags,
+-   struct vif_params *params)
 +                         enum nl80211_iftype type,
-+#else
-                          enum nl80211_iftype type, u32 *flags,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
++                         u32 *flags,
 +#endif
-    struct vif_params *params)
++                         struct vif_params *params)
  {
  	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
-@@ -2361,6 +2369,20 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 	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_bss *bss;
-+	struct wlc_ssid *ssid;
-+	ssid = &wl->profile->ssid;
-+	bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
-+	ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
 +	struct cfg80211_roam_info roam_info = {
-+		.bss = bss,
++		.bssid = wl->profile->bssid,
 +		.req_ie = conn_info->req_ie,
 +		.req_ie_len = conn_info->req_ie_len,
 +		.resp_ie = conn_info->resp_ie,
@@ -46,10 +55,10 @@ index da36405..d3741eb 100644
 +#endif
  	s32 err = 0;
  
- 	wl_get_assoc_ies(wl);
-@@ -2368,12 +2390,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
- 	memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
- 	wl_update_bss_info(wl);
+ 	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,
@@ -66,3 +75,4 @@ index da36405..d3741eb 100644
  	WL_DBG(("Report roaming result\n"));
  
  	set_bit(WL_STATUS_CONNECTED, &wl->status);
+
diff --git a/trunk/014-linux414.patch b/trunk/014-linux414.patch
new file mode 100644
index 0000000..0576aa5
--- /dev/null
+++ b/trunk/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/trunk/015-linux600.patch b/trunk/015-linux600.patch
new file mode 100644
index 0000000..8645907
--- /dev/null
+++ b/trunk/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/trunk/PKGBUILD b/trunk/PKGBUILD
index ec40249..66ae688 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -11,7 +11,7 @@ pkgdesc='Broadcom 802.11 Linux STA wireless driver'
 arch=(x86_64)
 url='https://www.broadcom.com/site-search?filters[pages][content_type][type]=and&filters[pages][content_type][values][]=Downloads&page=1&per_page=10&q=802.11%20linux%20sta%20wireless%20driver'
 license=(custom)
-depends=(dkms)
+depends=(dkms linux linux-headers)
 conflicts=(broadcom-wl)
 install=broadcom-wl-dkms.install
 source=(broadcom-wl-dkms.conf
@@ -29,22 +29,26 @@ source=(broadcom-wl-dkms.conf
         011-linux59.patch
         012-linux517.patch
         013-linux518.patch
+        014-linux414.patch
+        015-linux600.patch
         "https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${pkgver//./_}.tar.gz")
 b2sums=('7c4eaa825a37358509a08e5105665eeabc9f097945b6fa163cd5722b00638da5889f5466bd2c5f1b01172f2d0c9fb195f6e18329f2880adb2774406684cbc4c0'
-        '9c271945a30069d01cefa24c7dae84f359dd2f181699464b34ab884e279fdf5c2d2673a0b2ebdee50df92f76d22da68c77bfd22d003becfd1879b4fd2d10c412'
+        'd16abde06bd5e74027994c0d32dc1207dc14aa7cec6c835f56989814e9346dd4760168ce899b1b41784c7922d9c590718c29f84bab514d31bcf6c613c872172a'
         '038150b9a50025dbd3c81d09755956216b83c0b54db29dc4bfbc3b46bd67cf4640ad643d69ba7f8d486f52cedeb00929b97e02152e72404e6126a05855f97d6f'
         'bbc80e1ac01683ccc2d940212347fc11c74bdc252d492ca79a292015ac25df6a153ac97cb6c0f0a8d51c1c33d5dc0de4fdd61b1958499b946dc817d29646b72f'
         'ecf3eb75f8eb3331b0a36b39851536de43cffd3b303db9e9f4fe6fe55d463c3343aba17a99668448427764a719e15e3e862d6a3dc0bc61cb68da9934fb427c6f'
         '7e091ac44616ea4cfa80b3a5563f4c6a235d2431b911f6bc52074a76b2c1d609dc546430f048abf042f862907f573c6b1dfa24c8c424aeefe73ff13ae3f34900'
         '3b65cccde7ed80bd88bf945cca6b71fca9eccc4a910666dad4df56a24471535e1d6007e1ea24567002c927357b525683b02c6a7ad2986aca738fc81ab736219f'
         '28ef5e50fa11fc15b409f3b3ee42aaf329756354ba8b7923d1b27939a6b21bd64b72a4adfb2eeff3c48bb8c4c1bc4294e8fd7744b83768974bf5d0592e20c148'
-        '8954b0005b84be6028affd21c114efe1ed3ffa3a3f5653b86fb8ece1850adcd0675649ce7faa418afaf48eb0ac4c9f4c1c0f7e19a5d1371b491b4a6130f70360'
+        '06035b1bca121c72b5e6bf120df644d5496d6020cf8537ec83917bb0f5b5a0a25129730f46201da2cc61e48cbcf4e9d3ed7757f3223e1d3b6e29b531c4c8fabb'
         '091e1da266ebaa0d429663facf3e81c849fe900c446e1c270ba23b65c15a99efeb1ae6c20905dfcc21b5f4bc3f91b32eb3b7bc9841f2a23508c71312403af774'
         '7c8012fa51592a3fca6dfde7a7a9c6dd37eb6c406d3f8695927e32c9e714c3faa23295b116a6cd97ec0403b123747b9095883bd7e3abe6c1888c3c9a4630f9f4'
         '21f7fc163ffcf6857f3a21a8519a42600fd6b3658d14b32191ef1142c817c10c8dc691a3bc39228927ac29d7b7ac5c3a62eb786853046bacb9cc74efb51b6cb0'
         'c1f522f6554a7bfe0f7b789b042ada14316ecc87bc196c83bec95f684152f323a4c31f60ff26843e36338b8c7949bf36719a5c8afa439ff71f7c74dae4c755b6'
         'd84d08161530bb9f05f627ec798a0897643869ea9b80781ae9eee85b072922c52e5127e55f04265c53fcfedc4e9da166eb3bb9f9fc2e139d62517ec54c2f45bb'
         'e5ae3570dc2f27105c50e6dec807c1f4f1a2824995e0951e7ff405114d519e4f33992d8d2ea2c2d4fc3f9271d57f89bfb5b6b5c79af2c89492209a86ad673456'
+        '0b1075bd59e8046969052ceb9cbe305ac2373b5d1600701ffcffb5219d3765ef5d15465c3aff63bbc547ed4f663dc4816d1b4fa09176d6c78828e488a9a863c4'
+        '7d4dfe48577456436d0932bd1eca78fc1f0a952e141f13641b93bb24161a9f6847152966631cc05a6d707f9cf8adbded55a19aeaa2c15c963fffb5db9eff9f63'
         'e9d01c1a1a63c07f720e3ee53ee3ef634ab12694135300cb0ce47ade0e9e0084967a0b6df64d983e8184240eb3defb128f650bddb7727e901d50315307f3398a')
 
 prepare() {
diff --git a/trunk/dkms.conf.in b/trunk/dkms.conf.in
index de5ab1e..9a80166 100644
--- a/trunk/dkms.conf.in
+++ b/trunk/dkms.conf.in
@@ -14,4 +14,6 @@ PATCH[8]="010-linux56.patch"
 PATCH[9]="011-linux59.patch"
 PATCH[10]="012-linux517.patch"
 PATCH[11]="013-linux518.patch"
+PATCH[12]="014-linux414.patch"
+PATCH[13]="015-linux600.patch"
 AUTOINSTALL="yes"

Amazing! Thank you. Where did you find this? Did you come up with it yourself? I found this thread from the bug report, without it I would have been at a complete loss last night.

Last edited by froli (2022-10-14 07:57:11)


archlinux on Macbook Pro 10,1

Offline

#13 2022-10-14 16:15:56

loqs
Member
Registered: 2014-03-06
Posts: 17,480

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

froli wrote:

Amazing! Thank you. Where did you find this? Did you come up with it yourself?

I only selected the required patches others had already created:
The updated linux 4.12 patch is from https://github.com/antoineco/broadcom-w … 0111c29748
The 4.14 patch is the amd64 part of https://sources.debian.org/patches/broa … 414.patch/
The 6.0 patch is from https://github.com/antoineco/broadcom-w … f3387d9146

Offline

#14 2022-10-15 16:14:22

wowblvck
Member
Registered: 2022-10-15
Posts: 6

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

loqs wrote:
$ git clone https://github.com/archlinux/svntogit-community.git --single-branch --branch 'packages/broadcom-wl-dkms' broadcom-wl-dkms # Fetch the PKGBUILD and patches
$ cd broadcom-wl-dkms/trunk/
$ curl -o PKGBUILD.diff http://ix.io/4d4b # download the diff
$ git apply PKGBUILD.diff # apply it
$ makepkg -rsi # build new package

Linux archpc 5.19.16-hardened1-1-hardened #1 SMP PREEMPT_DYNAMIC Sat, 15 Oct 2022 12:11:10 +0000 x86_64 GNU/Linux
linux 6.0.1.arch2-1

My Linux kerne 5.19.16, but linux 6.0.1, its normally?

git apply PKGBUILD.diff not worked for me

trunk/PKGBUILD.diff:58: space before tab in indent.
        struct wireless_dev *wdev;
trunk/PKGBUILD.diff:83: space before tab in indent.
        err = wl_get_assoc_ies(wl);
trunk/PKGBUILD.diff:85: space before tab in indent.
                return err;
trunk/PKGBUILD.diff:86: trailing whitespace.
 
trunk/PKGBUILD.diff:117: space before tab in indent.
        struct file *fp = (struct file *)image;
error: error applying changes: trunk/007-linux412.patch:1
error: trunk/007-linux412.patch: failed to apply patch
error: trunk/014-linux414.patch: already in working directory
error: trunk/015-linux600.patch: already in working directory
error: error applying changes: trunk/PKGBUILD:29
error: trunk/PKGBUILD: failed to apply patch
error: error applying changes: trunk/dkms.conf.in:14
error: trunk/dkms.conf.in: failed to apply patch

Last edited by wowblvck (2022-10-15 16:30:33)

Offline

#15 2022-10-16 15:49:31

astrea_apn
Member
Registered: 2022-10-13
Posts: 2

Re: [Solved] Lost wifi connectivity after upgrading to linux kernel 6

works for me.
Thanks

Offline

Board footer

Powered by FluxBB