diff options
author | sam <sam@FreeBSD.org> | 2009-02-10 01:37:55 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-02-10 01:37:55 +0000 |
commit | 2cd78ce2efd6564c429bbf577f77fd701567e808 (patch) | |
tree | 9c412461063cbc29de6e9959957e9fca3da66fd0 /sys/net80211/ieee80211_regdomain.c | |
parent | 8a9f5896ced0e3b1fb69a28e217be1ee4eba2901 (diff) | |
download | FreeBSD-src-2cd78ce2efd6564c429bbf577f77fd701567e808.zip FreeBSD-src-2cd78ce2efd6564c429bbf577f77fd701567e808.tar.gz |
correctly fixup iv_des_chan after installing a new channel table; if the
previous channel is now invalid we must set it to IEEE80211_CHAN_ANYC
Diffstat (limited to 'sys/net80211/ieee80211_regdomain.c')
-rw-r--r-- | sys/net80211/ieee80211_regdomain.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_regdomain.c b/sys/net80211/ieee80211_regdomain.c index da3bfcc..91cf810 100644 --- a/sys/net80211/ieee80211_regdomain.c +++ b/sys/net80211/ieee80211_regdomain.c @@ -428,8 +428,9 @@ ieee80211_setregdomain(struct ieee80211vap *vap, ieee80211_scan_flush(vap); ieee80211_dfs_reset(ic); if (vap->iv_des_chan != IEEE80211_CHAN_ANYC) { + c = ieee80211_find_channel(ic, desfreq, desflags); /* NB: may be NULL if not present in new channel list */ - vap->iv_des_chan = ieee80211_find_channel(ic, desfreq, desflags); + vap->iv_des_chan = (c != NULL) ? c : IEEE80211_CHAN_ANYC; } IEEE80211_UNLOCK(ic); |