mac80211-auth-assoc-deauth.txt 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. participant userspace
  9. participant mac80211
  10. participant driver
  11. alt authentication needed (not FT)
  12. userspace->mac80211: authenticate
  13. alt authenticated/authenticating already
  14. mac80211->driver: sta_state(AP, not-exists)
  15. mac80211->driver: bss_info_changed(clear BSSID)
  16. else associated
  17. note over mac80211,driver
  18. like deauth/disassoc, without sending the
  19. BA session stop & deauth/disassoc frames
  20. end note
  21. end
  22. mac80211->driver: config(channel, channel type)
  23. mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
  24. mac80211->driver: sta_state(AP, exists)
  25. alt no probe request data known
  26. mac80211->driver: TX directed probe request
  27. driver->mac80211: RX probe response
  28. end
  29. mac80211->driver: TX auth frame
  30. driver->mac80211: RX auth frame
  31. alt WEP shared key auth
  32. mac80211->driver: TX auth frame
  33. driver->mac80211: RX auth frame
  34. end
  35. mac80211->driver: sta_state(AP, authenticated)
  36. mac80211->userspace: RX auth frame
  37. end
  38. userspace->mac80211: associate
  39. alt authenticated or associated
  40. note over mac80211,driver: cleanup like for authenticate
  41. end
  42. alt not previously authenticated (FT)
  43. mac80211->driver: config(channel, channel type)
  44. mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
  45. mac80211->driver: sta_state(AP, exists)
  46. mac80211->driver: sta_state(AP, authenticated)
  47. end
  48. mac80211->driver: TX assoc
  49. driver->mac80211: RX assoc response
  50. note over mac80211: init rate control
  51. mac80211->driver: sta_state(AP, associated)
  52. alt not using WPA
  53. mac80211->driver: sta_state(AP, authorized)
  54. end
  55. mac80211->driver: set up QoS parameters
  56. mac80211->driver: bss_info_changed(QoS, HT, associated with AID)
  57. mac80211->userspace: associated
  58. note left of userspace: associated now
  59. alt using WPA
  60. note over userspace
  61. do 4-way-handshake
  62. (data frames)
  63. end note
  64. userspace->mac80211: authorized
  65. mac80211->driver: sta_state(AP, authorized)
  66. end
  67. userspace->mac80211: deauthenticate/disassociate
  68. mac80211->driver: stop BA sessions
  69. mac80211->driver: TX deauth/disassoc
  70. mac80211->driver: flush frames
  71. mac80211->driver: sta_state(AP,associated)
  72. mac80211->driver: sta_state(AP,authenticated)
  73. mac80211->driver: sta_state(AP,exists)
  74. mac80211->driver: sta_state(AP,not-exists)
  75. mac80211->driver: turn off powersave
  76. mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)
  77. mac80211->driver: config(channel type to non-HT)
  78. mac80211->userspace: disconnected