Академический Документы
Профессиональный Документы
Культура Документы
2009-02-25
Introduction
mac80211
is a subsystem to the Linux kernel
implements shared code for soft-MAC/half-MAC wireless
devices
contains MLME and other code, despite the name
2 / 47
2009-02-25
January 2006
April 2006
May 1, 2006
May 2006 - May 2007
May 5, 2007
Oct 23, 2007
3 / 47
2009-02-25
4 / 47
2009-02-25
Intel
cozybit through o11s.org
Jouni Malinen (Atheros)
Kalle Valo (Nokia)
Vivek Natarajan (Atheros)
Kalle Valo (Nokia)
5 / 47
2009-02-25
Architecture
userspace
cfg80211
we x t
nl80211
we x t
cfg80211_ops
mac80211
ie e e 80211_ops
iwlwifi
6 / 47
2009-02-25
other drivers
Architecture
internally
7 / 47
2009-02-25
Code structure
8 / 47
2009-02-25
Code structure
All files except the header file are in net/mac80211/.
Kconfig, Makefile
build system
ieee80211 i.h
most internal data structures
main.c
main module entry points
main entry points for driver calls (reg/dereg)
iface.c
virtual interface handling
key.c, key.h
key management
sta info.c, sta info.h Station (peer) management
pm.c
power management (suspend/hibernate)
rate.c, rate.h
internal rate control functions
rc80211*
rate control algorithms
rx.c
frame receive path
tx.c
frame transmit path
scan.c
software scanning code
9 / 47
2009-02-25
Code structure
ht.c, agg-rx.c, agg-tx.c
mesh{, hwmp, plink, pathtbl}.{c,h}
mlme.c
ibss.c
cfg.c, cfg.h, wext.c
event.c
spectmgmt.c
aes*, tkip.*, wep.*, michael.*, wpa.*
wme.c, wme.h
util.c
led.c, led.h
debugfs*
10 / 47
2009-02-25
HT/aggregation code
802.11s mesh
Station/managed mode MLME
IBSS MLME
configuration entry points
events to userspace
spectrum management code
WPA/RSN/WEP code
some QoS code
utility functions
LED handling
debugfs code
Data structures
ieee80211 local/ieee80211 hw
sta info/ieee80211 sta
ieee80211 conf
ieee80211 bss conf
ieee80211 key/ieee80211 key conf
ieee80211 tx info
ieee80211 rx status
ieee80211 sub if data/ieee80211 vif
11 / 47
2009-02-25
a wireless device
ieee80211 hw is the part of ieee80211 local that is visible to
drivers
contains all operating information about a wireless device
12 / 47
2009-02-25
13 / 47
2009-02-25
hardware configuration
most importantly - current channel
intention: hardware specific parameters
14 / 47
2009-02-25
BSS configuration
for all kinds of BSSes (IBSS/AP/managed)
contains e.g. basic rate bitmap
intention: per BSS parameters in case hardware supports
15 / 47
2009-02-25
encryption state
16 / 47
2009-02-25
17 / 47
2009-02-25
18 / 47
2009-02-25
19 / 47
ieee80211
ieee80211
ieee80211
ieee80211
ieee80211
ieee80211
2009-02-25
if
if
if
if
if
if
ap
wds
vlan
managed
ibss
mesh
Main flows
configuration
receive path
transmit path
management/MLME
20 / 47
2009-02-25
workqueue)
some operations passed through to driver more or less directly
21 / 47
2009-02-25
rx status info
for each interface that the packet might belong to
RX handlers are invoked
data: converted to 802.3, delivered to networking stack
management: delivered to MLME
22 / 47
2009-02-25
23 / 47
2009-02-25
24 / 47
2009-02-25
STA RT
scan done
no BSS info
SC A N_F IND_BSS
no current presp
deauth
presp
A UT HENT IC AT E
open disabled, shared enabled, W EP key configured
A UT H_OPEN
deauth
deauth
BSS not found
after 2 scans
unsupported
challenge
leap enabled
auth response OK
3 x 0.2s
A UT H_L EA P
auth response OK
denied
3 x 0.2s
assoc response
A SSOC IAT ED
no frames for 2s
presp
3 x 0.2s
3 x 0.2s
3 x 0.2s
A P_PR OBE
1 x 2s
DISA BL ED
2009-02-25
reply OK
A SSOC IAT E
denied disassoc
25 / 47
unsupported
A UT H_SHA R ED
not successful
3 x 0.2s
denied
unsupported
leap disabled
STA RT
scan done
no BSS info
SC A N_F IND_BSS
no current presp
deauth
presp
A UT HENT IC AT E
open disabled, shared enabled, W EP key configured
A UT H_OPEN
deauth
deauth
BSS not found
after 2 scans
unsupported
challenge
leap enabled
auth response OK
3 x 0.2s
A UT H_L EA P
auth response OK
denied
3 x 0.2s
assoc response
A SSOC IAT ED
no frames for 2s
presp
3 x 0.2s
3 x 0.2s
3 x 0.2s
A P_PR OBE
1 x 2s
DISA BL ED
2009-02-25
reply OK
A SSOC IAT E
denied disassoc
26 / 47
unsupported
A UT H_SHA R ED
not successful
3 x 0.2s
denied
unsupported
leap disabled
27 / 47
2009-02-25
28 / 47
2009-02-25
Handoff points
29 / 47
2009-02-25
30 / 47
2009-02-25
31 / 47
2009-02-25
32 / 47
2009-02-25
33 / 47
2009-02-25
34 / 47
2009-02-25
Execution contexts
35 / 47
2009-02-25
Synchronisation mechanisms
background RCU
36 / 47
2009-02-25
Synchronisation mechanisms
background rtnl
37 / 47
2009-02-25
Synchronisation mechanisms
management)
mutex for interface list management
spinlocks for various tightly constrained spots like sta list
38 / 47
2009-02-25
Stay up-to-date
http://wireless.kernel.org/en/developers/Documentation/mac80211
especially
http://wireless.kernel.org/en/developers/Documentation/mac80211/API
also http://wireless.kernel.org/en/developers/todo-list/
subscribe to wiki changes on these pages
follow patches going in: git log -- net/mac80211/
read the wireless list
(http://wireless.kernel.org/en/developers/MailingLists)
39 / 47
2009-02-25
40 / 47
2009-02-25
virtual interfaces
vif 1
vif 2
vif 3
master interface
driver/hardware
41 / 47
2009-02-25
...
virtual interfaces
42 / 47
2009-02-25
virtual interfaces
43 / 47
2009-02-25
virtual interfaces
relevancy to drivers
drivers need to allow each interface type
drivers need to support certain operations for certain interface
types
drivers can support multiple virtual interfaces
but: drivers not notified of monitor interfaces
44 / 47
2009-02-25
filter flags
45 / 47
2009-02-25
filter flags
monitor interfaces
handled entirely in mac80211
may affect filters depending on configuration
it is possible to create a monitor interface that does not affect
filters, can be useful for debugging (iw phy phy0 interface add
moni0 type monitor flags none)
46 / 47
2009-02-25
47 / 47
2009-02-25