diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-09-05 14:57:00 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-09-05 14:57:00 +0000 |
commit | 1e7b9c8ab638cc22f2063effce8e920f656fdf85 (patch) | |
tree | 8f6011af0b7c6ce0caf01290f07c964a8767740f /sys | |
parent | 0e8c818470eb8d373243aec7652af7e91de3d655 (diff) |
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@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |