diff --git a/src/ap/beacon.c b/src/ap/beacon.c index ee1f02792..89e360874 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -580,7 +580,7 @@ static size_t he_elem_len(struct hostapd_data *hapd) 3 + sizeof(struct ieee80211_he_6ghz_band_cap); /* An additional Transmit Power Envelope element for * subordinate client */ - if (he_reg_is_sp(hapd->iconf->he_6ghz_reg_pwr_type)) + if (he_reg_is_indoor(hapd->iconf->he_6ghz_reg_pwr_type)) len += 4; /* An additional Transmit Power Envelope element for diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index a939ad35e..50190a280 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -7077,7 +7077,7 @@ u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid) /* Indoor Access Point must include an additional TPE for * subordinate devices */ - if (he_reg_is_sp(iconf->he_6ghz_reg_pwr_type)) { + if (he_reg_is_indoor(iconf->he_6ghz_reg_pwr_type)) { /* 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; diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 4e040c35c..12137dcf4 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -2461,6 +2461,12 @@ enum he_reg_info_6ghz_ap_type { HE_REG_INFO_6GHZ_AP_TYPE_MAX = HE_REG_INFO_6GHZ_AP_TYPE_INDOOR_SP, }; +static inline bool he_reg_is_indoor(enum he_reg_info_6ghz_ap_type type) +{ + return type == HE_REG_INFO_6GHZ_AP_TYPE_INDOOR || + type == HE_REG_INFO_6GHZ_AP_TYPE_INDOOR_SP; +} + static inline bool he_reg_is_sp(enum he_reg_info_6ghz_ap_type type) { return type == HE_REG_INFO_6GHZ_AP_TYPE_SP ||