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
This commit is contained in:
Sam Leffler 2009-02-10 01:37:55 +00:00
parent 91e1be8baf
commit 24a90e6b81

View File

@ -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);