SlideShare a Scribd company logo
Broadcom Wifi Driver
Midhun Lohidakshan
Today’s Topics
● Brief about 802.11 standard.
● MAC layer frames
● MLME
● SoftMAC and HardMAC
● Broadcom bcm43xx chipsets
● Tx path and Rx path of brcmsmac driver
● Mac80211 debugfs
● Live demonstration
802.11 Wireless Standard
● Created in 1997
● Targeted to standardise PHY and MAC layers which are two lowest OSI layers.
● Initially for the PHY layer, 2 frequency bands were chosen : Infra Red ( IR ) band and Microwave Band
( 2.4 GHz )
● 802.11a standard brought 5GHz frequency.
IEEE
802.11
MAC
Sublayer
The 802.11 MAC Header
Frame Control
MAC layer frames
MAC layer uses 3 types of frames
● Management
● Data
● Control
Management Frames
1. Association Request - Association Response
2. Reassociation Request - Reassociation Response
3. Probe Request - Probe Response
4. Beacon
5. ATIM
6. Disassociation
7. Authentication - Deauthentication
8. Action
Control Frames
1. Power Save ( PS - Poll )
2. RTS
3. CTS
4. Acknowledgement
5. Contention Free
6. CF-End + CF-Ack
Data Frames
1. Data
2. Data + CF-ACK
3. Data + CF-Poll
4. Data + CF-ACK + CF-Poll
5. Null Data
6. CF-Ack
7. CF-Poll
8. Data + CF-Ack + CF-Poll
MAC subLayer Management Entity ( MLME )
● MLME is the management entity where the Physical layer ( PHY ) MAC state machine resides.
● Based on the location of the core that processes MLME, 2 types MAC layer implementations are available - SoftMAC
and FullMAC ( HardMAC )
● Soft MAC
○ MLME is running in the Linux Kernel Module ( LKM )
○ Mac80211 is a driver API for SoftMAC WNIC
● Full MAC ( Hard MAC )
○ MLME is managed in hardware.
○ We will not use mac80211 to write FullMAC wireless driver.
SoftMAC vs HardMAC
HardMAC/FullMAC devices SoftMAC devices
Proprietary Implementations Lower Hardware Cost
Less CPU load Possibility to upgrade to newer standards
by updating the driver only.
Better power consumption and
performance. Hence used in smartphones
Possibility to correct faults in the MAC
implementation.
No monitor mode Different drivers for different WNIC can all
share the same MAC implementation
Broadcom bcm43xxx chipset
● Bcm43xxx series have both HardMAC and SoftMAC cards.
● Some chips are integrated both WLAN and Bluetooth functionalities.
○ Eg - bcm4339, bcm4330
● Main MCU of the chipset is ARM Cortex-M3/ ARM Cortex-R4
bcm43xxx Chip Components
● ARM Cortex ( M3 or R4 )
● ROM
● RAM
● D11 Core
● 802.11 PHY
● 2.4 or 5 GHz radio
D11 Core
● Does all time critical operations
Firmware
● Firmwares used by these chips are split into two parts.
● Read-only part is written into the ROM.
● Read-Write part is uploaded by the device driver to the chip’s RAM.
● RAM portion of the firmware can be updated when new features arrives.
Host Driver Interface
● USB
● SDIO
● PCIe
Chip Model MAC Type MCU Bus Interface Driver Host Device
bcm4339 FullMAC ARM Cortex R4 SDIO bcmdhd Nexus 5
bcm4330 FullMAC ARM Cortex M3 SDIO bcmdhd Samsung Galaxy Y
bcm43430 FullMAC ARM Cortex M3 SDIO brcmfmac Raspberry PI 3B
bcm4352 FullMAC ARM Cortex M3 PCIe wl Dell XPS laptop
bcm43236 SoftMAC ARM Cortex R4 USB wl SFR mini decoder TV
Interface details of bcm43xxx chipsets
Types of bcm43xxx device drivers
No Device Driver OS MAC type Driver Source
1 b43 Linux SoftMAC OpenSource
2 brcmsmac Linux SoftMAC OpenSource
3 brcmfmac Linux FullMAC OpenSource
4 brcmdhd Android FullMAC OpenSource
5 broadcom-sta aka 'wl' Linux SoftMAC & FullMAC Proprietary
WiFi Stack on Linux
Data Path and
Control Path in
Wireless
Subsystem
Tx Path in
MAC80211
Tx Path :
Kernel ->
mac80211 ->
brcmsmac
Rx Path:
Device
Driver->
mac80211
Mac80211 Debugfs
● Debugfs is a technique that enables exporting debugging information to the userspace.
● It creates entries under the sysfs filesystem.
● For mac80211 , debugfs implemented at net/mac80211/debugfs.c
● After mounting debugfs, various mac80211 statistics and information entries can be visualised.
● Mounting debugfs is performed via below command
○ mount -t debugfs none_debugs /sys/kernel/debug
● If wireless phy of our system is phy0, then mac80211 debugfs can be seen at below location.
○ /sys/kernel/debug/ieee80211/phy0
Live Demonstration
1. Output of below commands on Linux system
a. sudo lshw -C network
b. Iw list ( using netlink sockets )
i. Show supported modes
ii. Show supported bands
c. Iw dev ( using netlink sockets )
d. Iwconfig ( using ioctl )
e. watch -n1 "cat /proc/net/wireless" ( Quality of signals )
f. watch -n1 "cat /proc/net/dev" ( device statistics )
g. sudo watch -n1 "cat /sys/kernel/debug/ieee80211/phy0/iwlwifi/iwlmvm/nic_temp" (debugfs)
2. Linux Kernel Code for mac80211, brcmfmac and brcmsmac
Questions ?

