{
#ifdef CONFIG_IEEE80211BE
struct hostapd_config *conf = iface->conf;
- u8 bw, start_chan;
+ u16 bw;
+ u8 start_chan;
if (!conf->punct_bitmap)
return true;
return false;
}
- switch (conf->eht_oper_chwidth) {
- case 0:
- wpa_printf(MSG_ERROR,
- "RU puncturing is supported only in 80 MHz and 160 MHz");
- return false;
- case 1:
- 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;
+ /*
+ * 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,
+ "RU puncturing is supported only in 80 MHz and 160 MHz");
+ return false;
+ case 1:
+ 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,