diff options
author | Aloka Dixit <quic_alokad@quicinc.com> | 2023-03-13 21:59:25 -0700 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2023-03-17 19:49:57 +0200 |
commit | a0403c0239c46b6af9aeb0c6ddab1e41146fa209 (patch) | |
tree | 5a763258c78654a9aaed606eea8e0541651d767f | |
parent | af0f60e7dd00f0961cb012ea645265a2ad071860 (diff) | |
download | hostap-a0403c0239c46b6af9aeb0c6ddab1e41146fa209.tar.gz |
EHT: Validate the puncturing bitmap for ACS
Validate the generated puncturing bitmap against non-OFDMA patterns.
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
-rw-r--r-- | src/ap/acs.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ap/acs.c b/src/ap/acs.c index 99973f140..1181c7d58 100644 --- a/src/ap/acs.c +++ b/src/ap/acs.c @@ -722,7 +722,7 @@ static void acs_update_puncturing_bitmap(struct hostapd_iface *iface, int index_primary) { struct hostapd_config *conf = iface->conf; - struct hostapd_channel_data *adj_chan = NULL; + struct hostapd_channel_data *adj_chan = NULL, *first_chan = chan; int i; long double threshold; @@ -754,9 +754,16 @@ static void acs_update_puncturing_bitmap(struct hostapd_iface *iface, return; } + if (i == 0) + first_chan = adj_chan; + if (adj_chan->interference_factor > threshold) chan->punct_bitmap |= BIT(i); } + + if (!is_punct_bitmap_valid(bw, (chan->freq - first_chan->freq) / 20, + chan->punct_bitmap)) + chan->punct_bitmap = 0; } #endif /* CONFIG_IEEE80211BE */ |