mac80211-auth-assoc-deauth.txt 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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, non-HT)
  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, non-HT)
  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. alt is HT channel
  57. mac80211->driver: config(channel, HT params)
  58. end
  59. mac80211->driver: bss_info_changed(QoS, HT, associated with AID)
  60. mac80211->userspace: associated
  61. note left of userspace: associated now
  62. alt using WPA
  63. note over userspace
  64. do 4-way-handshake
  65. (data frames)
  66. end note
  67. userspace->mac80211: authorized
  68. mac80211->driver: sta_state(AP, authorized)
  69. end
  70. userspace->mac80211: deauthenticate/disassociate
  71. mac80211->driver: stop BA sessions
  72. mac80211->driver: TX deauth/disassoc
  73. mac80211->driver: flush frames
  74. mac80211->driver: sta_state(AP,associated)
  75. mac80211->driver: sta_state(AP,authenticated)
  76. mac80211->driver: sta_state(AP,exists)
  77. mac80211->driver: sta_state(AP,not-exists)
  78. mac80211->driver: turn off powersave
  79. mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)
  80. mac80211->driver: config(non-HT channel type)
  81. mac80211->userspace: disconnected