SlideShare une entreprise Scribd logo
1  sur  25
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 ?

Contenu connexe

Tendances

Fun with Network Interfaces
Fun with Network InterfacesFun with Network Interfaces
Fun with Network InterfacesKernel TLV
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernelKiran Divekar
 
CCNA- Router on stick, VLAN and Trunking
CCNA- Router on stick, VLAN and TrunkingCCNA- Router on stick, VLAN and Trunking
CCNA- Router on stick, VLAN and TrunkingRafat Khandaker
 
alphorm.com - Formation proxmoxVE 3
alphorm.com - Formation proxmoxVE 3alphorm.com - Formation proxmoxVE 3
alphorm.com - Formation proxmoxVE 3Alphorm
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsHisaki Ohara
 
Implementing MPLS Services using Openflow
Implementing MPLS Services using OpenflowImplementing MPLS Services using Openflow
Implementing MPLS Services using OpenflowAPNIC
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Jian-Hong Pan
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecturehugo lu
 
Firewall Endian
Firewall EndianFirewall Endian
Firewall EndianFouad Root
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_mapslcplcp1
 
IOS Cisco - Cheat sheets
IOS Cisco - Cheat sheetsIOS Cisco - Cheat sheets
IOS Cisco - Cheat sheetsAlejandro Marin
 
Juniper SRX Quickstart 12.1R3 by Thomas Schmidt
Juniper SRX Quickstart 12.1R3 by Thomas SchmidtJuniper SRX Quickstart 12.1R3 by Thomas Schmidt
Juniper SRX Quickstart 12.1R3 by Thomas SchmidtNam Nguyen
 
Packet flow on openstack
Packet flow on openstackPacket flow on openstack
Packet flow on openstackAchhar Kalia
 

Tendances (20)

Fun with Network Interfaces
Fun with Network InterfacesFun with Network Interfaces
Fun with Network Interfaces
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernel
 
CCNA- Router on stick, VLAN and Trunking
CCNA- Router on stick, VLAN and TrunkingCCNA- Router on stick, VLAN and Trunking
CCNA- Router on stick, VLAN and Trunking
 
alphorm.com - Formation proxmoxVE 3
alphorm.com - Formation proxmoxVE 3alphorm.com - Formation proxmoxVE 3
alphorm.com - Formation proxmoxVE 3
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
Implementing MPLS Services using Openflow
Implementing MPLS Services using OpenflowImplementing MPLS Services using Openflow
Implementing MPLS Services using Openflow
 
Ixgbe internals
Ixgbe internalsIxgbe internals
Ixgbe internals
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
 
Firewall Endian
Firewall EndianFirewall Endian
Firewall Endian
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_maps
 
wifi aware
 wifi aware wifi aware
wifi aware
 
IOS Cisco - Cheat sheets
IOS Cisco - Cheat sheetsIOS Cisco - Cheat sheets
IOS Cisco - Cheat sheets
 
Juniper SRX Quickstart 12.1R3 by Thomas Schmidt
Juniper SRX Quickstart 12.1R3 by Thomas SchmidtJuniper SRX Quickstart 12.1R3 by Thomas Schmidt
Juniper SRX Quickstart 12.1R3 by Thomas Schmidt
 
Packet flow on openstack
Packet flow on openstackPacket flow on openstack
Packet flow on openstack
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
 

Similaire à Linux 802.11 subsystem and brcmsmac WLAN driver

Broadcom net xtreme_server_205
Broadcom net xtreme_server_205Broadcom net xtreme_server_205
Broadcom net xtreme_server_205UFPa
 
Survey: Embedded Systems In Power Industry
Survey: Embedded Systems In Power IndustrySurvey: Embedded Systems In Power Industry
Survey: Embedded Systems In Power IndustryShrey Bhatnagar
 
SIEMENS PXG3.L BACnet/IP Router
SIEMENS PXG3.L BACnet/IP RouterSIEMENS PXG3.L BACnet/IP Router
SIEMENS PXG3.L BACnet/IP RouterCONTROLS & SYSTEMS
 
MYC-Y6ULX CPU Module - NXP i.MX 6UL/6ULL System-on-Module
MYC-Y6ULX CPU Module - NXP i.MX 6UL/6ULL System-on-ModuleMYC-Y6ULX CPU Module - NXP i.MX 6UL/6ULL System-on-Module
MYC-Y6ULX CPU Module - NXP i.MX 6UL/6ULL System-on-ModuleLinda Zhang
 
Tablet in 2012
Tablet in 2012Tablet in 2012
Tablet in 2012JJ Wu
 
XBMC USB Controller for Media Center PCs
XBMC USB Controller for Media Center PCsXBMC USB Controller for Media Center PCs
XBMC USB Controller for Media Center PCsDilshan Jayakody
 
Gl embedded starterkit_ethernet
Gl embedded starterkit_ethernetGl embedded starterkit_ethernet
Gl embedded starterkit_ethernetRoman Brovko
 
High-performance ARM SoM Powered by NXP i.MX 8M
High-performance ARM SoM Powered by NXP i.MX 8MHigh-performance ARM SoM Powered by NXP i.MX 8M
High-performance ARM SoM Powered by NXP i.MX 8MLinda Zhang
 
Webinar: Comunicação TCP/IP segura
Webinar: Comunicação TCP/IP seguraWebinar: Comunicação TCP/IP segura
Webinar: Comunicação TCP/IP seguraEmbarcados
 
Introducing i.MX233 Application Processors
Introducing i.MX233 Application ProcessorsIntroducing i.MX233 Application Processors
Introducing i.MX233 Application ProcessorsPremier Farnell
 
