Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_proto.c
Show First 20 Lines • Show All 2,578 Lines • ▼ Show 20 Lines | ieee80211_newstate_cb(void *xvap, int npending) | ||||
* So, if we're here and the state is RUN, just clear OACTIVE. | * So, if we're here and the state is RUN, just clear OACTIVE. | ||||
* At some point if the markwaiting/wakeupwaiting paths end up | * At some point if the markwaiting/wakeupwaiting paths end up | ||||
* also invoking the deferred state updates then this will | * also invoking the deferred state updates then this will | ||||
* be no-op code - and also if OACTIVE is finally retired, it'll | * be no-op code - and also if OACTIVE is finally retired, it'll | ||||
* also be no-op code. | * also be no-op code. | ||||
*/ | */ | ||||
if (nstate == IEEE80211_S_RUN) { | if (nstate == IEEE80211_S_RUN) { | ||||
/* | /* | ||||
* Unblock the VAP queue; a RUN->RUN state can happen | |||||
* on a STA+AP setup on the AP vap. See wakeupwaiting(). | |||||
*/ | |||||
vap->iv_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; | |||||
} | |||||
/* No actual transition, skip post processing */ | |||||
if (ostate == nstate) | |||||
goto done; | |||||
if (nstate == IEEE80211_S_RUN) { | |||||
/* | |||||
* OACTIVE may be set on the vap if the upper layer | * OACTIVE may be set on the vap if the upper layer | ||||
* tried to transmit (e.g. IPv6 NDP) before we reach | * tried to transmit (e.g. IPv6 NDP) before we reach | ||||
* RUN state. Clear it and restart xmit. | * RUN state. Clear it and restart xmit. | ||||
* | * | ||||
* Note this can also happen as a result of SLEEP->RUN | * Note this can also happen as a result of SLEEP->RUN | ||||
* (i.e. coming out of power save mode). | * (i.e. coming out of power save mode). | ||||
* | |||||
* Historically this was done only for a state change | |||||
* but is needed earlier; see next comment. The 2nd half | |||||
* of the work is still only done in case of an actual | |||||
* state change below. | |||||
*/ | */ | ||||
/* | |||||
* Unblock the VAP queue; a RUN->RUN state can happen | |||||
* on a STA+AP setup on the AP vap. See wakeupwaiting(). | |||||
*/ | |||||
vap->iv_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; | vap->iv_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; | ||||
/* | /* | ||||
* XXX TODO Kick-start a VAP queue - this should be a method! | * XXX TODO Kick-start a VAP queue - this should be a method! | ||||
*/ | */ | ||||
} | |||||
/* No actual transition, skip post processing */ | |||||
if (ostate == nstate) | |||||
goto done; | |||||
if (nstate == IEEE80211_S_RUN) { | |||||
/* bring up any vaps waiting on us */ | /* bring up any vaps waiting on us */ | ||||
wakeupwaiting(vap); | wakeupwaiting(vap); | ||||
} else if (nstate == IEEE80211_S_INIT) { | } else if (nstate == IEEE80211_S_INIT) { | ||||
/* | /* | ||||
* Flush the scan cache if we did the last scan (XXX?) | * Flush the scan cache if we did the last scan (XXX?) | ||||
* and flush any frames on send queues from this vap. | * and flush any frames on send queues from this vap. | ||||
* Note the mgt q is used only for legacy drivers and | * Note the mgt q is used only for legacy drivers and | ||||
▲ Show 20 Lines • Show All 211 Lines • Show Last 20 Lines |