RFC wifi: add a driver for Broadcom BCM4323x USB adapters
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest17 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/17 | wifi: brcmsmac: make d11.h self-containeddrivers/ drivers/ drivers/ +4 more | +45 | 0 replies | |
| 2/17 | wifi: brcm80211: move d11.h to the shared include directorydrivers/ drivers/ drivers/ +3 more | +5 | 0 replies | |
| 3/17 | wifi: brcmsmac: look up OFDM rates in rate.cdrivers/ drivers/ drivers/ +1 more | +19 | 0 replies | |
| 4/17 | wifi: brcmsmac: give the rate tables and helpers a brcmu_ prefixdrivers/ drivers/ drivers/ | +121 | 0 replies | |
| 5/17 | wifi: brcmsmac: round short-GI L-SIG lengths up to whole symbolsdrivers/ | +5 | 0 replies | |
| 6/17 | wifi: brcmsmac: pass the band to the PLCP and frame timing helpersdrivers/ drivers/ drivers/ | +150 | 0 replies | |
| 7/17 | wifi: brcmsmac: move the PLCP and frame timing helpers to rate.cdrivers/ drivers/ drivers/ +1 more | +518 | 0 replies | |
| 8/17 | wifi: brcm80211: move the rate helpers of brcmsmac to brcmutildrivers/ drivers/ drivers/ +5 more | +117 | 0 replies | |
| 9/17 | wifi: brcm80211: move the USB bootloader definitions to a shared headerdrivers/ drivers/ | +78 | 0 replies | |
| 10/17 | wifi: mac80211: export ieee80211_get_bssid() againinclude/ net/ net/ | +13 | 0 replies | |
| 11/17 | wifi: bcm4323x: add the shared definitionsdrivers/ | +258 | 0 replies | |
| 12/17 | wifi: bcm4323x: add the USB transport and firmware setupdrivers/ | +545 | 0 replies | |
| 13/17 | wifi: bcm4323x: add the receive pathdrivers/ | +317 | 0 replies | |
| 14/17 | wifi: bcm4323x: add the transmit pathdrivers/ | +1386 | 0 replies | |
| 15/17 | wifi: bcm4323x: add the mac80211 operationsdrivers/ | +1495 | 0 replies | |
| 16/17 | wifi: bcm4323x: add LED and WPS button supportdrivers/ | +221 | 0 replies | |
| 17/17 | wifi: bcm4323x: add Kconfig, Makefile and MAINTAINERS entryMAINTAINERS drivers/ drivers/ +2 more | +27 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH wireless-next 00/17] wifi: add a driver for Broadcom BCM4323x USB adapters
This series adds support for the following 802.11n USB adapters:
- Broadcom BCM43231 (Netgear WNA3100, Dynex DX-NUSB)
- BCM4323 (Netgear WNDA3100v2, Belkin F9L1101 and others)
The protocol was inferred from USB captures of the vendor's Windows driver, cross referenced with code from brcmsmac, brcmfmac and b43. The code which are copied almost as-is from the referenced drivers are indicated in the comments of the code
The driver supports:
- station, P2P client and monitor interfaces
- HT20 and HT40, A-MPDU and A-MSDU transmission
- 2.4 GHz channels 1-14 and, on the BCM4323, 5 GHz channels 36-165
- hardware CCMP with management frame protection
- the LEDs and the WPS button
Power save, AP, P2P GO, IBSS and mesh interfaces and hardware TKIP/WEP can be added in later patches
The series
----------
Patches 1-10 prepare brcm80211, so that the driver shares brcmsmac's and brcmfmac's code instead of copying it:
- 1-2 make d11.h self-contained and move it, with the transmit frame ID masks, to the shared include directory;
- 3-4 prepare brcmsmac's rate tables and rateset helpers for brcmutil;
- 5 fixes brcmsmac's L-SIG length of short-GI frames, which could be one symbol shorter than the frame;
- 6-7 make the PLCP and frame timing helpers take the band instead of brcmsmac's state, and move them to rate.c;
- 8 moves rate.c, with all of these tables and helpers, to brcmutil;
- 9 moves brcmfmac's USB bootloader definitions to a shared header, as these adapters boot through the same bootloader.
- 10 exports ieee80211_get_bssid() from mac80211 again, reverting 391234eb4831 ("wifi: mac80211: unexport ieee80211_get_bssid()")
Apart from patch 5, these patches change no behaviour; patch 6 only drops the device name from the helpers' error messages. The brcmsmac and brcmfmac changes are compile-tested only.
Patches 11-17 add the driver, with the Kconfig, Makefile and MAINTAINERS entry coming last.
Firmware
--------
The driver requires brcm/bcm4323x.bin. As captured from the 5.100.68.46 version of the Windows driver.
sha256 cc286a529396434a38e59382dcd46fa92a57f1cd1a38eea20d2b24dec028cf29 This firmware needs to be in linux-firmware.
Testing
-------
On a Belkin F9L1101 associated to a 5 GHz HT40 WPA2 access point, single-stream TCP ran at 107-128 Mbit/s in both directions.
AI USE
------
Reverse engineering is done with assistance from LLMs. Code has been reviewed us manually.
Ragul Balaji (17):
wifi: brcmsmac: make d11.h self-contained
wifi: brcm80211: move d11.h to the shared include directory
wifi: brcmsmac: look up OFDM rates in rate.c
wifi: brcmsmac: give the rate tables and helpers a brcmu_ prefix
wifi: brcmsmac: round short-GI L-SIG lengths up to whole symbols
wifi: brcmsmac: pass the band to the PLCP and frame timing helpers
wifi: brcmsmac: move the PLCP and frame timing helpers to rate.c
wifi: brcm80211: move the rate helpers of brcmsmac to brcmutil
wifi: brcm80211: move the USB bootloader definitions to a shared
header
wifi: mac80211: export ieee80211_get_bssid() again
wifi: bcm4323x: add the shared definitions
wifi: bcm4323x: add the USB transport and firmware setup
wifi: bcm4323x: add the receive path
wifi: bcm4323x: add the transmit path
wifi: bcm4323x: add the mac80211 operations
wifi: bcm4323x: add LED and WPS button support
wifi: bcm4323x: add Kconfig, Makefile and MAINTAINERS entry
MAINTAINERS | 7 +
.../net/wireless/broadcom/brcm80211/Kconfig | 1 +
.../net/wireless/broadcom/brcm80211/Makefile | 1 +
.../broadcom/brcm80211/bcm4323x/Kconfig | 12 +
.../broadcom/brcm80211/bcm4323x/Makefile | 6 +
.../broadcom/brcm80211/bcm4323x/bcm4323x.h | 258 +++
.../brcm80211/bcm4323x/bcm4323x_core.c | 545 ++++++
.../brcm80211/bcm4323x/bcm4323x_led.c | 221 +++
.../brcm80211/bcm4323x/bcm4323x_mac.c | 1495 +++++++++++++++++
.../broadcom/brcm80211/bcm4323x/bcm4323x_rx.c | 317 ++++
.../broadcom/brcm80211/bcm4323x/bcm4323x_tx.c | 1386 +++++++++++++++
.../broadcom/brcm80211/brcmfmac/usb.c | 68 +-
.../broadcom/brcm80211/brcmsmac/Makefile | 1 -
.../broadcom/brcm80211/brcmsmac/ampdu.c | 34 +-
.../broadcom/brcm80211/brcmsmac/dma.h | 27 -
.../broadcom/brcm80211/brcmsmac/mac80211_if.c | 2 +-
.../broadcom/brcm80211/brcmsmac/main.c | 687 ++------
.../broadcom/brcm80211/brcmsmac/main.h | 26 +-
.../broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 17 -
.../broadcom/brcm80211/brcmsmac/phy/phy_hal.h | 3 +-
.../broadcom/brcm80211/brcmsmac/pub.h | 35 +-
.../broadcom/brcm80211/brcmsmac/rate.c | 514 ------
.../broadcom/brcm80211/brcmsmac/stf.c | 4 +-
.../broadcom/brcm80211/brcmutil/Makefile | 2 +-
.../broadcom/brcm80211/brcmutil/rate.c | 1027 +++++++++++
.../broadcom/brcm80211/include/brcm_usb_rdl.h | 77 +
.../{brcmsmac/rate.h => include/brcmu_rate.h} | 160 +-
.../brcm80211/{brcmsmac => include}/d11.h | 43 +-
include/net/mac80211.h | 12 +
net/mac80211/ieee80211_i.h | 2 -
net/mac80211/util.c | 1 +
31 files changed, 5649 insertions(+), 1342 deletions(-)
create mode 100644 drivers/net/wireless/broadcom/brcm80211/bcm4323x/Kconfig
create mode 100644 drivers/net/wireless/broadcom/brcm80211/bcm4323x/Makefile
create mode 100644 drivers/net/wireless/broadcom/brcm80211/bcm4323x/bcm4323x.h
create mode 100644 drivers/net/wireless/broadcom/brcm80211/bcm4323x/bcm4323x_core.c
create mode 100644 drivers/net/wireless/broadcom/brcm80211/bcm4323x/bcm4323x_led.c
create mode 100644 drivers/net/wireless/broadcom/brcm80211/bcm4323x/bcm4323x_mac.c
create mode 100644 drivers/net/wireless/broadcom/brcm80211/bcm4323x/bcm4323x_rx.c
create mode 100644 drivers/net/wireless/broadcom/brcm80211/bcm4323x/bcm4323x_tx.c
delete mode 100644 drivers/net/wireless/broadcom/brcm80211/brcmsmac/rate.c
create mode 100644 drivers/net/wireless/broadcom/brcm80211/brcmutil/rate.c
create mode 100644 drivers/net/wireless/broadcom/brcm80211/include/brcm_usb_rdl.h
rename drivers/net/wireless/broadcom/brcm80211/{brcmsmac/rate.h => include/brcmu_rate.h} (53%)
rename drivers/net/wireless/broadcom/brcm80211/{brcmsmac => include}/d11.h (97%)base-commit: 734bef548a96e8774d6eef5dfa2026c6edc4e80b
Signature · 1 line
2.53.0