wlan-ap-Telecominfraproject/feeds/qca/hostapd/patches/q02-047-hostapd-Fix-tx-power-envelope-for-non-PSD-countries.patch
John Crispin 008ca9618d
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
ipq95xx: import ath12.4-cs kernel and drivers
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 09:25:13 +02:00

64 lines
2.2 KiB
Diff

From 11873ac90db3f8c73088a1d7b4bd44509b832348 Mon Sep 17 00:00:00 2001
From: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Date: Fri, 21 Oct 2022 19:20:46 +0530
Subject: [PATCH] hostapd: Fix tx power envelope for non PSD countries
TX power envelope will contain PSD value for countries.
In case of non PSD countries, it is expected to carry
max EIRP for the channel received from FW through reg
rules.
Updated the power value in IE with max EIRP power for
other non PSD countries
Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 4c84575..d026e34 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7005,6 +7005,8 @@ u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid)
}
if (i == mode->num_channels)
return eid;
+
+ chan = &mode->channels[i];
#ifdef CONFIG_IEEE80211AX
/* IEEE Std 802.11ax-2021, Annex E.2.7 (6 GHz band in the United
@@ -7026,7 +7028,10 @@ u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid)
psd = mode->psd_values[NL80211_REG_REGULAR_CLIENT_LPI +
iconf->he_6ghz_reg_pwr_type];
#ifdef REG_DOM_SUPPORT_TX_POWER
- tx_pwr = psd * 2;
+ if (psd)
+ tx_pwr = psd * 2;
+ else
+ tx_pwr = chan->max_tx_power;
#else
tx_pwr = (hostapd_get_6g_tx_power(hapd,
iconf->he_6ghz_reg_pwr_type,
@@ -7038,10 +7043,13 @@ 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_6GHZ_INDOOR_AP) {
- psd = mode->psd_values[NL80211_REG_SUBORDINATE_CLIENT_LPI +
+ psd = mode->psd_values[NL80211_REG_AP_LPI +
iconf->he_6ghz_reg_pwr_type];
#ifdef REG_DOM_SUPPORT_TX_POWER
- tx_pwr = psd * 2;
+ if (psd)
+ tx_pwr = psd * 2;
+ else
+ tx_pwr = chan->max_tx_power;
#else
tx_pwr = (hostapd_get_6g_tx_power(hapd,
iconf->he_6ghz_reg_pwr_type,
@@ -7110,7 +7118,6 @@ u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid)
* channel in Country element and local pwr constraint is specified
* for channel in this Power Constraint element.
*/
- chan = &mode->channels[i];
max_tx_power = chan->max_tx_power - local_pwr_constraint;
/*