Date: Sat, 25 Apr 2009 05:45:08 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r191480 - user/thompsa/vaptq/sys/net80211 Message-ID: <200904250545.n3P5j82A043549@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904250545.n3P5j82A043549>