diff options
author | 2017-09-05 14:56:59 +0000 | |
---|---|---|
committer | 2017-09-05 14:56:59 +0000 | |
commit | a9464ae848d6bc8311cbf174a14a677606641cb3 (patch) | |
tree | b2d426c6aab517131af4b7a8f54171f6bbec5ace | |
parent | EPROTO is now in sys/errno.h (diff) | |
download | wireguard-openbsd-a9464ae848d6bc8311cbf174a14a677606641cb3.tar.xz wireguard-openbsd-a9464ae848d6bc8311cbf174a14a677606641cb3.zip |
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@
-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); |