96 lines · plain
1#2# This outlines the Linux authentication/association and3# deauthentication/disassociation flows.4#5# This can be converted into a diagram using the service6# at http://www.websequencediagrams.com/7#8 9participant userspace10participant mac8021111participant driver12 13alt authentication needed (not FT)14userspace->mac80211: authenticate15 16alt authenticated/authenticating already17mac80211->driver: sta_state(AP, not-exists)18mac80211->driver: bss_info_changed(clear BSSID)19else associated20note over mac80211,driver21like deauth/disassoc, without sending the22BA session stop & deauth/disassoc frames23end note24end25 26mac80211->driver: config(channel, channel type)27mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)28mac80211->driver: sta_state(AP, exists)29 30alt no probe request data known31mac80211->driver: TX directed probe request32driver->mac80211: RX probe response33end34 35mac80211->driver: TX auth frame36driver->mac80211: RX auth frame37 38alt WEP shared key auth39mac80211->driver: TX auth frame40driver->mac80211: RX auth frame41end42 43mac80211->driver: sta_state(AP, authenticated)44mac80211->userspace: RX auth frame45 46end47 48userspace->mac80211: associate49alt authenticated or associated50note over mac80211,driver: cleanup like for authenticate51end52 53alt not previously authenticated (FT)54mac80211->driver: config(channel, channel type)55mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)56mac80211->driver: sta_state(AP, exists)57mac80211->driver: sta_state(AP, authenticated)58end59mac80211->driver: TX assoc60driver->mac80211: RX assoc response61note over mac80211: init rate control62mac80211->driver: sta_state(AP, associated)63 64alt not using WPA65mac80211->driver: sta_state(AP, authorized)66end67 68mac80211->driver: set up QoS parameters69 70mac80211->driver: bss_info_changed(QoS, HT, associated with AID)71mac80211->userspace: associated72 73note left of userspace: associated now74 75alt using WPA76note over userspace77do 4-way-handshake78(data frames)79end note80userspace->mac80211: authorized81mac80211->driver: sta_state(AP, authorized)82end83 84userspace->mac80211: deauthenticate/disassociate85mac80211->driver: stop BA sessions86mac80211->driver: TX deauth/disassoc87mac80211->driver: flush frames88mac80211->driver: sta_state(AP,associated)89mac80211->driver: sta_state(AP,authenticated)90mac80211->driver: sta_state(AP,exists)91mac80211->driver: sta_state(AP,not-exists)92mac80211->driver: turn off powersave93mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)94mac80211->driver: config(channel type to non-HT)95mac80211->userspace: disconnected96