summaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2022-03-20 07:50:33 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2022-03-20 07:50:33 +0000
commit94a5e44ef9de664d308d6d8bc020f8a5b8493988 (patch)
treec6a0c826dc3f604f3f7f58320a6bd845766e0c8b /sys/net80211
parentc6ee5096a3b8866bb4df07abf1d1761acf7368b2 (diff)
Make background scans pick up APs on 2GHz channels while in 11ac mode.
found by landry@
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_input.c6
-rw-r--r--sys/net80211/ieee80211_node.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 6ce36c2abb0..5b060797db5 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_input.c,v 1.245 2022/03/14 15:07:24 stsp Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.246 2022/03/20 07:50:32 stsp Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
@@ -1736,7 +1736,9 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, struct mbuf *m,
#if IEEE80211_CHAN_MAX < 255
chan > IEEE80211_CHAN_MAX ||
#endif
- isclr(ic->ic_chan_active, chan)) {
+ (isclr(ic->ic_chan_active, chan) &&
+ ((ic->ic_caps & IEEE80211_C_SCANALL) == 0 ||
+ (ic->ic_flags & IEEE80211_F_BGSCAN) == 0))) {
DPRINTF(("ignore %s with invalid channel %u\n",
isprobe ? "probe response" : "beacon", chan));
ic->ic_stats.is_rx_badchan++;
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 56747e1da29..f3bb6dd1eef 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_node.c,v 1.194 2022/03/19 15:21:13 stsp Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.195 2022/03/20 07:50:32 stsp Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
@@ -1056,7 +1056,8 @@ ieee80211_match_bss(struct ieee80211com *ic, struct ieee80211_node *ni,
int fail;
fail = 0;
- if (isclr(ic->ic_chan_active, ieee80211_chan2ieee(ic, ni->ni_chan)))
+ if ((ic->ic_flags & IEEE80211_F_BGSCAN) == 0 &&
+ isclr(ic->ic_chan_active, ieee80211_chan2ieee(ic, ni->ni_chan)))
fail |= IEEE80211_NODE_ASSOCFAIL_CHAN;
if (ic->ic_des_chan != IEEE80211_CHAN_ANYC &&
ni->ni_chan != ic->ic_des_chan)