- Factor out ieee80211_reset_state() from ieee80211_newstate(), so
commitd63f59d3cdca4a33d17d15ad72073ec2a6905f21
authorsephe <sephe>
Thu, 26 Apr 2007 12:59:14 +0000 (26 12:59 +0000)
committersephe <sephe>
Thu, 26 Apr 2007 12:59:14 +0000 (26 12:59 +0000)
tree288da9f4cd396b96d37df79744252bc8b098589d
parentf4725c32ad510e1cfb5ec3e62882dfbb9dfdae72
- 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