]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Add TPE element for Indoor standard power AP
authorIlan Peer <ilan.peer@intel.com>
Fri, 22 Dec 2023 09:04:21 +0000 (11:04 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 22 Dec 2023 16:22:04 +0000 (18:22 +0200)
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 <ilan.peer@intel.com>
src/ap/beacon.c
src/ap/ieee802_11.c

index 3c0353901c121de65f85f330b705eab6ed3ac77f..eb7ef6f19fd4945be4cc0f5ddac9c2a969fadc67 100644 (file)
@@ -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;
                }
        }
index 1067787f29ba0929456cd082edf7db50353953f4..8eae9efc7e8a0e7bc828b516be9c2fd8980e7342 100644 (file)
@@ -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;