Broadcom brcmsmac(PCIe) and brcmfmac(SDIO/USB) drivers#

  • Completely open source host drivers, no binary object files.

  • Framework for supporting new chips, including mac80211-aware embedded chips.

  • Does not support older PCI/PCIe chips with SSB backplane (see b43).

  • brcmsmac is a mac80211-based SoftMAC driver, and brcmfmac is a FullMAC driver.

Supported Chips#

brcmsmac (PCIe/AXI) driver:

Name

PCI Device ID

BCM4313

0x4727

BCM43224

0x0576

BCM43224

0x4353

BCM43225

0x4357

Please note: at least BCM4313 is not fully supported. Some models appears to work (users reported success), but some don’t, and there’s no indication that this is going to change. For example: http://marc.info/?t=138817851800006&r=1&w=2

brcmsmac (SoC/AXI) driver:

Name

BCM4716

BCM4717

BCM4718

brcmfmac#

PCIe devices#

Chipset

PCI Device ID

Notes

BCM4350

14e4:43a3

Queued for 4.4+

BCM4354

14e4:43df

Unreleased hw, support dropped in 4.1

BCM4356

14e4:43ec

Supported in 3.17+

BCM43567

14e4:43d3

-

BCM43570

14e4:43d9

-

BCM4358

14e4:43e9

Supported in 4.2+

BCM4359

14e4:43ef

Queued for 4.5+

BCM43602

14e4:43ba

Supported in 3.17+

BCM43602

14e4:43bb

Supported in 3.19+, 2 GHz device

BCM43602

14e4:43bc

Supported in 3.19+, 5 GHz device

BCM43602

14e4:aa52

Supported in 4.2+, “raw” device

BCM4365

14e4:43ca

Supported in 4.4+

BCM4365

14e4:43cb

Supported in 4.4+, 2 GHz device

BCM4365

14e4:43cc

Supported in 4.4+, 5 GHz device

BCM4366

14e4:4365

Queued for 4.6+

BCM4366

14e4:43c3

Supported in 4.4+

BCM4366

14e4:43c4

Supported in 4.4+, 2 GHz device

BCM4366

14e4:43c5

Supported in 4.4+, 5 GHz device

SDIO devices#

Name

Device ID

Notes

BCM4329

0x4329

BCM4330

0x4330

Supported in 3.3+

BCM4334

0x4334

Supported in 3.6+

BCM43340

0xa94c

Supported in 4.0+

BCM43341

0xa94d

Supported in 4.0+

BCM43241

0x4324

Supported in 3.7+

BCM4335

0x4335

Supported in 3.10+

BCM4339

0x4335

Supported in 3.13+

BCM43362

0xA962

Supported in 3.14+

BCM43430

0xa9a6

Supported in 4.1+

BCM43455

0x4345

Supported in 4.1+

BCM4354

0x4354

Supported in 3.15+

BCM43143

0xA887

Supported in 3.10+

USB devices#

Name

USB Device ID

Notes

BCM43235 (rev == 3)

?

BCM43236 (rev == 3)

0a5c:bd17

BCM43238 (rev == 3)

?

BCM43143

0a5c:bd1e

Supported in 3.7+

BCM43242

0a5c:bd1f

Supported in 3.7+

BCM43566

0a5c:bd27

Supported in 3.17+

BCM43569

Both brcmsmac and brcmfmac drivers require firmware files that need to be separately downloaded. Firmware is available from the Linux firmware repository at:

Unsupported Chips#

Chip

Rev

Marketing name

USB ID

0x4322

1

?

0846:9011

0x4322

1

BCM43231

0846:9020

43236

2

BCM43236

0a5c:bd17

43526

2

BCM43526

0a5c:bd1d

0x4322

1

BCM4323

1eda:2410

BCM43231 and BCM43236 (rev <= 2) have another architecture and can’t be easily supported by brcmfmac. They have less memory on the chip and can’t run full MAC firmware, so they require implementing some extra code in the Linux driver. On the other hand they are not standard soft MAC devices, so they can’t be supported by brcmsmac or b43.

Chip

SDIO ID

Notes

BCM4345

02d0:4345

Older version of BCM43455

Broadcom brcmsmac driver#

  • Support for both 32 and 64 bit Linux kernels

Firmware installation#

Copy brcm/bcm43xx-0.fw and brcm/bcm43xx_hdr-0.fw to /lib/firmware/brcm (or wherever firmware is normally installed on your system).

Broadcom brcmfmac driver#

  • Support for both 32 and 64 bit Linux kernels

Firmware installation#

Current#

For SDIO driver you need to copy the nvram for your system and place it in /lib/firmware/brcm. The nvram file name depends on the chip you have. The kernel log will tell you the exact file name.

For the USB driver no nvram file is strictly needed: in fact, the driver only loads the firmware blob and does not look for an nvram text file. However, the nvram parameters are still required and they are already part of the firmware blob. This is a TRX file which contains the nvram parameters as a sequence of zero-terminated plain text strings, appended at the end of the last section. For an example of how to modify/add nvram parameters for USB devices, see this post

