From: stsp Date: Sun, 20 Mar 2022 07:50:32 +0000 (+0000) Subject: Make background scans pick up APs on 2GHz channels while in 11ac mode. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ef1d73a0199d0f07c35aba006db7a6f3ff7f99f0;p=openbsd Make background scans pick up APs on 2GHz channels while in 11ac mode. found by landry@ --- 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)