AP: Support overriding EHT operation puncturing mask
Add support for overriding EHT Operation element puncturing mask for testing purposes. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
26ad0be4f9
commit
409ebaaa1c
3 changed files with 22 additions and 4 deletions
|
@ -4849,6 +4849,11 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||||
line);
|
line);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
|
} else if (os_strcmp(buf, "eht_oper_puncturing_override") == 0) {
|
||||||
|
if (get_u16(pos, line, &bss->eht_oper_puncturing_override))
|
||||||
|
return 1;
|
||||||
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
#endif /* CONFIG_IEEE80211BE */
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
} else {
|
} else {
|
||||||
wpa_printf(MSG_ERROR,
|
wpa_printf(MSG_ERROR,
|
||||||
|
|
|
@ -704,6 +704,10 @@ struct hostapd_bss_config {
|
||||||
unsigned int oci_freq_override_ft_assoc;
|
unsigned int oci_freq_override_ft_assoc;
|
||||||
unsigned int oci_freq_override_fils_assoc;
|
unsigned int oci_freq_override_fils_assoc;
|
||||||
unsigned int oci_freq_override_wnm_sleep;
|
unsigned int oci_freq_override_wnm_sleep;
|
||||||
|
|
||||||
|
#ifdef CONFIG_IEEE80211BE
|
||||||
|
u16 eht_oper_puncturing_override;
|
||||||
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
#endif /* CONFIG_TESTING_OPTIONS */
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
|
|
||||||
#define MESH_ENABLED BIT(0)
|
#define MESH_ENABLED BIT(0)
|
||||||
|
|
|
@ -206,22 +206,31 @@ u8 * hostapd_eid_eht_operation(struct hostapd_data *hapd, u8 *eid)
|
||||||
enum oper_chan_width chwidth;
|
enum oper_chan_width chwidth;
|
||||||
size_t elen = 1 + 4;
|
size_t elen = 1 + 4;
|
||||||
bool eht_oper_info_present;
|
bool eht_oper_info_present;
|
||||||
|
u16 punct_bitmap = conf->punct_bitmap;
|
||||||
|
|
||||||
if (!hapd->iface->current_mode)
|
if (!hapd->iface->current_mode)
|
||||||
return eid;
|
return eid;
|
||||||
|
|
||||||
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
|
if (!punct_bitmap && hapd->conf->eht_oper_puncturing_override) {
|
||||||
|
wpa_printf(MSG_DEBUG, "EHT: Puncturing mask override=0x%x",
|
||||||
|
hapd->conf->eht_oper_puncturing_override);
|
||||||
|
punct_bitmap = hapd->conf->eht_oper_puncturing_override;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
|
|
||||||
if (is_6ghz_op_class(conf->op_class))
|
if (is_6ghz_op_class(conf->op_class))
|
||||||
chwidth = op_class_to_ch_width(conf->op_class);
|
chwidth = op_class_to_ch_width(conf->op_class);
|
||||||
else
|
else
|
||||||
chwidth = conf->eht_oper_chwidth;
|
chwidth = conf->eht_oper_chwidth;
|
||||||
|
|
||||||
eht_oper_info_present = chwidth == CONF_OPER_CHWIDTH_320MHZ ||
|
eht_oper_info_present = chwidth == CONF_OPER_CHWIDTH_320MHZ ||
|
||||||
hapd->iconf->punct_bitmap;
|
punct_bitmap;
|
||||||
|
|
||||||
if (eht_oper_info_present)
|
if (eht_oper_info_present)
|
||||||
elen += 3;
|
elen += 3;
|
||||||
|
|
||||||
if (hapd->iconf->punct_bitmap)
|
if (punct_bitmap)
|
||||||
elen += EHT_OPER_DISABLED_SUBCHAN_BITMAP_SIZE;
|
elen += EHT_OPER_DISABLED_SUBCHAN_BITMAP_SIZE;
|
||||||
|
|
||||||
*pos++ = WLAN_EID_EXTENSION;
|
*pos++ = WLAN_EID_EXTENSION;
|
||||||
|
@ -277,10 +286,10 @@ u8 * hostapd_eid_eht_operation(struct hostapd_data *hapd, u8 *eid)
|
||||||
oper->oper_info.ccfs0 = seg0 ? seg0 : hapd->iconf->channel;
|
oper->oper_info.ccfs0 = seg0 ? seg0 : hapd->iconf->channel;
|
||||||
oper->oper_info.ccfs1 = seg1;
|
oper->oper_info.ccfs1 = seg1;
|
||||||
|
|
||||||
if (hapd->iconf->punct_bitmap) {
|
if (punct_bitmap) {
|
||||||
oper->oper_params |= EHT_OPER_DISABLED_SUBCHAN_BITMAP_PRESENT;
|
oper->oper_params |= EHT_OPER_DISABLED_SUBCHAN_BITMAP_PRESENT;
|
||||||
oper->oper_info.disabled_chan_bitmap =
|
oper->oper_info.disabled_chan_bitmap =
|
||||||
host_to_le16(hapd->iconf->punct_bitmap);
|
host_to_le16(punct_bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pos + elen;
|
return pos + elen;
|
||||||
|
|
Loading…
Reference in a new issue