Linux 4.8.3
[linux/fpc-iii.git] / Documentation / networking / mac80211-auth-assoc-deauth.txt
blobd7a15fe91bf734f246b22c6595208e50acce6efd
2 # This outlines the Linux authentication/association and
3 # deauthentication/disassociation flows.
5 # This can be converted into a diagram using the service
6 # at http://www.websequencediagrams.com/
9 participant userspace
10 participant mac80211
11 participant driver
13 alt authentication needed (not FT)
14 userspace->mac80211: authenticate
16 alt authenticated/authenticating already
17 mac80211->driver: sta_state(AP, not-exists)
18 mac80211->driver: bss_info_changed(clear BSSID)
19 else associated
20 note over mac80211,driver
21 like deauth/disassoc, without sending the
22 BA session stop & deauth/disassoc frames
23 end note
24 end
26 mac80211->driver: config(channel, channel type)
27 mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
28 mac80211->driver: sta_state(AP, exists)
30 alt no probe request data known
31 mac80211->driver: TX directed probe request
32 driver->mac80211: RX probe response
33 end
35 mac80211->driver: TX auth frame
36 driver->mac80211: RX auth frame
38 alt WEP shared key auth
39 mac80211->driver: TX auth frame
40 driver->mac80211: RX auth frame
41 end
43 mac80211->driver: sta_state(AP, authenticated)
44 mac80211->userspace: RX auth frame
46 end
48 userspace->mac80211: associate
49 alt authenticated or associated
50 note over mac80211,driver: cleanup like for authenticate
51 end
53 alt not previously authenticated (FT)
54 mac80211->driver: config(channel, channel type)
55 mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
56 mac80211->driver: sta_state(AP, exists)
57 mac80211->driver: sta_state(AP, authenticated)
58 end
59 mac80211->driver: TX assoc
60 driver->mac80211: RX assoc response
61 note over mac80211: init rate control
62 mac80211->driver: sta_state(AP, associated)
64 alt not using WPA
65 mac80211->driver: sta_state(AP, authorized)
66 end
68 mac80211->driver: set up QoS parameters
70 mac80211->driver: bss_info_changed(QoS, HT, associated with AID)
71 mac80211->userspace: associated
73 note left of userspace: associated now
75 alt using WPA
76 note over userspace
77 do 4-way-handshake
78 (data frames)
79 end note
80 userspace->mac80211: authorized
81 mac80211->driver: sta_state(AP, authorized)
82 end
84 userspace->mac80211: deauthenticate/disassociate
85 mac80211->driver: stop BA sessions
86 mac80211->driver: TX deauth/disassoc
87 mac80211->driver: flush frames
88 mac80211->driver: sta_state(AP,associated)
89 mac80211->driver: sta_state(AP,authenticated)
90 mac80211->driver: sta_state(AP,exists)
91 mac80211->driver: sta_state(AP,not-exists)
92 mac80211->driver: turn off powersave
93 mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)
94 mac80211->driver: config(channel type to non-HT)
95 mac80211->userspace: disconnected