More Related Content

PDF
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
PDF
Network Drivers
PDF
Analysis of Open-Source Drivers for IEEE 802.11 WLANs
PPTX
ALU 7360 5520_gpon_basic_configuration
PDF
Wpa supplicant introduction
PDF
netfilter and iptables
ODP
eBPF maps 101
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
Network Drivers
Analysis of Open-Source Drivers for IEEE 802.11 WLANs
ALU 7360 5520_gpon_basic_configuration
Wpa supplicant introduction
netfilter and iptables
eBPF maps 101

What's hot (20)

PDF
LinuxCon 2015 Linux Kernel Networking Walkthrough
PDF
nl80211 and libnl
PPTX
Packet flow on openstack
PDF
VXLAN BGP EVPN: Technology Building Blocks
PDF
U-Boot - An universal bootloader
PPTX
The TCP/IP Stack in the Linux Kernel
PDF
CCNA CheatSheet
PDF
Linux Networking Explained
PDF
The Linux Block Layer - Built for Fast Storage
PDF
Geep networking stack-linuxkernel
PDF
Open vSwitch Introduction
PPTX
OpenvSwitch Deep Dive
PDF
Deploying IPv6 on OpenStack
PPTX
Vxlan deep dive session rev0.5 final
PPTX
OVN - Basics and deep dive
PDF
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
PDF
Faster packet processing in Linux: XDP
PPTX
Introduction Linux Device Drivers
PPT
U boot porting guide for SoC
PDF
Open vSwitch - Stateful Connection Tracking & Stateful NAT
LinuxCon 2015 Linux Kernel Networking Walkthrough
nl80211 and libnl
Packet flow on openstack
VXLAN BGP EVPN: Technology Building Blocks
U-Boot - An universal bootloader
The TCP/IP Stack in the Linux Kernel
CCNA CheatSheet
Linux Networking Explained
The Linux Block Layer - Built for Fast Storage
Geep networking stack-linuxkernel
Open vSwitch Introduction
OpenvSwitch Deep Dive
Deploying IPv6 on OpenStack
Vxlan deep dive session rev0.5 final
OVN - Basics and deep dive
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
Faster packet processing in Linux: XDP
Introduction Linux Device Drivers
U boot porting guide for SoC
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Ad

Similar to Linux 802.11 subsystem and brcmsmac WLAN driver (20)

