diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-09-05 12:02:22 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-09-05 12:02:22 +0000 |
commit | 5f08ffea716b3834e7cb211011673a1602c3f05f (patch) | |
tree | 79aaa2c08b82096ef6a480c61baba000f4cdc226 /sys/net80211 | |
parent | 4051d863f86f343c06f8bcb985b7648fd3ef6250 (diff) |
When selecting the next wireless mode during the scan loop, always select
AUTO mode if the driver scans all bands at once. Otherwise the net80211
layer unnecessarily filters out some of the beacons received by the device.
ok phessler@ mpi@ kevlo@
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index eb9a6e52922..ff788315911 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.c,v 1.62 2017/06/20 13:51:46 stsp Exp $ */ +/* $OpenBSD: ieee80211.c,v 1.63 2017/09/05 12:02:21 stsp Exp $ */ /* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */ /*- @@ -877,7 +877,9 @@ ieee80211_next_mode(struct ifnet *ifp) if (ic->ic_curmode == IEEE80211_MODE_11N) continue; - if (ic->ic_curmode >= IEEE80211_MODE_MAX) { + /* Always scan in AUTO mode if the driver scans all bands. */ + if (ic->ic_curmode >= IEEE80211_MODE_MAX || + (ic->ic_caps & IEEE80211_C_SCANALLBAND)) { ic->ic_curmode = IEEE80211_MODE_AUTO; break; } |