Index: sys/net80211/ieee80211_proto.c =================================================================== --- sys/net80211/ieee80211_proto.c +++ sys/net80211/ieee80211_proto.c @@ -1926,13 +1926,19 @@ * We have been requested to drop back to the INIT before * proceeding to the new state. */ + /* Suppress 'pending state transition lost' warning */ + vap->iv_nstate = IEEE80211_S_INIT; IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s -> %s arg %d\n", __func__, ieee80211_state_name[vap->iv_state], - ieee80211_state_name[IEEE80211_S_INIT], arg); - vap->iv_newstate(vap, IEEE80211_S_INIT, arg); + ieee80211_state_name[vap->iv_nstate], arg); + vap->iv_newstate(vap, vap->iv_nstate, 0); 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;