The following describes a hacky workaround, which hopefully will lead to another patch.
I’m in the same situation as you, I was using linux519-broadcom-wl
with my BCM43228.
Two possible workarounds I could think of:
A. create a temporary package for linux60-broadcom-wl
B. try the alternative package broadcom-wl-dkms
I went with the second, thinking that if it just works, it would be easier. In hindsight option A might have been easier …
I’ll highlight the useful steps. The first two need internet access, but can be done on an older linux version.
1. install broadcom-wl-dkms
Steps
I used the GUI pamac, from dependencies it installed dkms
and uninstalled linux519-broadcom-wl
No magic, and reboot showed still no wifi, so that’s not another step.
So what is dkms anyway? man dkms
shows it has an install command, lets give it a whirl… after a few naive attempts I got:
[misha@delphin ~]$ sudo dkms install broadcom-wl/6.30.223.271
Sign command: /usr/lib/modules/6.0.0-1-MANJARO/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Binary sign-file not found, module won't be signed
Creating symlink /var/lib/dkms/broadcom-wl/6.30.223.271/source -> /usr/src/broadcom-wl-6.30.223.271
Error! Your kernel headers for kernel 6.0.0-1-MANJARO cannot be found at /usr/lib/modules/6.0.0-1-MANJARO/build or /usr/lib/modules/6.0.0-1-MANJARO/source.
Please install the linux-headers-6.0.0-1-MANJARO package or use the --kernelsourcedir option to tell DKMS where it's located.
Hooray for meaningful error messages … so lets give it what it wants.
2. install linux60-headers
Steps
Using pamac GUI again, yeah I know there’s a command line, I like GUIs haha.
Trying dkms install again …
[misha@delphin ~]$ sudo dkms install broadcom-wl/6.30.223.271
Sign command: /usr/lib/modules/6.0.0-1-MANJARO/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
applying patch 001-null-pointer-fix.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 2165 (offset 8 lines).
applying patch 002-rdtscl.patch...patching file src/shared/linux_osl.c
applying patch 003-linux47.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
applying patch 004-linux48.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 2386 (offset -2 lines).
Hunk #2 succeeded at 2496 (offset -2 lines).
Hunk #3 succeeded at 2928 (offset 4 lines).
applying patch 005-debian-fix-kernel-warnings.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
applying patch 006-linux411.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
patching file src/wl/sys/wl_linux.c
applying patch 007-linux412.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 54 (offset 1 line).
Hunk #2 succeeded at 471 (offset 1 line).
Hunk #3 succeeded at 2396 with fuzz 1 (offset 27 lines).
Hunk #4 succeeded at 2424 with fuzz 2 (offset 34 lines).
applying patch 008-linux415.patch...patching file src/wl/sys/wl_linux.c
applying patch 010-linux56.patch...patching file src/shared/linux_osl.c
Hunk #1 succeeded at 946 (offset 4 lines).
patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 586 (offset 4 lines).
Hunk #2 succeeded at 776 (offset 4 lines).
Hunk #3 succeeded at 3352 (offset 17 lines).
applying patch 011-linux59.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 38 with fuzz 2.
Hunk #2 succeeded at 444 (offset 8 lines).
patching file src/wl/sys/wl_iw.c
patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 1647 (offset 4 lines).
Hunk #2 succeeded at 1668 (offset 4 lines).
Hunk #3 succeeded at 1681 (offset 4 lines).
patching file src/wl/sys/wl_linux.h
patching file src/wl/sys/wlc_pub.h
applying patch 012-linux517.patch...patching file src/wl/sys/wl_linux.c
applying patch 013-linux518.patch...patching file src/shared/linux_osl.c
Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.0.0-1-MANJARO -C /usr/lib/modules/6.0.0-1-MANJARO/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.0-1-MANJARO (x86_64)
Consult /var/lib/dkms/broadcom-wl/6.30.223.271/build/make.log for more information.
Crash and burn! Oh well, what’s in make.log … a bunch of warnings and just one error:
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_bss_roaming_done’:
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:2384:18: error: ‘struct cfg80211_roam_info’ has no member named ‘bss’
2384 | .bss = bss,
| ^~~
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:2384:24: error: initialization of ‘const u8 *’ {aka ‘const unsigned char *’} from incompatible pointer type ‘struct cfg80211_bss *’ [-Werror=incompatible-pointer-types]
2384 | .bss = bss,
| ^~~
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:2384:24: note: (near initialization for ‘roam_info.req_ie’)
Looks a bit yuck, but the important bit is struct cfg80211_roam_info’ has no member named ‘bss’
.
With the pragmatic logic of “surely it won’t care if it doesn’t receive something it knows nothing about”, plus I’m not roaming across a mesh wifi network, I decided to delete the prickly part, aka. “Cutting out the BSS”.
I found that the bit of code is added by one of the patches in the package broadcom-wl-dkms
.
3. edit broadcom-wl patch file
Steps
Edit the patch file /usr/src/broadcom-wl-6.30.223.271/patches/007-linux412.patch
+ struct cfg80211_roam_info roam_info = {
+ /* .bss = bss, */ /* removed by Misha */
+ .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
Now there’s a highly irresponsible patch on a patch! Ideally another separate patch will be added to the package instead, with a more thorough understanding behind it.
4. dkms install broadcom-wl
Steps
Here we go again, this time I’ll trim the output:
[misha@delphin ~]$ sudo dkms install broadcom-wl/6.30.223.271
...
Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.0.0-1-MANJARO -C /usr/lib/modules/6.0.0-1-MANJARO/build M=/var/lib/dkms/broadcom-wl/6.30.223.271/build....
Signing module /var/lib/dkms/broadcom-wl/6.30.223.271/build/wl.ko
Cleaning build area...
wl.ko.zst:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /usr/lib/modules/6.0.0-1-MANJARO/updates/dkms/
depmod...
Much better. Still no wifi though. Some status …
[misha@delphin ~]$ dkms status broadcom-wl/6.30.223.271
broadcom-wl/6.30.223.271, 6.0.0-1-MANJARO, x86_64: installed
[misha@delphin ~]$ modinfo wl
filename: /lib/modules/6.0.0-1-MANJARO/updates/dkms/wl.ko.zst
license: MIXED/Proprietary
srcversion: A381D4132F4C558B7BB6575
alias: pci:v*d*sv*sd*bc02sc80i*
depends: cfg80211
retpoline: Y
name: wl
vermagic: 6.0.0-1-MANJARO SMP preempt mod_unload
... and other lines
5. modprobe wl
[misha@delphin ~]$ sudo modprobe wl
The wifi suddenly turned itself on, yay! And persisted over a reboot.
Caveat: this method will likely get undone by a new version of broadcom-wl-dkms
.