From 5f08ffea716b3834e7cb211011673a1602c3f05f Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Tue, 5 Sep 2017 12:02:22 +0000 Subject: 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@ --- sys/net80211/ieee80211.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/net80211') 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; } -- cgit v1.2.3