diff options
author | 2017-09-05 12:02:21 +0000 | |
---|---|---|
committer | 2017-09-05 12:02:21 +0000 | |
commit | f25d6809c0f2e6dfb81f7aeadf14ba5ba668697c (patch) | |
tree | b301af25f0619cd209a791c9f3664f958efcfed1 | |
parent | Simplify rtable_mpath_insert(). (diff) | |
download | wireguard-openbsd-f25d6809c0f2e6dfb81f7aeadf14ba5ba668697c.tar.xz wireguard-openbsd-f25d6809c0f2e6dfb81f7aeadf14ba5ba668697c.zip |
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@
-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; } |