- Factor out ieee80211_reset_state() from ieee80211_newstate(), so
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 26 Apr 2007 12:59:14 +0000 (12:59 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 26 Apr 2007 12:59:14 +0000 (12:59 +0000)
commit846cf0bcfd658b8083750ab5b8a56bdacb4ef1fd
tree0714c804e8a4a5e7a78079076e948c571244a761
parent142ca760a5a6c9dd8d6780a70893d71cacbcee8f
- Factor out ieee80211_reset_state() from ieee80211_newstate(), so
  802.11 layer can clean up its internal state machine without state
  changing or going through driver code.
- Merge sta_disassoc() and sta_disauth() into sta_disconnect(), which
  sends disassoc to associated STA and deauth to authenticating STA.
- Call ieee80211_reset_state(), if operational mode is going to be
  changed, so we will do a proper state machine clean up.  In the
  original way, if we are acting as AP and switch directly to act as
  STA, we will send out wrong management frames.
- Call ieee80211_reset_state(), if PHY is going to be changed.  This
  prevents panic (due to a proper assertion) under following scenario:
  o  Current PHY of the AP is 11b.
  o  An 11b STA joins the BSS created by the AP.  Since AP's current
     PHY is 11b, this STA will not be counted as long slot time STA,
     i.e. long slot time STA count left untouched.
  o  Switch AP's PHY to 11g.
  AP will panick (long slot time STA count is zero, while there is a
  long slot time STA associated, in ieee80211_node_leave_11g()).  The
  assertion fails, because 802.11 state machine is doing its clean up
  as if AP were using 11g PHY, but it actually used 11b PHY.
sys/netproto/802_11/ieee80211_proto.h
sys/netproto/802_11/wlan/ieee80211.c
sys/netproto/802_11/wlan/ieee80211_proto.c