On Fri, Mar 18, 2022 at 11:36:50AM +0100, Stefan Sperling wrote: > On Fri, Mar 18, 2022 at 05:25:42AM +0100, Landry Breuil wrote: > > interestingly, when associated over ac to the livebox the background > > scans only shows the 5ghz channels from both APs, but when im associated > > to my regular AP the background scans shows both 2ghz and 5ghz chans. > > not sure that matters. > > Thanks for pointing this out! > Background scan should indeed still report APs on all channels. > I will try to find a fix for this. It can be fixed independently from > the iwm 11ac patch. This will likely already affect iwx(4) as well.
This fixes bgscan in 11ac mode for me. Can you confirm? diff 24953ebb6e9389b0238498b9d17801bff188cdc9 72ccef0dd6ed210ccf409e8bd0918949ccb70238 blob - 6ce36c2abb0de676c636cec098c176f55b737072 blob + 29e79454bd5f94785ab0c1f39a0e8e61b997aae2 --- sys/net80211/ieee80211_input.c +++ sys/net80211/ieee80211_input.c @@ -1736,7 +1736,9 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, str #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++; blob - aeae4edc6f02c6c10b125d89763812a39ddc5146 blob + a756880e173a53d59e4e5bea783f69f9f0459149 --- sys/net80211/ieee80211_node.c +++ sys/net80211/ieee80211_node.c @@ -1056,7 +1056,8 @@ ieee80211_match_bss(struct ieee80211com *ic, struct ie 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)