Basic Study on the WT12 Family of Bluetooth Devices
Basic Study on the WT12 Family of Bluetooth DevicesBasic Study on the WT12 Family of Bluetooth Devices
Basic Study on the WT12 Family of Bluetooth DevicesPremier Farnell
 
Driver Development for applications of networking services for a WAVE based d...
Driver Development for applications of networking services for a WAVE based d...Driver Development for applications of networking services for a WAVE based d...
Driver Development for applications of networking services for a WAVE based d...Janith Rukman
 
Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...
Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...
Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...Embarcados
 
Best practices for catalyst 4500 4000, 5500-5000, and 6500-6000 series switch...
Best practices for catalyst 4500 4000, 5500-5000, and 6500-6000 series switch...Best practices for catalyst 4500 4000, 5500-5000, and 6500-6000 series switch...
Best practices for catalyst 4500 4000, 5500-5000, and 6500-6000 series switch...abdenour boussioud
 
Networking of multiple microcontrollers
Networking of multiple microcontrollersNetworking of multiple microcontrollers
Networking of multiple microcontrollersEdgefxkits & Solutions
 
Design and Development of ARM9 Based Embedded Web Server
Design and Development of ARM9 Based Embedded Web ServerDesign and Development of ARM9 Based Embedded Web Server
Design and Development of ARM9 Based Embedded Web ServerIJERA Editor
 
An Overview Study on AVR32UC3 MCU: AT32UC3A3256
An Overview Study on AVR32UC3 MCU: AT32UC3A3256 An Overview Study on AVR32UC3 MCU: AT32UC3A3256
An Overview Study on AVR32UC3 MCU: AT32UC3A3256 Premier Farnell
 

Similaire à Linux 802.11 subsystem and brcmsmac WLAN driver (20)

SudheerV_resume_a
SudheerV_resume_aSudheerV_resume_a
SudheerV_resume_a
 
Broadcom net xtreme_server_205
Broadcom net xtreme_server_205Broadcom net xtreme_server_205
Broadcom net xtreme_server_205
 
Survey: Embedded Systems In Power Industry
Survey: Embedded Systems In Power IndustrySurvey: Embedded Systems In Power Industry
Survey: Embedded Systems In Power Industry
 
SIEMENS PXG3.L BACnet/IP Router
SIEMENS PXG3.L BACnet/IP RouterSIEMENS PXG3.L BACnet/IP Router
SIEMENS PXG3.L BACnet/IP Router
 
MYC-Y6ULX CPU Module - NXP i.MX 6UL/6ULL System-on-Module
MYC-Y6ULX CPU Module - NXP i.MX 6UL/6ULL System-on-ModuleMYC-Y6ULX CPU Module - NXP i.MX 6UL/6ULL System-on-Module
MYC-Y6ULX CPU Module - NXP i.MX 6UL/6ULL System-on-Module
 
Tablet in 2012
Tablet in 2012Tablet in 2012
Tablet in 2012
 
Product Brief- Nano SOM
Product Brief- Nano SOMProduct Brief- Nano SOM
Product Brief- Nano SOM
 
XBMC USB Controller for Media Center PCs
XBMC USB Controller for Media Center PCsXBMC USB Controller for Media Center PCs
XBMC USB Controller for Media Center PCs
 
Gl embedded starterkit_ethernet
Gl embedded starterkit_ethernetGl embedded starterkit_ethernet
Gl embedded starterkit_ethernet
 
High-performance ARM SoM Powered by NXP i.MX 8M
High-performance ARM SoM Powered by NXP i.MX 8MHigh-performance ARM SoM Powered by NXP i.MX 8M
High-performance ARM SoM Powered by NXP i.MX 8M
 
Userspace networking
Userspace networkingUserspace networking
Userspace networking
 
Webinar: Comunicação TCP/IP segura
Webinar: Comunicação TCP/IP seguraWebinar: Comunicação TCP/IP segura
Webinar: Comunicação TCP/IP segura
 
Introducing i.MX233 Application Processors
Introducing i.MX233 Application ProcessorsIntroducing i.MX233 Application Processors
Introducing i.MX233 Application Processors
 
Basic Study on the WT12 Family of Bluetooth Devices
Basic Study on the WT12 Family of Bluetooth DevicesBasic Study on the WT12 Family of Bluetooth Devices
Basic Study on the WT12 Family of Bluetooth Devices
 
Driver Development for applications of networking services for a WAVE based d...
Driver Development for applications of networking services for a WAVE based d...Driver Development for applications of networking services for a WAVE based d...
Driver Development for applications of networking services for a WAVE based d...
 
Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...
Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...
Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...
 
Best practices for catalyst 4500 4000, 5500-5000, and 6500-6000 series switch...
Best practices for catalyst 4500 4000, 5500-5000, and 6500-6000 series switch...Best practices for catalyst 4500 4000, 5500-5000, and 6500-6000 series switch...
Best practices for catalyst 4500 4000, 5500-5000, and 6500-6000 series switch...
 
Networking of multiple microcontrollers
Networking of multiple microcontrollersNetworking of multiple microcontrollers
Networking of multiple microcontrollers
 
Design and Development of ARM9 Based Embedded Web Server
Design and Development of ARM9 Based Embedded Web ServerDesign and Development of ARM9 Based Embedded Web Server
Design and Development of ARM9 Based Embedded Web Server
 
An Overview Study on AVR32UC3 MCU: AT32UC3A3256
An Overview Study on AVR32UC3 MCU: AT32UC3A3256 An Overview Study on AVR32UC3 MCU: AT32UC3A3256
An Overview Study on AVR32UC3 MCU: AT32UC3A3256
 

Dernier

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Dernier (20)

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

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