From 3975ed290f4d1dd7340595296fc8d39be6a41486 Mon Sep 17 00:00:00 2001 From: Aloka Dixit Date: Thu, 31 Mar 2022 15:17:47 -0700 Subject: [PATCH 2/3] acs: generate puncturing bitmap Generate puncturing bitmap after the ideal channel selection using the threshold. Signed-off-by: Aloka Dixit --- src/ap/acs.c | 72 +++++++++++++++++++++++++++++++++++++++++--- src/drivers/driver.h | 5 +++ 2 files changed, 73 insertions(+), 4 deletions(-) --- a/src/ap/acs.c +++ b/src/ap/acs.c @@ -750,7 +750,6 @@ static void acs_update_puncturing_bitmap } #endif /* CONFIG_IEEE80211BE */ - static void acs_find_6g_psc_chan_mode(struct hostapd_iface *iface, struct hostapd_hw_modes *mode, @@ -847,8 +846,18 @@ acs_find_6g_psc_chan_mode(struct hostapd if (acs_usable_chan(chan) && (!*ideal_chan || factor < *ideal_factor)) { + /* reset puncturing bitmap for the previous ideal channel */ + if (*ideal_chan) + (*ideal_chan)->punct_bitmap = 0; + *ideal_factor = factor; *ideal_chan = chan; +#ifdef CONFIG_IEEE80211BE + if (iface->conf->ieee80211be) + acs_update_puncturing_bitmap(iface, mode, bw, + n_chans, chan, + factor, 0); +#endif /* CONFIG_IEEE80211BE */ } /* This channel would at least be usable */