blob: d7a15fe91bf734f246b22c6595208e50acce6efd [file] [log] [blame]
Johannes Berg3cd79202012-03-09 17:25:33 +01001#
2# This outlines the Linux authentication/association and
3# deauthentication/disassociation flows.
4#
5# This can be converted into a diagram using the service
6# at http://www.websequencediagrams.com/
7#
8
9participant userspace
10participant mac80211
11participant driver
12
13alt authentication needed (not FT)
14userspace->mac80211: authenticate
15
16alt authenticated/authenticating already
Yegor Yefremov6d430c22012-03-13 10:57:51 +010017mac80211->driver: sta_state(AP, not-exists)
Johannes Berg3cd79202012-03-09 17:25:33 +010018mac80211->driver: bss_info_changed(clear BSSID)
19else associated
20note over mac80211,driver
21like deauth/disassoc, without sending the
22BA session stop & deauth/disassoc frames
23end note
24end
25
Johannes Berg24398e32012-03-28 10:58:36 +020026mac80211->driver: config(channel, channel type)
Johannes Berg3cd79202012-03-09 17:25:33 +010027mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
28mac80211->driver: sta_state(AP, exists)
29
30alt no probe request data known
31mac80211->driver: TX directed probe request
32driver->mac80211: RX probe response
33end
34
35mac80211->driver: TX auth frame
36driver->mac80211: RX auth frame
37
38alt WEP shared key auth
39mac80211->driver: TX auth frame
40driver->mac80211: RX auth frame
41end
42
43mac80211->driver: sta_state(AP, authenticated)
44mac80211->userspace: RX auth frame
45
46end
47
48userspace->mac80211: associate
49alt authenticated or associated
50note over mac80211,driver: cleanup like for authenticate
51end
52
53alt not previously authenticated (FT)
Johannes Berg24398e32012-03-28 10:58:36 +020054mac80211->driver: config(channel, channel type)
Johannes Berg3cd79202012-03-09 17:25:33 +010055mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
56mac80211->driver: sta_state(AP, exists)
57mac80211->driver: sta_state(AP, authenticated)
58end
59mac80211->driver: TX assoc
60driver->mac80211: RX assoc response
61note over mac80211: init rate control
62mac80211->driver: sta_state(AP, associated)
63
64alt not using WPA
65mac80211->driver: sta_state(AP, authorized)
66end
67
68mac80211->driver: set up QoS parameters
69
Johannes Berg3cd79202012-03-09 17:25:33 +010070mac80211->driver: bss_info_changed(QoS, HT, associated with AID)
71mac80211->userspace: associated
72
73note left of userspace: associated now
74
75alt using WPA
76note over userspace
77do 4-way-handshake
78(data frames)
79end note
80userspace->mac80211: authorized
81mac80211->driver: sta_state(AP, authorized)
82end
83
84userspace->mac80211: deauthenticate/disassociate
85mac80211->driver: stop BA sessions
86mac80211->driver: TX deauth/disassoc
87mac80211->driver: flush frames
88mac80211->driver: sta_state(AP,associated)
89mac80211->driver: sta_state(AP,authenticated)
Yegor Yefremov6d430c22012-03-13 10:57:51 +010090mac80211->driver: sta_state(AP,exists)
91mac80211->driver: sta_state(AP,not-exists)
Johannes Berg3cd79202012-03-09 17:25:33 +010092mac80211->driver: turn off powersave
93mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)
Johannes Berg24398e32012-03-28 10:58:36 +020094mac80211->driver: config(channel type to non-HT)
Johannes Berg3cd79202012-03-09 17:25:33 +010095mac80211->userspace: disconnected