svn commit: r191480 - user/thompsa/vaptq/sys/net80211
Andrew Thompson
thompsa at FreeBSD.org
Sat Apr 25 05:45:08 UTC 2009
Author: thompsa
Date: Sat Apr 25 05:45:08 2009
New Revision: 191480
URL: http://svn.freebsd.org/changeset/base/191480
Log:
Add a bandaid for external events trashing the pending state change to INIT.
Modified:
user/thompsa/vaptq/sys/net80211/ieee80211_proto.c
Modified: user/thompsa/vaptq/sys/net80211/ieee80211_proto.c
==============================================================================
--- user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Sat Apr 25 05:14:56 2009 (r191479)
+++ user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Sat Apr 25 05:45:08 2009 (r191480)
@@ -1684,12 +1684,20 @@ ieee80211_new_state_locked(struct ieee80
IEEE80211_LOCK_ASSERT(ic);
- /* Warn if the previous state hasn't completed. XXX Queue? */
- if (vap->iv_state != vap->iv_nstate)
+ if (vap->iv_state != vap->iv_nstate) {
+ if (vap->iv_nstate == IEEE80211_S_INIT) {
+ /*
+ * XXX The vap is being stopped, do no allow any other
+ * state changes until this is completed.
+ */
+ return (-1);
+ }
+ /* Warn if the previous state hasn't completed. */
IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE,
"%s: pending %s -> %s transition lost\n", __func__,
ieee80211_state_name[vap->iv_state],
ieee80211_state_name[vap->iv_nstate]);
+ }
nrunning = nscanning = 0;
/* XXX can track this state instead of calculating */
More information about the svn-src-user
mailing list