diff options
author | sam <sam@FreeBSD.org> | 2009-01-23 18:16:14 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-01-23 18:16:14 +0000 |
commit | cdea6eebedb83ac0008c6664435b9ae9baa18342 (patch) | |
tree | b066fd47895e0ea11e40368eae02c0c926d27127 /sys/net80211/ieee80211_regdomain.c | |
parent | 82ca467ce7bf66a16a9d1bb34be96239dea322e9 (diff) | |
download | FreeBSD-src-cdea6eebedb83ac0008c6664435b9ae9baa18342.zip FreeBSD-src-cdea6eebedb83ac0008c6664435b9ae9baa18342.tar.gz |
fix regulatory state check for all vaps' being down; it must be done
before calling the ic_setregdomain callback
Diffstat (limited to 'sys/net80211/ieee80211_regdomain.c')
-rw-r--r-- | sys/net80211/ieee80211_regdomain.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_regdomain.c b/sys/net80211/ieee80211_regdomain.c index 724d00b..042f9bb 100644 --- a/sys/net80211/ieee80211_regdomain.c +++ b/sys/net80211/ieee80211_regdomain.c @@ -373,6 +373,13 @@ ieee80211_setregdomain(struct ieee80211vap *vap, c->ic_maxpower = 2*c->ic_maxregpower; } IEEE80211_LOCK(ic); + /* XXX bandaid; a running vap will likely crash */ + if (!allvapsdown(ic)) { + IEEE80211_UNLOCK(ic); + IEEE80211_DPRINTF(vap, IEEE80211_MSG_IOCTL, + "%s: reject: vaps are running\n", __func__); + return EBUSY; + } error = ic->ic_setregdomain(ic, ®->rd, reg->chaninfo.ic_nchans, reg->chaninfo.ic_chans); if (error != 0) { @@ -381,13 +388,6 @@ ieee80211_setregdomain(struct ieee80211vap *vap, "%s: driver rejected request, error %u\n", __func__, error); return error; } - /* XXX bandaid; a running vap will likely crash */ - if (!allvapsdown(ic)) { - IEEE80211_UNLOCK(ic); - IEEE80211_DPRINTF(vap, IEEE80211_MSG_IOCTL, - "%s: reject: vaps are running\n", __func__); - return EBUSY; - } /* * Commit: copy in new channel table and reset media state. * On return the state machines will be clocked so all vaps |