diff options
| author | Andriy Voskoboinyk <avos@FreeBSD.org> | 2019-01-23 13:17:03 +0000 |
|---|---|---|
| committer | Andriy Voskoboinyk <avos@FreeBSD.org> | 2019-01-23 13:17:03 +0000 |
| commit | 7e2bcba46e9b01c9cbb7a1289f5a1fb98c079ec4 (patch) | |
| tree | 0f705d2e932545a4d96800b2456f9e139e939d92 | |
| parent | 938ed5dad6554aa457ceecc0178b6e406496d923 (diff) | |
Notes
| -rw-r--r-- | sys/net80211/ieee80211_scan_sta.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_scan_sta.c b/sys/net80211/ieee80211_scan_sta.c index 675dd83a25b7..1cada2927591 100644 --- a/sys/net80211/ieee80211_scan_sta.c +++ b/sys/net80211/ieee80211_scan_sta.c @@ -496,12 +496,15 @@ add_channels(struct ieee80211vap *vap, if (c == NULL || isexcluded(vap, c)) continue; if (mode == IEEE80211_MODE_AUTO) { + KASSERT(IEEE80211_IS_CHAN_B(c), + ("%s: wrong channel for 'auto' mode %u / %u\n", + __func__, c->ic_freq, c->ic_flags)); + /* * XXX special-case 11b/g channels so we select * the g channel if both are present. */ - if (IEEE80211_IS_CHAN_B(c) && - (cg = find11gchannel(ic, i, c->ic_freq)) != NULL) + if ((cg = find11gchannel(ic, i, c->ic_freq)) != NULL) c = cg; } ss->ss_chans[ss->ss_last++] = c; |
