EHT: Support puncturing for 320 MHz channel bandwidth

Determine the channel width by operating class for the 6 GHz band when
validating puncturing bitmap. This is needed to allow puncturing to be
used with 320 MHz channels.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Chenming Huang 2023-07-12 08:32:32 +05:30 committed by Jouni Malinen
parent bc0268d053
commit a94ba53228

View file

@ -908,7 +908,8 @@ static bool hostapd_is_usable_punct_bitmap(struct hostapd_iface *iface)
{
#ifdef CONFIG_IEEE80211BE
struct hostapd_config *conf = iface->conf;
u8 bw, start_chan;
u16 bw;
u8 start_chan;
if (!conf->punct_bitmap)
return true;
@ -925,6 +926,14 @@ static bool hostapd_is_usable_punct_bitmap(struct hostapd_iface *iface)
return false;
}
/*
* In the 6 GHz band, eht_oper_chwidth is ignored. Use operating class
* to determine channel width.
*/
if (conf->op_class == 137) {
bw = 320;
start_chan = conf->eht_oper_centr_freq_seg0_idx - 30;
} else {
switch (conf->eht_oper_chwidth) {
case 0:
wpa_printf(MSG_ERROR,
@ -941,6 +950,7 @@ static bool hostapd_is_usable_punct_bitmap(struct hostapd_iface *iface)
default:
return false;
}
}
if (!is_punct_bitmap_valid(bw, (conf->channel - start_chan) / 4,
conf->punct_bitmap)) {