The firmware files are located in the linux-firmware repository and can be copied as is to /lib/firmware/brcm.

SDIO chip on older kernels (before 3.13)#

In kernel priors to v3.13 the SDIO driver used generic firmware names. Below are the instruction Use the nvram file installed in your system and copy it to /lib/firmware/brcm/brcmfmac-sdio.txt The firmware can be found in the linux-firmware repository.

  • For 4329: cp brcm/brcmfmac4329.bin /lib/firmware/brcm/brcmfmac-sdio.bin

  • For 4330: cp brcm/brcmfmac4330.bin /lib/firmware/brcm/brcmfmac-sdio.bin

Alternatively, when not available the Android version can be used as well:

NVRAM from EFI#

Some new devices are storing the nvram which is needed in addition to the firmware by the driver in an EFI variable and the Windows driver can access it (this file should be optional in the case of PCIe devices). Currently brcmfmac does not support this automatically. First mount the efi vars into sysfs:

mount -t efivarfs none /sys/firmware/efi/efivars

The content of the nvram is in this file:

/sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113

Copy this file where brcmfmac expects the nvram, for example:

cat /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 > /lib/firmware/brcm/brcmfmac43241b4-sdio.txt

Contact Info#

For driver issues and/or bug reports, please use one or both:

For any other questions feel free to contact the maintainer(s) listed below:

Developer information#

Overview#

  • On-chip firmware loaded using standard request_firmware()

  • Infrastructure for future chips in place.

  • AMPDU support

  • tracepoint support

softmac driver specifics#

  • Integrated with mac80211

  • Using BCMA bus driver

  • Uses minstrel_ht rate algorithm

  • HW based encryption not enabled yet

  • monitor mode

fullmac driver specifics#

The brcmfmac driver is based on the DHD driver, which is also released in AOSP under the name bcmdhd. Although similar the brcmfmac driver has been reworked significantly. In the figure below the layering of the brcmfmac is shown. It was made couple of years ago so it may not be accurate. The bus layer supports SDIO, USB, and PCIe. The protocol layer support msgbuf protocol used for PCIe devices and BCDC which is used for SDIO and USB devices.

../../../_images/brcmfmac-layering.png

Get the code#

The driver is available in linux mainline and development is done on the wireless-testing tree, available at:

git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-testing.git

The driver is also available in the 3.2 and newer kernels. When using ‘make menuconfig’ it can be accessed:

Location:
-> Device Drivers
* -> Network device support
*  * -> Wireless LAN
*  *  * -> < > Broadcom IEEE802.11n PCIe SoftMAC WLAN driver
*  *  * -> < > Broadcom IEEE802.11n embedded FullMAC WLAN driver
*  *  *  * -> [ ] SDIO bus interface support for FullMAC driver
*  *  *  * -> [ ] USB bus interface support for FullMAC driver
*  *  *  * -> [ ] PCIE bus interface support for FullMAC driver

For the PCIe SoftMAC WLAN driver (brcmsmac) you need to enable select the BCMA bus driver as well:

Location: -> Device Drivers

*  *    * -> Broadcom specific AMBA
*  *    *  * -> <M> BCMA support
*  *    *  *  * -> [*] Support for BCMA on PCI-host bus

Get Involved#

Maintaining a driver for a family of chipsets that is widespread and productized by multiple entities can be challenging. While having a good stock of devices it is by no means covering a fraction of the variants out in the wild. So we can always use help from people doing regression testing or co-maintaining the driver. The table below provides an overview of those involved and the role they play.

Name

Email

Role

Device(s)

Izabela Bakollari

ibakolla@redhat.com

Tester

Raspberry PI4 8GB

Arend van Spriel

arend.vanspriel@broadcom.com

Maintainer, Tester

BCM4330, BCM43664

Peter Robinson

pbrobinson@gmail.com

Tester

Numerous Arm devices with Broadcom/Cypress/Synaptics variants.

tracepoint support#

Both brcmsmac and brcmfmac have several tracepoints defined that can be traced using kernel Ftrace. Python-based plugins are available on Github: arend/brcm80211-trace-cmd

To be done for softmac driver#

  • Add support for

    • 40MHz channels

    • powersave

    • IBSS

    • HW-based encryption

To be done for fullmac driver#

  • Add support for

    • debugfs (for accessing counters and other diagnostic info)

    • monitor mode

    • Add support for more chips.

Regulatory Implementation for brcmsmac#

This generation of chips contain additional regulatory support independent of the driver. The devices use a single worldwide regulatory domain, with channels 1-11 (2.4 GHz band) and channels 52-64 and 100-140 (5 GHz band) restricted to passive operation. Transmission on those channels is suppressed until appropriate other traffic is observed on those channels. Within the driver, we use the ficticious country code “X2” to represent this worldwide regulatory domain. There is currently no interface to configure a different domain. The driver reads the SROM country code from the chip and hands it up to mac80211 as the regulatory hint, however this information is otherwise unused with the driver.