From: Ilan Peer Date: Fri, 22 Dec 2023 09:04:21 +0000 (+0200) Subject: AP: Add TPE element for Indoor standard power AP X-Git-Tag: hostap_2_11~568 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cbb3ac3fa03b329f08374e07b59cd49b3b89119;p=thirdparty%2Fhostap.git AP: Add TPE element for Indoor standard power AP According to IEEE P802.11-REVme/D4.0, E.2.7 (6 GHz band), two Transmit Power Envelope (TPE) elements need to be included by Indoor Standard Power (Indoor SP) APs. Extend the code to support this. Signed-off-by: Ilan Peer --- diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 3c0353901..eb7ef6f19 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -620,7 +620,9 @@ static size_t hostapd_probe_resp_elems_len(struct hostapd_data *hapd, /* An additional Transmit Power Envelope element for * subordinate client */ if (hapd->iconf->he_6ghz_reg_pwr_type == - HE_REG_INFO_6GHZ_AP_TYPE_INDOOR) + HE_REG_INFO_6GHZ_AP_TYPE_INDOOR || + hapd->iconf->he_6ghz_reg_pwr_type == + HE_REG_INFO_6GHZ_AP_TYPE_INDOOR_SP) buflen += 4; } } @@ -1931,7 +1933,9 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len) if (is_6ghz_op_class(hapd->iconf->op_class)) { total_len += 4; if (hapd->iconf->he_6ghz_reg_pwr_type == - HE_REG_INFO_6GHZ_AP_TYPE_INDOOR) + HE_REG_INFO_6GHZ_AP_TYPE_INDOOR || + hapd->iconf->he_6ghz_reg_pwr_type == + HE_REG_INFO_6GHZ_AP_TYPE_INDOOR_SP) total_len += 4; } #endif /* CONFIG_IEEE80211AX */ @@ -2096,7 +2100,9 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, /* An additional Transmit Power Envelope element for * subordinate client */ if (hapd->iconf->he_6ghz_reg_pwr_type == - HE_REG_INFO_6GHZ_AP_TYPE_INDOOR) + HE_REG_INFO_6GHZ_AP_TYPE_INDOOR || + hapd->iconf->he_6ghz_reg_pwr_type == + HE_REG_INFO_6GHZ_AP_TYPE_INDOOR_SP) tail_len += 4; } } diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 1067787f2..8eae9efc7 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -7078,7 +7078,9 @@ u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid) /* Indoor Access Point must include an additional TPE for * subordinate devices */ if (iconf->he_6ghz_reg_pwr_type == - HE_REG_INFO_6GHZ_AP_TYPE_INDOOR) { + HE_REG_INFO_6GHZ_AP_TYPE_INDOOR || + iconf->he_6ghz_reg_pwr_type == + HE_REG_INFO_6GHZ_AP_TYPE_INDOOR_SP) { /* TODO: Extract PSD limits from channel data */ if (hapd->iconf->reg_sub_cli_eirp_psd != -1) tx_pwr = hapd->iconf->reg_sub_cli_eirp_psd;