The change to use a helper function for checking he_6ghz_reg_pwr_type
missed the difference between two types of checks for different values:
indoor AP vs. SP AP. Fix this by introducing another helper function to
cover the indoor (i.e., SP and non-SP indoor cases).
Fixes: 121ccadeb44c ("AP: A helper function for determining whether the AP is an SP AP")
Signed-off-by: Jouni Malinen <j@w1.fi>
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
/* 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;
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 ||