From 1e7b9c8ab638cc22f2063effce8e920f656fdf85 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Tue, 5 Sep 2017 14:57:00 +0000 Subject: When starting a new scan always set the mode to AUTO if the driver scans all bands at once. Fixes a problem where e.g. 5GHz APs were filtered out if we were previously associated to an 11g-only AP. ok mpi@ phessler@ --- sys/net80211/ieee80211_node.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index fdb34a7dac6..aac5308668f 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.120 2017/08/17 06:01:05 stsp Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.121 2017/09/05 14:56:59 stsp Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -276,7 +276,8 @@ ieee80211_begin_scan(struct ifnet *ifp) * Reset the current mode. Setting the current mode will also * reset scan state. */ - if (IFM_MODE(ic->ic_media.ifm_cur->ifm_media) == IFM_AUTO) + if (IFM_MODE(ic->ic_media.ifm_cur->ifm_media) == IFM_AUTO || + (ic->ic_caps & IEEE80211_C_SCANALLBAND)) ic->ic_curmode = IEEE80211_MODE_AUTO; ieee80211_setmode(ic, ic->ic_curmode); -- cgit v1.2.3