-/* $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
#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++;
-/* $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 $ */
/*-
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)