Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_proto.c
Show First 20 Lines • Show All 1,920 Lines • ▼ Show 20 Lines | ieee80211_newstate_cb(void *xvap, int npending) | ||||
nstate = vap->iv_nstate; | nstate = vap->iv_nstate; | ||||
arg = vap->iv_nstate_arg; | arg = vap->iv_nstate_arg; | ||||
if (vap->iv_flags_ext & IEEE80211_FEXT_REINIT) { | if (vap->iv_flags_ext & IEEE80211_FEXT_REINIT) { | ||||
/* | /* | ||||
* We have been requested to drop back to the INIT before | * We have been requested to drop back to the INIT before | ||||
* proceeding to the new state. | * proceeding to the new state. | ||||
*/ | */ | ||||
/* Suppress 'pending state transition lost' warning */ | |||||
vap->iv_nstate = IEEE80211_S_INIT; | |||||
IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, | IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, | ||||
"%s: %s -> %s arg %d\n", __func__, | "%s: %s -> %s arg %d\n", __func__, | ||||
ieee80211_state_name[vap->iv_state], | ieee80211_state_name[vap->iv_state], | ||||
ieee80211_state_name[IEEE80211_S_INIT], arg); | ieee80211_state_name[vap->iv_nstate], arg); | ||||
vap->iv_newstate(vap, IEEE80211_S_INIT, arg); | vap->iv_newstate(vap, vap->iv_nstate, 0); | ||||
IEEE80211_LOCK_ASSERT(ic); | IEEE80211_LOCK_ASSERT(ic); | ||||
vap->iv_flags_ext &= ~IEEE80211_FEXT_REINIT; | vap->iv_flags_ext &= ~(IEEE80211_FEXT_REINIT | | ||||
IEEE80211_FEXT_STATEWAIT); | |||||
/* enqueue new state transition after cancel_scan() task */ | |||||
ieee80211_new_state_locked(vap, nstate, arg); | |||||
goto done; | |||||
} | } | ||||
ostate = vap->iv_state; | ostate = vap->iv_state; | ||||
if (nstate == IEEE80211_S_SCAN && ostate != IEEE80211_S_INIT) { | if (nstate == IEEE80211_S_SCAN && ostate != IEEE80211_S_INIT) { | ||||
/* | /* | ||||
* SCAN was forced; e.g. on beacon miss. Force other running | * SCAN was forced; e.g. on beacon miss. Force other running | ||||
* vap's to INIT state and mark them as waiting for the scan to | * vap's to INIT state and mark them as waiting for the scan to | ||||
* complete. This insures they don't interfere with our | * complete. This insures they don't interfere with our | ||||
▲ Show 20 Lines • Show All 251 Lines • Show Last 20 Lines |