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:
parent
bc0268d053
commit
a94ba53228
1 changed files with 26 additions and 16 deletions
|
@ -908,7 +908,8 @@ static bool hostapd_is_usable_punct_bitmap(struct hostapd_iface *iface)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_IEEE80211BE
|
#ifdef CONFIG_IEEE80211BE
|
||||||
struct hostapd_config *conf = iface->conf;
|
struct hostapd_config *conf = iface->conf;
|
||||||
u8 bw, start_chan;
|
u16 bw;
|
||||||
|
u8 start_chan;
|
||||||
|
|
||||||
if (!conf->punct_bitmap)
|
if (!conf->punct_bitmap)
|
||||||
return true;
|
return true;
|
||||||
|
@ -925,21 +926,30 @@ static bool hostapd_is_usable_punct_bitmap(struct hostapd_iface *iface)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (conf->eht_oper_chwidth) {
|
/*
|
||||||
case 0:
|
* In the 6 GHz band, eht_oper_chwidth is ignored. Use operating class
|
||||||
wpa_printf(MSG_ERROR,
|
* to determine channel width.
|
||||||
"RU puncturing is supported only in 80 MHz and 160 MHz");
|
*/
|
||||||
return false;
|
if (conf->op_class == 137) {
|
||||||
case 1:
|
bw = 320;
|
||||||
bw = 80;
|
start_chan = conf->eht_oper_centr_freq_seg0_idx - 30;
|
||||||
start_chan = conf->eht_oper_centr_freq_seg0_idx - 6;
|
} else {
|
||||||
break;
|
switch (conf->eht_oper_chwidth) {
|
||||||
case 2:
|
case 0:
|
||||||
bw = 160;
|
wpa_printf(MSG_ERROR,
|
||||||
start_chan = conf->eht_oper_centr_freq_seg0_idx - 14;
|
"RU puncturing is supported only in 80 MHz and 160 MHz");
|
||||||
break;
|
return false;
|
||||||
default:
|
case 1:
|
||||||
return false;
|
bw = 80;
|
||||||
|
start_chan = conf->eht_oper_centr_freq_seg0_idx - 6;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
bw = 160;
|
||||||
|
start_chan = conf->eht_oper_centr_freq_seg0_idx - 14;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_punct_bitmap_valid(bw, (conf->channel - start_chan) / 4,
|
if (!is_punct_bitmap_valid(bw, (conf->channel - start_chan) / 4,
|
||||||
|
|
Loading…
Reference in a new issue