Skip to content

animatek/broadcom-wl-dkms-kernel6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

broadcom-wl-dkms-kernel6

Patches for broadcom-sta-dkms (BCM4360 / BCM43xx WiFi driver) to compile and work on Linux kernel 6.x.

The official broadcom-sta-dkms package (v6.30.223.271) is from 2015 and fails to build on kernels ≥ 6.x due to multiple API changes. This repo provides the necessary patches and a multi-distro install script.

Supported distros

Distro Package manager Status
Ubuntu / Linux Mint / Debian apt ✅ Tested
Arch Linux / Manjaro pacman + AUR (yay/paru) ✅ Supported
Fedora dnf + RPM Fusion ✅ Supported
openSUSE zypper + Packman ✅ Supported

Tested hardware

Hardware Chip Distro Kernel
MacBook Pro BCM4360 Linux Mint 22 6.17.0-19-generic

If it works for you on other hardware/distros/kernels, open a PR to add it to the table.

Installation

git clone https://github.com/animatek/broadcom-wl-dkms-kernel6
cd broadcom-wl-dkms-kernel6
sudo bash install.sh

The script will:

  1. Detect your distro and install broadcom-sta-dkms from the appropriate repo
  2. Apply the patches to the driver source
  3. Build and install the kernel module via DKMS
  4. Blacklist conflicting drivers (b43, brcmfmac, etc.)
  5. Load the wl module immediately

Manual patching

If you prefer to apply the patches by hand:

# Debian/Ubuntu/Mint
sudo apt install broadcom-sta-dkms

# Then for any distro:
sudo dkms remove broadcom-sta/6.30.223.271 --all

for p in patches/*.patch; do
    sudo patch -d /usr/src/broadcom-sta-6.30.223.271 -p1 < "$p"
done

sudo dkms add /usr/src/broadcom-sta-6.30.223.271
sudo dkms build broadcom-sta/6.30.223.271
sudo dkms install broadcom-sta/6.30.223.271
sudo modprobe wl

What was broken and why

1. Kbuild system changes — Makefile

EXTRA_CFLAGS and EXTRA_LDFLAGS are no longer supported for external modules in kernel 6.x, and $(src) no longer resolves correctly for include paths.

Fix: Use ccflags-y with $(KBUILD_EXTMOD) for includes, and ldflags-y for the binary blob.

2. Timer API removed in kernel 6.15+ — wl_linux.c

  • from_timer() → replaced by timer_container_of()
  • del_timer() → replaced by timer_delete()

Fix: Compatibility defines guarded by LINUX_VERSION_CODE.

3. CFG80211 API changes in kernel 6.15+ — wl_cfg80211_hybrid.c

A new int radio_idx parameter was added to:

  • set_wiphy_params()
  • set_tx_power()
  • get_tx_power()

Fix: Version-conditional function signatures with #if LINUX_VERSION_CODE.

DKMS — automatic rebuild on kernel updates

Because the module is installed via DKMS, it will rebuild automatically when you update your kernel. No manual intervention needed.

Troubleshooting

Module loads but no WiFi interface:

sudo modprobe -r b43 brcmfmac brcmsmac ssb bcma
sudo modprobe wl
iw dev

Build fails:

cat /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log

Check driver is loaded:

lsmod | grep wl
dmesg | grep wl

License

The patch files are MIT licensed. The broadcom-sta driver source is Broadcom proprietary — this repo only distributes patch files, not the driver source or binary blobs.

Credits

Patches developed by reverse-engineering the kernel 6.x API changes against broadcom-sta-dkms v6.30.223.271 on a MacBook Pro with BCM4360 running Linux Mint 22 / kernel 6.17.

About

Patches for broadcom-sta-dkms (BCM4360/BCM43xx) to work on Linux kernel 6.x

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages