SlideShare a Scribd company logo
1 of 32
Download to read offline
Opening Nuts and Bolts of Linux
WiFi Subsystem
Dheryta Jaisinghani
Why do we
need to
understand
this?
I wonder
● What happens in the background (in the
Operating System) when I connect to WiFi?
● How does a packet travels all the way from my
application to kernel to air and back?
● How can I modify the code to try my own
algorithms?
2
Structure of
this talk
● Linux WiFi Subsystem - Bird’s Eye View
● Types of WiFi drivers
● Working with code - Source, Compilation,
Kernel Module Insertion
● Flow of code - where to make changes
● Important commands - events, connection
establishment, information on card and
modules, logging
● Important pointers - Tutorials
3
Networking
Layers
Application
Presentation
Session
Transport
Network
MLME|MAC
Physical
WiFi -
IEEE 802.11
4
What does
MAC -
Medium
Access
Control do?
● MLME - MAC SubLayer Management Entity
○ Authenticate
○ Deauthenticate
○ Associate
○ Disassociate
○ Reassociate
○ Beacon
○ Probe
5
Know about your WiFi card
6
7
sudo lshw -C network
8
iwconfig
ifconfig
WiFi
connection
in
Application
Layer?
● WPA_Supplicant
● WICD
● Network Manager
● More ...
9
Types of
WiFi
Devices
Full MAC:
MAC in
hardware
[1] https://wireless.wiki.kernel.org/en/developers/documentation/glossary
Soft MAC:
MAC in
software
10
WiFi
Interface
Modes
[1] https://wireless.wiki.kernel.org/en/developers/documentation/glossary
11
Linux WiFi Subsystem - Bird’s Eye View
[1] D. Jaisinghani, -, S. Kaul, and S. Roy. Sniffer-based Inference of the Causes of Active Scanning in WiFi Networks. NCC 2017
12
What
happens
when a WiFi
card is
plugged in?
● Device drivers load order -
○ cfg80211 -> mac80211 -> ath9k
● LibNL, Wireless Information
○ /usr/include/linux/nl80211.h
○ /proc/net/wireless
○ /proc/net/dev
● Events
○ WiFi connection establishment -
■ Associate
■ Authenticate
○ DHCP
■ Network - IP
● Terminal command - tail -f /var/log/syslog or
dmesg (Look for keywords - wpa_supplicant,
network manager, kernel, dhclient)
[1] http://moi.vonos.net/linux/wireless-stack/
13
Live Demonstration
14
1. Open 2 terminals - terminal 1 and terminal 2
2. In terminal 1 - sudo tail -f /var/log/syslog
3. In terminal 2 - sudo rmmod ath9k
4. Notice the messages in terminal 1
5. In terminal 2 - sudo modprobe ath9k
6. Notice the messages in terminal 2
15
Feb 25 12:04:08 Laptop kernel:
[38508.139858] ath: phy2: ASPM
enabled: 0x42
Feb 25 12:04:08 Laptop kernel:
[38508.140435] ieee80211 phy2:
Selected rate control algorithm
'minstrel_ht'
Feb 25 12:04:08 Laptop
NetworkManager[952]: <info>
(wlan0): using nl80211 for WiFi
device control
Feb 25 12:04:08 Laptop
NetworkManager[952]: <info>
(wlan0): new 802.11 WiFi device
(driver: 'ath9k' ifindex: 6)
Feb 25 12:04:08 Laptop NetworkManager[952]: <info>
(wlan0): using nl80211 for WiFi device control
Feb 25 12:04:08 Laptop NetworkManager[952]: <info>
(wlan0): new 802.11 WiFi device (driver: 'ath9k' ifindex: 6)
Feb 25 12:04:08 Laptop NetworkManager[952]: <info>
NetworkManager state is now DISCONNECTED
Feb 25 12:04:09 Laptop wpa_supplicant[5068]: wlan0:
CTRL-EVENT-SCAN-STARTED
Feb 25 12:04:12 Laptop NetworkManager[952]: <info>
Auto-activating connection 'FACULTY-STAFF-N'.
Feb 25 12:04:12 Laptop NetworkManager[952]: <info>
(wlan0): device state change: config -> need-auth (reason
'none') [50 60 0]
Feb 25 12:04:12 Laptop wpa_supplicant[5068]: wlan0: SME:
Trying to authenticate with c4:0a:cb:5c:07:0a
(SSID='FACULTY-STAFF-N' freq=5280 MHz)
Feb 25 12:04:12 Laptop NetworkManager[952]: <info>
(wlan0): supplicant interface state: inactive -> authenticating
16
Feb 25 12:04:16 Laptop
wpa_supplicant[5068]: wlan0:
Trying to associate with
c4:0a:cb:5c:07:0a
(SSID='FACULTY-STAFF-N'
freq=5280 MHz)
Feb 25 12:04:16 Laptop kernel:
[38515.397527] wlan0: send auth
to c4:0a:cb:5c:07:0a (try 2/3)
Feb 25 12:04:16 Laptop kernel:
[38515.398891] wlan0:
authenticated
Feb 25 12:04:16 Laptop kernel:
[38515.401031] wlan0: associate
with c4:0a:cb:5c:07:0a (try 1/3)
Feb 25 12:04:16 Laptop kernel:
[38515.402612] wlan0: RX
AssocResp from c4:0a:cb:5c:07:0a
(capab=0x11 status=0 aid=2)
Feb 25 12:04:16 Laptop kernel:
[38515.402686] wlan0: associated
Feb 25 12:04:16 Laptop NetworkManager[952]: <info> (wlan0):
device state change: config -> ip-config (reason 'none') [50 70
0]
Feb 25 12:04:16 Laptop NetworkManager[952]: <info>
Activation (wlan0) Beginning DHCPv4 transaction (timeout in
45 seconds)
Feb 25 12:04:16 Laptop NetworkManager[952]: <info> dhclient
started with pid 6172
Feb 25 12:04:16 Laptop NetworkManager[952]: <info>
address 192.168.X.X
Feb 25 12:04:16 Laptop NetworkManager[952]: <info> prefix
20 (255.255.240.0)
Feb 25 12:04:16 Laptop NetworkManager[952]: <info>
gateway 192.168.X.X
Feb 25 12:04:16 Laptop NetworkManager[952]: <info>
nameserver '192.168.X.X'
Feb 25 12:04:16 Laptop NetworkManager[952]: <info>
domain name 'iiitd.edu.in'
17
watch -n1 "cat /proc/net/wireless"
watch -n1 "cat /proc/net/dev"
18
Flow of
Packets in an
Operating
System
● Data vs Control Path
● Transmit vs Receive Path
19
Data Application
System Call
Sockets
Network Protocols
Net_dev core
Driver
Network Application
nl80211
cfg80211
mac80211
Data Path Control Path
[1] https://www.linux.com/blog/linux-wireless-networking-short-walk
20
Backports Code Structure
21
net/wireless/handlers/wireless/nl80211.c (struct
genl_opsnl80211_ops)
nl80211
cfg80211
mac80211
ath9k
net/wireless (Configurations) - Struct cfg80211_ops
/net/mac80211 (Rate Control, MLME-Authenticate,
Reassociate, Deauthenticate, Associate,
Disassociate, Beacon , Probe, PM, Scan, Retries,
ACK Handling, etc) - struct ieee80211_ops
drivers/net/wireless/ath/ath9k (Transmit and
Receive)
22
How is a Packet Received?
Main.c: Interrupt from hardware to
ath9k: irqreturn_t ath_isr
Recv.c : ath_rx_tasklet ()
rx.c : ieee80211_rx () ->
ieee80211_prepare_and_rx_handle() ->
ieee80211_rx_handlers() ->
ieee80211_deliver_skb() - go up or down to air ->
● netif_receive_skb() (rx.c) - up
● dev_queue_xmit() - send to air
[1] http://www.campsmur.cat/files/mac80211_intro.pdf
23
How is a packet transmitted?
Kernel to interface (virtual)
Tx.c - ieee80211_subif_start_xmit()
Tx.c - ieee80211_xmit()
Tx.c - ieee80211_tx()
<ieee80211_ops>
main.c - ath9k_tx() - struct
ath_tx (ath9k.h) - 10 TX queues
xmit.c - ath_tx_start ()
xmit.c - ath_tx_txqaddbuf ()
mac.c - ath9k_hw_txstart()
Writes register in hardware
to perform transmission
[1] http://www.campsmur.cat/files/mac80211_intro.pdf
24
Debugging
Options
Debug Ath9k
1. sudo make menuconfig - Enable debug options as specified
in the above mentioned link
2. sudo make
3. sudo make install with flags
4. modprobe ath9k debug=0x00000200 (or) modprobe
ath9k_htc debug=0x00000200
5. ATH_DBG_ANY = 0xffffffff
6. tail -f /var/log/syslog
Debug mac80211/cfg80211
1. sudo modprobe mac80211 debug=0xffffffff
2. sudo trace-cmd record -e mac80211
3. trace-cmd report -i trace.dat | grep scan
25
Live Demonstration
26
sudo watch -n1 “cat /sys/kernel/debug/ieee80211/phy4/ath9k/recv”
27
sudo watch -n1 “cat /sys/kernel/debug/ieee80211/phy4/ath9k/xmit”
28
Important
and Useful
Commands
● Wireless Events (scan, authentication etc) -
sudo iw event -t
● Connection Stats (inactive time, rx/tx
bytes/packets, signal, bitrate etc) - sudo iw dev
wlan0 station dump
● Regular Monitoring - watch -n1 “<command>”
● lshw -C network, lsusb, lspci
● Debug Messages - tail -f /var/log/syslog,
dmesg
29
Important
URLs
● All about Wireless Kernel:
https://wireless.wiki.kernel.org/en/users
● Tracing the code paths:
http://blog.cerowrt.org/post/wifi_software_paths/
● Networking Stack Programming:
http://www.geeksofpune.in/files/GEEP-NetworkingSt
ack-28may14.pdf
● Download backports:
○ https://backports.wiki.kernel.org/index.php/Main_Pag
e
○ http://drvbp1.linux-foundation.org/~mcgrof/rel-html/b
ackports/
● Debugging backports:
https://wireless.wiki.kernel.org/en/users/drivers/ath
9k/debug
30
Questions?
● Webpage: www.dheryta.co.in
● E-Mail: dherytaj@iiitd.ac.in
31
Abstract
Title: Opening Nuts and Bolts of Linux WiFi Subsystem
While we understand the complex interplay of OSI layers, in theory, in practice understanding their implementation is a
non-trivial task. The implementation details that enables a network interface card to communicate with its peers are
oblivious to the end-users. Naive developers such as undergraduate and graduate students often find it hard to find relevant
tutorials that enable them to understand these implementation details.
The aim of this talk is to provide an overview of WiFi Subsystem implemented in the Linux operating system. Specifically,
this talk will explain the sequence of events that occur from application layer till physical layer when a connection is
established over WiFi.
After this talk, the audience will understand -- (1) the bird's eye view of Linux WiFi Subsystem, (2) what happens in an
operating system when a WiFi card is plugged-in, (3) how is a packet received/transmitted from physical layer to operating
system kernel and vice-versa, (4) brief overview of code structure of open-source drivers, and lastly (5) important pointers
to kickstart driver code modifications.
Duration: 30-40 minutes Add-ons: Minimal Demonstration
32

More Related Content

What's hot

netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabMichelle Holley
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Diverajdeep
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux KernelKernel TLV
 
Kernel Recipes 2019 - XDP closer integration with network stack
Kernel Recipes 2019 -  XDP closer integration with network stackKernel Recipes 2019 -  XDP closer integration with network stack
Kernel Recipes 2019 - XDP closer integration with network stackAnne Nicolas
 
VXLAN and FRRouting
VXLAN and FRRoutingVXLAN and FRRouting
VXLAN and FRRoutingFaisal Reza
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsHisaki Ohara
 
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6David Pasek
 
DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking WalkthroughThomas Graf
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)Brendan Gregg
 
Linux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisLinux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisPaul V. Novarese
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingMichelle Holley
 
Understanding Open vSwitch
Understanding Open vSwitch Understanding Open vSwitch
Understanding Open vSwitch YongKi Kim
 
FD.IO Vector Packet Processing
FD.IO Vector Packet ProcessingFD.IO Vector Packet Processing
FD.IO Vector Packet ProcessingKernel TLV
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecturehugo lu
 

What's hot (20)

Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Dive
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux Kernel
 
Kernel Recipes 2019 - XDP closer integration with network stack
Kernel Recipes 2019 -  XDP closer integration with network stackKernel Recipes 2019 -  XDP closer integration with network stack
Kernel Recipes 2019 - XDP closer integration with network stack
 
VXLAN and FRRouting
VXLAN and FRRoutingVXLAN and FRRouting
VXLAN and FRRouting
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
 
DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking Walkthrough
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)
 
Linux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisLinux Crash Dump Capture and Analysis
Linux Crash Dump Capture and Analysis
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet Processing
 
DPDK In Depth
DPDK In DepthDPDK In Depth
DPDK In Depth
 
Understanding Open vSwitch
Understanding Open vSwitch Understanding Open vSwitch
Understanding Open vSwitch
 
FD.IO Vector Packet Processing
FD.IO Vector Packet ProcessingFD.IO Vector Packet Processing
FD.IO Vector Packet Processing
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
 

Viewers also liked

Microsoft Really Loves Linux – a Virtual Love Story
Microsoft Really Loves Linux – a Virtual Love StoryMicrosoft Really Loves Linux – a Virtual Love Story
Microsoft Really Loves Linux – a Virtual Love StoryChristian Heitkamp
 
OpenContrail, Real Speed: Offloading vRouter
OpenContrail, Real Speed: Offloading vRouterOpenContrail, Real Speed: Offloading vRouter
OpenContrail, Real Speed: Offloading vRouterOpen-NFP
 
Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8Dev_Events
 
Java garbage collection & GC friendly coding
Java garbage collection  & GC friendly codingJava garbage collection  & GC friendly coding
Java garbage collection & GC friendly codingMd Ayub Ali Sarker
 
Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...Walid Shaari
 
Accelerating Hadoop, Spark, and Memcached with HPC Technologies
Accelerating Hadoop, Spark, and Memcached with HPC TechnologiesAccelerating Hadoop, Spark, and Memcached with HPC Technologies
Accelerating Hadoop, Spark, and Memcached with HPC Technologiesinside-BigData.com
 
Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Luigi De Russis
 
Eclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewEclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewDev_Events
 
Linux Native, HTTP Aware Network Security
Linux Native, HTTP Aware Network SecurityLinux Native, HTTP Aware Network Security
Linux Native, HTTP Aware Network SecurityThomas Graf
 
Android operating system
Android operating systemAndroid operating system
Android operating systemAyush Agarwal
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

Viewers also liked (13)

Microsoft Really Loves Linux – a Virtual Love Story
Microsoft Really Loves Linux – a Virtual Love StoryMicrosoft Really Loves Linux – a Virtual Love Story
Microsoft Really Loves Linux – a Virtual Love Story
 
OpenContrail, Real Speed: Offloading vRouter
OpenContrail, Real Speed: Offloading vRouterOpenContrail, Real Speed: Offloading vRouter
OpenContrail, Real Speed: Offloading vRouter
 
Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8
 
Markus Tessmann, InnoGames
Markus Tessmann, InnoGames	Markus Tessmann, InnoGames
Markus Tessmann, InnoGames
 
Java garbage collection & GC friendly coding
Java garbage collection  & GC friendly codingJava garbage collection  & GC friendly coding
Java garbage collection & GC friendly coding
 
Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...
 
Accelerating Hadoop, Spark, and Memcached with HPC Technologies
Accelerating Hadoop, Spark, and Memcached with HPC TechnologiesAccelerating Hadoop, Spark, and Memcached with HPC Technologies
Accelerating Hadoop, Spark, and Memcached with HPC Technologies
 
Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)
 
Eclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewEclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s View
 
Linux Native, HTTP Aware Network Security
Linux Native, HTTP Aware Network SecurityLinux Native, HTTP Aware Network Security
Linux Native, HTTP Aware Network Security
 
Pcc
PccPcc
Pcc
 
Android operating system
Android operating systemAndroid operating system
Android operating system
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar to Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem

Known basic of NFV Features
Known basic of NFV FeaturesKnown basic of NFV Features
Known basic of NFV FeaturesRaul Leite
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rulesFreddy Buenaño
 
Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guidejasembo
 
Advanced Troublesshooting Nexus 7K.pdf
Advanced Troublesshooting Nexus 7K.pdfAdvanced Troublesshooting Nexus 7K.pdf
Advanced Troublesshooting Nexus 7K.pdfJeanChristian12
 
Configuring wifi in open embedded builds
Configuring wifi in open embedded buildsConfiguring wifi in open embedded builds
Configuring wifi in open embedded buildsMender.io
 
Banog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeBanog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeDamien Garros
 
9Tuts.Com New CCNA 200-120 New CCNA New Questions 2
9Tuts.Com New CCNA 200-120 New CCNA   New Questions 29Tuts.Com New CCNA 200-120 New CCNA   New Questions 2
9Tuts.Com New CCNA 200-120 New CCNA New Questions 2Lori Head
 
The Next Step of OpenStack Evolution for NFV Deployments
The Next Step ofOpenStack Evolution for NFV DeploymentsThe Next Step ofOpenStack Evolution for NFV Deployments
The Next Step of OpenStack Evolution for NFV DeploymentsDirk Kutscher
 
slides-frnog34.pdf
slides-frnog34.pdfslides-frnog34.pdf
slides-frnog34.pdfjnbrains
 
BRKRST-3066 - Troubleshooting Nexus 7000 (2013 Melbourne) - 2 Hours.pdf
BRKRST-3066 - Troubleshooting Nexus 7000 (2013 Melbourne) - 2 Hours.pdfBRKRST-3066 - Troubleshooting Nexus 7000 (2013 Melbourne) - 2 Hours.pdf
BRKRST-3066 - Troubleshooting Nexus 7000 (2013 Melbourne) - 2 Hours.pdfaaajjj4
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemCyber Security Alliance
 
CENTRAL MANAGEMENT OF NETWORK AND CALL SERVICES
CENTRAL MANAGEMENT OF NETWORK AND CALL SERVICESCENTRAL MANAGEMENT OF NETWORK AND CALL SERVICES
CENTRAL MANAGEMENT OF NETWORK AND CALL SERVICESNazmul Hossain Rakib
 
Computer technicians-quick-reference-guide
Computer technicians-quick-reference-guideComputer technicians-quick-reference-guide
Computer technicians-quick-reference-guideShathees Rao
 
Virtualization & Network Connectivity
Virtualization & Network Connectivity Virtualization & Network Connectivity
Virtualization & Network Connectivity itplant
 
Practice and challenges from building IaaS
Practice and challenges from building IaaSPractice and challenges from building IaaS
Practice and challenges from building IaaSShawn Zhu
 
82599 sriov vm configuration notes
82599 sriov vm configuration notes82599 sriov vm configuration notes
82599 sriov vm configuration notesRyan Aydelott
 
2015_01 - Networking Session - SPHMMC ICT workshop
2015_01 - Networking Session - SPHMMC ICT workshop2015_01 - Networking Session - SPHMMC ICT workshop
2015_01 - Networking Session - SPHMMC ICT workshopKathleen Ludewig Omollo
 
Management configuration
Management configurationManagement configuration
Management configurationmckan1974
 
Manual linksys router_rv082
Manual linksys router_rv082Manual linksys router_rv082
Manual linksys router_rv082Edgar Cañizalez
 

Similar to Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem (20)

Known basic of NFV Features
Known basic of NFV FeaturesKnown basic of NFV Features
Known basic of NFV Features
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
 
Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guide
 
Advanced Troublesshooting Nexus 7K.pdf
Advanced Troublesshooting Nexus 7K.pdfAdvanced Troublesshooting Nexus 7K.pdf
Advanced Troublesshooting Nexus 7K.pdf
 
Project report,nowrin
Project report,nowrinProject report,nowrin
Project report,nowrin
 
Configuring wifi in open embedded builds
Configuring wifi in open embedded buildsConfiguring wifi in open embedded builds
Configuring wifi in open embedded builds
 
Banog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeBanog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as code
 
9Tuts.Com New CCNA 200-120 New CCNA New Questions 2
9Tuts.Com New CCNA 200-120 New CCNA   New Questions 29Tuts.Com New CCNA 200-120 New CCNA   New Questions 2
9Tuts.Com New CCNA 200-120 New CCNA New Questions 2
 
The Next Step of OpenStack Evolution for NFV Deployments
The Next Step ofOpenStack Evolution for NFV DeploymentsThe Next Step ofOpenStack Evolution for NFV Deployments
The Next Step of OpenStack Evolution for NFV Deployments
 
slides-frnog34.pdf
slides-frnog34.pdfslides-frnog34.pdf
slides-frnog34.pdf
 
BRKRST-3066 - Troubleshooting Nexus 7000 (2013 Melbourne) - 2 Hours.pdf
BRKRST-3066 - Troubleshooting Nexus 7000 (2013 Melbourne) - 2 Hours.pdfBRKRST-3066 - Troubleshooting Nexus 7000 (2013 Melbourne) - 2 Hours.pdf
BRKRST-3066 - Troubleshooting Nexus 7000 (2013 Melbourne) - 2 Hours.pdf
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
CENTRAL MANAGEMENT OF NETWORK AND CALL SERVICES
CENTRAL MANAGEMENT OF NETWORK AND CALL SERVICESCENTRAL MANAGEMENT OF NETWORK AND CALL SERVICES
CENTRAL MANAGEMENT OF NETWORK AND CALL SERVICES
 
Computer technicians-quick-reference-guide
Computer technicians-quick-reference-guideComputer technicians-quick-reference-guide
Computer technicians-quick-reference-guide
 
Virtualization & Network Connectivity
Virtualization & Network Connectivity Virtualization & Network Connectivity
Virtualization & Network Connectivity
 
Practice and challenges from building IaaS
Practice and challenges from building IaaSPractice and challenges from building IaaS
Practice and challenges from building IaaS
 
82599 sriov vm configuration notes
82599 sriov vm configuration notes82599 sriov vm configuration notes
82599 sriov vm configuration notes
 
2015_01 - Networking Session - SPHMMC ICT workshop
2015_01 - Networking Session - SPHMMC ICT workshop2015_01 - Networking Session - SPHMMC ICT workshop
2015_01 - Networking Session - SPHMMC ICT workshop
 
Management configuration
Management configurationManagement configuration
Management configuration
 
Manual linksys router_rv082
Manual linksys router_rv082Manual linksys router_rv082
Manual linksys router_rv082
 

