summaryrefslogtreecommitdiffstats
path: root/kernel/Documentation/networking/mac80211-auth-assoc-deauth.txt
blob: d7a15fe91bf734f246b22c6595208e50acce6efd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#
# This outlines the Linux authentication/association and
# deauthentication/disassociation flows.
#
# This can be converted into a diagram using the service
# at http://www.websequencediagrams.com/
#

participant userspace
participant mac80211
participant driver

alt authentication needed (not FT)
userspace->mac80211: authenticate

alt authenticated/authenticating already
mac80211->driver: sta_state(AP, not-exists)
mac80211->driver: bss_info_changed(clear BSSID)
else associated
note over mac80211,driver
like deauth/disassoc, without sending the
BA session stop & deauth/disassoc frames
end note
end

mac80211->driver: config(channel, channel type)
mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
mac80211->driver: sta_state(AP, exists)

alt no probe request data known
mac80211->driver: TX directed probe request
driver->mac80211: RX probe response
end

mac80211->driver: TX auth frame
driver->mac80211: RX auth frame

alt WEP shared key auth
mac80211->driver: TX auth frame
driver->mac80211: RX auth frame
end

mac80211->driver: sta_state(AP, authenticated)
mac80211->userspace: RX auth frame

end

userspace->mac80211: associate
alt authenticated or associated
note over mac80211,driver: cleanup like for authenticate
end

alt not previously authenticated (FT)
mac80211->driver: config(channel, channel type)
mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
mac80211->driver: sta_state(AP, exists)
mac80211->driver: sta_state(AP, authenticated)
end
mac80211->driver: TX assoc
driver->mac80211: RX assoc response
note over mac80211: init rate control
mac80211->driver: sta_state(AP, associated)

alt not using WPA
mac80211->driver: sta_state(AP, authorized)
end

mac80211->driver: set up QoS parameters

mac80211->driver: bss_info_changed(QoS, HT, associated with AID)
mac80211->userspace: associated

note left of userspace: associated now

alt using WPA
note over userspace
do 4-way-handshake
(data frames)
end note
userspace->mac80211: authorized
mac80211->driver: sta_state(AP, authorized)
end

userspace->mac80211: deauthenticate/disassociate
mac80211->driver: stop BA sessions
mac80211->driver: TX deauth/disassoc
mac80211->driver: flush frames
mac80211->driver: sta_state(AP,associated)
mac80211->driver: sta_state(AP,authenticated)
mac80211->driver: sta_state(AP,exists)
mac80211->driver: sta_state(AP,not-exists)
mac80211->driver: turn off powersave
mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)
mac80211->driver: config(channel type to non-HT)
mac80211->userspace: disconnected