linux/Documentation/networking/mac80211-auth-assoc-deauth.txt
<<
>>
Prefs
   1#
   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
  17mac80211->driver: sta_state(AP, not-exists)
  18mac80211->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
  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 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)
  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)
  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
  70mac80211->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)
  90mac80211->driver: sta_state(AP,exists)
  91mac80211->driver: sta_state(AP,not-exists)
  92mac80211->driver: turn off powersave
  93mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)
  94mac80211->driver: config(channel type to non-HT)
  95mac80211->userspace: disconnected
  96
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.