PPTX
Implementation of MAC-level sleep-scheduling
PDF
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
PDF
WiFi-technology WiFi-technology WiFi-technology
PPT
Bbgbnhm
PPT
IEEE 802.11s - Wireless Mesh Network
PDF
Fudcon 2015...Wireless: From Basics to Internals
PDF
Openwrt wireless
PDF
Ch 11: Hacking Wireless Networks
PPTX
PDF
The time lines of the various Madge Networks Products
PPT
Wireless networksppt
PPT
Wireless networksppt
PPT
PPTX
Ieee institute of electrical and electronics engineers
PPT
Wireless Networks.ppt- overview of Wireless LANS
PPTX
Ethical hacking Chapter 11 - Exploiting Wireless Networks - Eric Vanderburg
PPTX
The Differences Between Bluetooth, ZigBee and WiFi
PPT
Wireless Networking and telecom technolo
PPT
Wireless Networks types and its structure.ppt
Implementation of MAC-level sleep-scheduling
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
WiFi-technology WiFi-technology WiFi-technology
Bbgbnhm
IEEE 802.11s - Wireless Mesh Network
Fudcon 2015...Wireless: From Basics to Internals
Openwrt wireless
Ch 11: Hacking Wireless Networks
The time lines of the various Madge Networks Products
Wireless networksppt
Wireless networksppt
Ieee institute of electrical and electronics engineers
Wireless Networks.ppt- overview of Wireless LANS
Ethical hacking Chapter 11 - Exploiting Wireless Networks - Eric Vanderburg
The Differences Between Bluetooth, ZigBee and WiFi
Wireless Networking and telecom technolo
Wireless Networks types and its structure.ppt
Ad

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
KodekX | Application Modernization Development
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PPT
Teaching material agriculture food technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Review of recent advances in non-invasive hemoglobin estimation
KodekX | Application Modernization Development
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Understanding_Digital_Forensics_Presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
20250228 LYD VKU AI Blended-Learning.pptx
Network Security Unit 5.pdf for BCA BBA.
Chapter 3 Spatial Domain Image Processing.pdf
Empathic Computing: Creating Shared Understanding
Spectral efficient network and resource selection model in 5G networks
NewMind AI Monthly Chronicles - July 2025
Unlocking AI with Model Context Protocol (MCP)
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Linux 802.11 subsystem and brcmsmac WLAN driver

  • 2. Today’s Topics ● Brief about 802.11 standard. ● MAC layer frames ● MLME ● SoftMAC and HardMAC ● Broadcom bcm43xx chipsets ● Tx path and Rx path of brcmsmac driver ● Mac80211 debugfs ● Live demonstration
  • 3. 802.11 Wireless Standard ● Created in 1997 ● Targeted to standardise PHY and MAC layers which are two lowest OSI layers. ● Initially for the PHY layer, 2 frequency bands were chosen : Infra Red ( IR ) band and Microwave Band ( 2.4 GHz ) ● 802.11a standard brought 5GHz frequency.
  • 5. The 802.11 MAC Header Frame Control
  • 6. MAC layer frames MAC layer uses 3 types of frames ● Management ● Data ● Control
  • 7. Management Frames 1. Association Request - Association Response 2. Reassociation Request - Reassociation Response 3. Probe Request - Probe Response 4. Beacon 5. ATIM 6. Disassociation 7. Authentication - Deauthentication 8. Action
  • 8. Control Frames 1. Power Save ( PS - Poll ) 2. RTS 3. CTS 4. Acknowledgement 5. Contention Free 6. CF-End + CF-Ack
  • 9. Data Frames 1. Data 2. Data + CF-ACK 3. Data + CF-Poll 4. Data + CF-ACK + CF-Poll 5. Null Data 6. CF-Ack 7. CF-Poll 8. Data + CF-Ack + CF-Poll
  • 10. MAC subLayer Management Entity ( MLME ) ● MLME is the management entity where the Physical layer ( PHY ) MAC state machine resides. ● Based on the location of the core that processes MLME, 2 types MAC layer implementations are available - SoftMAC and FullMAC ( HardMAC ) ● Soft MAC ○ MLME is running in the Linux Kernel Module ( LKM ) ○ Mac80211 is a driver API for SoftMAC WNIC ● Full MAC ( Hard MAC ) ○ MLME is managed in hardware. ○ We will not use mac80211 to write FullMAC wireless driver.
  • 11. SoftMAC vs HardMAC HardMAC/FullMAC devices SoftMAC devices Proprietary Implementations Lower Hardware Cost Less CPU load Possibility to upgrade to newer standards by updating the driver only. Better power consumption and performance. Hence used in smartphones Possibility to correct faults in the MAC implementation. No monitor mode Different drivers for different WNIC can all share the same MAC implementation
  • 12. Broadcom bcm43xxx chipset ● Bcm43xxx series have both HardMAC and SoftMAC cards. ● Some chips are integrated both WLAN and Bluetooth functionalities. ○ Eg - bcm4339, bcm4330 ● Main MCU of the chipset is ARM Cortex-M3/ ARM Cortex-R4
  • 13. bcm43xxx Chip Components ● ARM Cortex ( M3 or R4 ) ● ROM ● RAM ● D11 Core ● 802.11 PHY ● 2.4 or 5 GHz radio
  • 14. D11 Core ● Does all time critical operations Firmware ● Firmwares used by these chips are split into two parts. ● Read-only part is written into the ROM. ● Read-Write part is uploaded by the device driver to the chip’s RAM. ● RAM portion of the firmware can be updated when new features arrives.
  • 15. Host Driver Interface ● USB ● SDIO ● PCIe Chip Model MAC Type MCU Bus Interface Driver Host Device bcm4339 FullMAC ARM Cortex R4 SDIO bcmdhd Nexus 5 bcm4330 FullMAC ARM Cortex M3 SDIO bcmdhd Samsung Galaxy Y bcm43430 FullMAC ARM Cortex M3 SDIO brcmfmac Raspberry PI 3B bcm4352 FullMAC ARM Cortex M3 PCIe wl Dell XPS laptop bcm43236 SoftMAC ARM Cortex R4 USB wl SFR mini decoder TV Interface details of bcm43xxx chipsets
  • 16. Types of bcm43xxx device drivers No Device Driver OS MAC type Driver Source 1 b43 Linux SoftMAC OpenSource 2 brcmsmac Linux SoftMAC OpenSource 3 brcmfmac Linux FullMAC OpenSource 4 brcmdhd Android FullMAC OpenSource 5 broadcom-sta aka 'wl' Linux SoftMAC & FullMAC Proprietary
  • 17. WiFi Stack on Linux
  • 18. Data Path and Control Path in Wireless Subsystem
  • 20. Tx Path : Kernel -> mac80211 -> brcmsmac
  • 22. Mac80211 Debugfs ● Debugfs is a technique that enables exporting debugging information to the userspace. ● It creates entries under the sysfs filesystem. ● For mac80211 , debugfs implemented at net/mac80211/debugfs.c ● After mounting debugfs, various mac80211 statistics and information entries can be visualised. ● Mounting debugfs is performed via below command ○ mount -t debugfs none_debugs /sys/kernel/debug ● If wireless phy of our system is phy0, then mac80211 debugfs can be seen at below location. ○ /sys/kernel/debug/ieee80211/phy0
  • 24. 1. Output of below commands on Linux system a. sudo lshw -C network b. Iw list ( using netlink sockets ) i. Show supported modes ii. Show supported bands c. Iw dev ( using netlink sockets ) d. Iwconfig ( using ioctl ) e. watch -n1 "cat /proc/net/wireless" ( Quality of signals ) f. watch -n1 "cat /proc/net/dev" ( device statistics ) g. sudo watch -n1 "cat /sys/kernel/debug/ieee80211/phy0/iwlwifi/iwlmvm/nic_temp" (debugfs) 2. Linux Kernel Code for mac80211, brcmfmac and brcmsmac