Recently uploaded

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem

  • 1. Opening Nuts and Bolts of Linux WiFi Subsystem Dheryta Jaisinghani
  • 2. Why do we need to understand this? I wonder ● What happens in the background (in the Operating System) when I connect to WiFi? ● How does a packet travels all the way from my application to kernel to air and back? ● How can I modify the code to try my own algorithms? 2
  • 3. Structure of this talk ● Linux WiFi Subsystem - Bird’s Eye View ● Types of WiFi drivers ● Working with code - Source, Compilation, Kernel Module Insertion ● Flow of code - where to make changes ● Important commands - events, connection establishment, information on card and modules, logging ● Important pointers - Tutorials 3
  • 5. What does MAC - Medium Access Control do? ● MLME - MAC SubLayer Management Entity ○ Authenticate ○ Deauthenticate ○ Associate ○ Disassociate ○ Reassociate ○ Beacon ○ Probe 5
  • 6. Know about your WiFi card 6
  • 7. 7 sudo lshw -C network
  • 10. Types of WiFi Devices Full MAC: MAC in hardware [1] https://wireless.wiki.kernel.org/en/developers/documentation/glossary Soft MAC: MAC in software 10
  • 12. Linux WiFi Subsystem - Bird’s Eye View [1] D. Jaisinghani, -, S. Kaul, and S. Roy. Sniffer-based Inference of the Causes of Active Scanning in WiFi Networks. NCC 2017 12
  • 13. What happens when a WiFi card is plugged in? ● Device drivers load order - ○ cfg80211 -> mac80211 -> ath9k ● LibNL, Wireless Information ○ /usr/include/linux/nl80211.h ○ /proc/net/wireless ○ /proc/net/dev ● Events ○ WiFi connection establishment - ■ Associate ■ Authenticate ○ DHCP ■ Network - IP ● Terminal command - tail -f /var/log/syslog or dmesg (Look for keywords - wpa_supplicant, network manager, kernel, dhclient) [1] http://moi.vonos.net/linux/wireless-stack/ 13
  • 15. 1. Open 2 terminals - terminal 1 and terminal 2 2. In terminal 1 - sudo tail -f /var/log/syslog 3. In terminal 2 - sudo rmmod ath9k 4. Notice the messages in terminal 1 5. In terminal 2 - sudo modprobe ath9k 6. Notice the messages in terminal 2 15
  • 16. Feb 25 12:04:08 Laptop kernel: [38508.139858] ath: phy2: ASPM enabled: 0x42 Feb 25 12:04:08 Laptop kernel: [38508.140435] ieee80211 phy2: Selected rate control algorithm 'minstrel_ht' Feb 25 12:04:08 Laptop NetworkManager[952]: <info> (wlan0): using nl80211 for WiFi device control Feb 25 12:04:08 Laptop NetworkManager[952]: <info> (wlan0): new 802.11 WiFi device (driver: 'ath9k' ifindex: 6) Feb 25 12:04:08 Laptop NetworkManager[952]: <info> (wlan0): using nl80211 for WiFi device control Feb 25 12:04:08 Laptop NetworkManager[952]: <info> (wlan0): new 802.11 WiFi device (driver: 'ath9k' ifindex: 6) Feb 25 12:04:08 Laptop NetworkManager[952]: <info> NetworkManager state is now DISCONNECTED Feb 25 12:04:09 Laptop wpa_supplicant[5068]: wlan0: CTRL-EVENT-SCAN-STARTED Feb 25 12:04:12 Laptop NetworkManager[952]: <info> Auto-activating connection 'FACULTY-STAFF-N'. Feb 25 12:04:12 Laptop NetworkManager[952]: <info> (wlan0): device state change: config -> need-auth (reason 'none') [50 60 0] Feb 25 12:04:12 Laptop wpa_supplicant[5068]: wlan0: SME: Trying to authenticate with c4:0a:cb:5c:07:0a (SSID='FACULTY-STAFF-N' freq=5280 MHz) Feb 25 12:04:12 Laptop NetworkManager[952]: <info> (wlan0): supplicant interface state: inactive -> authenticating 16
  • 17. Feb 25 12:04:16 Laptop wpa_supplicant[5068]: wlan0: Trying to associate with c4:0a:cb:5c:07:0a (SSID='FACULTY-STAFF-N' freq=5280 MHz) Feb 25 12:04:16 Laptop kernel: [38515.397527] wlan0: send auth to c4:0a:cb:5c:07:0a (try 2/3) Feb 25 12:04:16 Laptop kernel: [38515.398891] wlan0: authenticated Feb 25 12:04:16 Laptop kernel: [38515.401031] wlan0: associate with c4:0a:cb:5c:07:0a (try 1/3) Feb 25 12:04:16 Laptop kernel: [38515.402612] wlan0: RX AssocResp from c4:0a:cb:5c:07:0a (capab=0x11 status=0 aid=2) Feb 25 12:04:16 Laptop kernel: [38515.402686] wlan0: associated Feb 25 12:04:16 Laptop NetworkManager[952]: <info> (wlan0): device state change: config -> ip-config (reason 'none') [50 70 0] Feb 25 12:04:16 Laptop NetworkManager[952]: <info> Activation (wlan0) Beginning DHCPv4 transaction (timeout in 45 seconds) Feb 25 12:04:16 Laptop NetworkManager[952]: <info> dhclient started with pid 6172 Feb 25 12:04:16 Laptop NetworkManager[952]: <info> address 192.168.X.X Feb 25 12:04:16 Laptop NetworkManager[952]: <info> prefix 20 (255.255.240.0) Feb 25 12:04:16 Laptop NetworkManager[952]: <info> gateway 192.168.X.X Feb 25 12:04:16 Laptop NetworkManager[952]: <info> nameserver '192.168.X.X' Feb 25 12:04:16 Laptop NetworkManager[952]: <info> domain name 'iiitd.edu.in' 17
  • 18. watch -n1 "cat /proc/net/wireless" watch -n1 "cat /proc/net/dev" 18
  • 19. Flow of Packets in an Operating System ● Data vs Control Path ● Transmit vs Receive Path 19
  • 20. Data Application System Call Sockets Network Protocols Net_dev core Driver Network Application nl80211 cfg80211 mac80211 Data Path Control Path [1] https://www.linux.com/blog/linux-wireless-networking-short-walk 20
  • 22. net/wireless/handlers/wireless/nl80211.c (struct genl_opsnl80211_ops) nl80211 cfg80211 mac80211 ath9k net/wireless (Configurations) - Struct cfg80211_ops /net/mac80211 (Rate Control, MLME-Authenticate, Reassociate, Deauthenticate, Associate, Disassociate, Beacon , Probe, PM, Scan, Retries, ACK Handling, etc) - struct ieee80211_ops drivers/net/wireless/ath/ath9k (Transmit and Receive) 22
  • 23. How is a Packet Received? Main.c: Interrupt from hardware to ath9k: irqreturn_t ath_isr Recv.c : ath_rx_tasklet () rx.c : ieee80211_rx () -> ieee80211_prepare_and_rx_handle() -> ieee80211_rx_handlers() -> ieee80211_deliver_skb() - go up or down to air -> ● netif_receive_skb() (rx.c) - up ● dev_queue_xmit() - send to air [1] http://www.campsmur.cat/files/mac80211_intro.pdf 23
  • 24. How is a packet transmitted? Kernel to interface (virtual) Tx.c - ieee80211_subif_start_xmit() Tx.c - ieee80211_xmit() Tx.c - ieee80211_tx() <ieee80211_ops> main.c - ath9k_tx() - struct ath_tx (ath9k.h) - 10 TX queues xmit.c - ath_tx_start () xmit.c - ath_tx_txqaddbuf () mac.c - ath9k_hw_txstart() Writes register in hardware to perform transmission [1] http://www.campsmur.cat/files/mac80211_intro.pdf 24
  • 25. Debugging Options Debug Ath9k 1. sudo make menuconfig - Enable debug options as specified in the above mentioned link 2. sudo make 3. sudo make install with flags 4. modprobe ath9k debug=0x00000200 (or) modprobe ath9k_htc debug=0x00000200 5. ATH_DBG_ANY = 0xffffffff 6. tail -f /var/log/syslog Debug mac80211/cfg80211 1. sudo modprobe mac80211 debug=0xffffffff 2. sudo trace-cmd record -e mac80211 3. trace-cmd report -i trace.dat | grep scan 25
  • 27. sudo watch -n1 “cat /sys/kernel/debug/ieee80211/phy4/ath9k/recv” 27
  • 28. sudo watch -n1 “cat /sys/kernel/debug/ieee80211/phy4/ath9k/xmit” 28
  • 29. Important and Useful Commands ● Wireless Events (scan, authentication etc) - sudo iw event -t ● Connection Stats (inactive time, rx/tx bytes/packets, signal, bitrate etc) - sudo iw dev wlan0 station dump ● Regular Monitoring - watch -n1 “<command>” ● lshw -C network, lsusb, lspci ● Debug Messages - tail -f /var/log/syslog, dmesg 29
  • 30. Important URLs ● All about Wireless Kernel: https://wireless.wiki.kernel.org/en/users ● Tracing the code paths: http://blog.cerowrt.org/post/wifi_software_paths/ ● Networking Stack Programming: http://www.geeksofpune.in/files/GEEP-NetworkingSt ack-28may14.pdf ● Download backports: ○ https://backports.wiki.kernel.org/index.php/Main_Pag e ○ http://drvbp1.linux-foundation.org/~mcgrof/rel-html/b ackports/ ● Debugging backports: https://wireless.wiki.kernel.org/en/users/drivers/ath 9k/debug 30
  • 31. Questions? ● Webpage: www.dheryta.co.in ● E-Mail: dherytaj@iiitd.ac.in 31
  • 32. Abstract Title: Opening Nuts and Bolts of Linux WiFi Subsystem While we understand the complex interplay of OSI layers, in theory, in practice understanding their implementation is a non-trivial task. The implementation details that enables a network interface card to communicate with its peers are oblivious to the end-users. Naive developers such as undergraduate and graduate students often find it hard to find relevant tutorials that enable them to understand these implementation details. The aim of this talk is to provide an overview of WiFi Subsystem implemented in the Linux operating system. Specifically, this talk will explain the sequence of events that occur from application layer till physical layer when a connection is established over WiFi. After this talk, the audience will understand -- (1) the bird's eye view of Linux WiFi Subsystem, (2) what happens in an operating system when a WiFi card is plugged-in, (3) how is a packet received/transmitted from physical layer to operating system kernel and vice-versa, (4) brief overview of code structure of open-source drivers, and lastly (5) important pointers to kickstart driver code modifications. Duration: 30-40 minutes Add-ons: Minimal Demonstration 32