diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index 3d79b91dd3..e5c6bef7e5 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -1216,6 +1216,7 @@ static void mlme_init_sta_cfg(struct wlan_objmgr_psoc *psoc,
(uint32_t)cfg_default(CFG_WT_CNF_TIMEOUT);
sta->current_rssi =
(uint32_t)cfg_default(CFG_CURRENT_RSSI);
+ sta->allow_tpc_from_ap = cfg_get(psoc, CFG_TX_POWER_CTRL);
}
static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_sta.h b/components/mlme/dispatcher/inc/cfg_mlme_sta.h
index 2fc1d1b8a5..5bb9eb3531 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_sta.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_sta.h
@@ -375,6 +375,28 @@
CFG_VALUE_OR_DEFAULT, \
"Current RSSI")
+/*
+ *
+ * gAllowTPCfromAP - Support for AP power constraint
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini controls driver to honor/dishonor power constraint from AP.
+ *
+ * Related: None.
+ *
+ * Supported Feature: Concurrency
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+#define CFG_TX_POWER_CTRL CFG_INI_BOOL( \
+ "gAllowTPCfromAP", \
+ 1, \
+ "Support for AP power constraint")
+
#define CFG_STA_ALL \
CFG(CFG_INFRA_STA_KEEP_ALIVE_PERIOD) \
CFG(CFG_TGT_GTX_USR_CFG) \
@@ -390,6 +412,7 @@
CFG(CFG_FORCE_RSNE_OVERRIDE) \
CFG(CFG_SINGLE_TID_RC) \
CFG(CFG_WT_CNF_TIMEOUT) \
- CFG(CFG_CURRENT_RSSI)
+ CFG(CFG_CURRENT_RSSI) \
+ CFG(CFG_TX_POWER_CTRL)
#endif /* CFG_MLME_STA_H__ */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index 161f6ae2ac..05e11af92d 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -1020,6 +1020,7 @@ struct wlan_mlme_nss_chains {
* @qcn_ie_support: QCN IE support
* @force_rsne_override: Force rsnie override from user
* @single_tid: Set replay counter for all TID
+ * @allow_tpc_from_ap: Support for AP power constraint
*/
struct wlan_mlme_sta_cfg {
uint32_t sta_keep_alive_period;
@@ -1037,6 +1038,7 @@ struct wlan_mlme_sta_cfg {
bool qcn_ie_support;
bool force_rsne_override;
bool single_tid;
+ bool allow_tpc_from_ap;
};
/*
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index d6f6bc3a8d..b6603d580a 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -2407,29 +2407,6 @@ enum hdd_dot11_mode {
/* Not to use CFG default because if no registry setting, this is ignored by SME. */
#define CFG_MAX_TX_POWER_DEFAULT WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX
-/*
- *
- * gAllowTPCfromAP - Support for AP power constraint
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini controls driver to honor/dishonor power constraint from AP.
- *
- * Related: None.
- *
- * Supported Feature: Concurrency
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_TX_POWER_CTRL_NAME "gAllowTPCfromAP"
-#define CFG_TX_POWER_CTRL_DEFAULT (1)
-#define CFG_TX_POWER_CTRL_MIN (0)
-#define CFG_TX_POWER_CTRL_MAX (1)
-
/*
*
* gFWMccRtsCtsProtection - RTS-CTS protection in MCC.
@@ -5929,7 +5906,6 @@ struct hdd_config {
bool apProtEnabled;
enum station_keepalive_method sta_keepalive_method;
uint8_t nTxPowerCap; /* In dBm */
- bool allow_tpc_from_ap;
uint8_t disablePacketFilter;
bool fRrmEnable;
uint16_t nRrmRandnIntvl;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 2b8b95319f..6765daceb8 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -597,13 +597,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_MAX_TX_POWER_MIN,
CFG_MAX_TX_POWER_MAX),
- REG_VARIABLE(CFG_TX_POWER_CTRL_NAME, WLAN_PARAM_Integer,
- struct hdd_config, allow_tpc_from_ap,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_TX_POWER_CTRL_DEFAULT,
- CFG_TX_POWER_CTRL_MIN,
- CFG_TX_POWER_CTRL_MAX),
-
REG_VARIABLE(CFG_FW_MCC_RTS_CTS_PROT_NAME, WLAN_PARAM_Integer,
struct hdd_config, mcc_rts_cts_prot_enable,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -3744,7 +3737,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
smeConfig->csrConfig.HeartbeatThresh50 = 40;
smeConfig->csrConfig.Is11hSupportEnabled = pConfig->Is11hSupportEnabled;
smeConfig->csrConfig.nTxPowerCap = pConfig->nTxPowerCap;
- smeConfig->csrConfig.allow_tpc_from_ap = pConfig->allow_tpc_from_ap;
smeConfig->csrConfig.fEnableDFSChnlScan = pConfig->enableDFSChnlScan;
smeConfig->csrConfig.nRoamPrefer5GHz = pConfig->nRoamPrefer5GHz;
smeConfig->csrConfig.nRoamIntraBand = pConfig->nRoamIntraBand;
diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c
index 19b315a191..1e2f1ac5de 100644
--- a/core/mac/src/pe/lim/lim_prop_exts_utils.c
+++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c
@@ -384,7 +384,7 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
if (beacon_struct->wmeEdcaPresent)
*uapsd = beacon_struct->edcaParams.qosInfo.uapsd;
- if (mac_ctx->roam.configParam.allow_tpc_from_ap) {
+ if (mac_ctx->mlme_cfg->sta.allow_tpc_from_ap) {
if (beacon_struct->powerConstraintPresent) {
*local_constraint -=
beacon_struct->localPowerConstraint.
diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c
index e9a040f6cf..fbb2d684a6 100644
--- a/core/mac/src/pe/sch/sch_beacon_process.c
+++ b/core/mac/src/pe/sch/sch_beacon_process.c
@@ -863,7 +863,7 @@ static void __sch_beacon_process_for_session(tpAniSirGlobal mac_ctx,
local_constraint = regMax;
- if (mac_ctx->roam.configParam.allow_tpc_from_ap) {
+ if (mac_ctx->mlme_cfg->sta.allow_tpc_from_ap) {
get_local_power_constraint_beacon(bcn, &local_constraint);
pe_debug("ESE localPowerConstraint = %d,",
local_constraint);
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index df5e94a8e8..ace6cc7097 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1093,7 +1093,6 @@ typedef struct tagCsrConfigParam {
* default setting.
*/
uint8_t nTxPowerCap;
- bool allow_tpc_from_ap;
/* stats request frequency from PE while in full power */
uint32_t statsReqPeriodicity;
/* stats request frequency from PE while in power save */
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 36a08f295e..7c4dc4ae3b 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -448,7 +448,6 @@ struct csr_config {
* value & 11d. If 11d is disable, the lesser of this & default setting.
*/
uint8_t nTxPowerCap;
- bool allow_tpc_from_ap;
uint32_t statsReqPeriodicity; /* stats req freq while in fullpower */
uint32_t statsReqPeriodicityInPS;/* stats req freq while in powersave */
uint32_t dtimPeriod;
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 3f6994ff09..7011e38714 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -1691,7 +1691,6 @@ static void init_config_param(tpAniSirGlobal mac)
mac->roam.configParam.min_rest_time_conc = CSR_MIN_REST_TIME_CONC;
mac->roam.configParam.idle_time_conc = CSR_IDLE_TIME_CONC;
mac->roam.configParam.nTxPowerCap = CSR_MAX_TX_POWER;
- mac->roam.configParam.allow_tpc_from_ap = true;
mac->roam.configParam.statsReqPeriodicity =
CSR_MIN_GLOBAL_STAT_QUERY_PERIOD;
mac->roam.configParam.statsReqPeriodicityInPS =
@@ -2637,8 +2636,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal mac,
pParam->statsReqPeriodicityInPS;
/* Assign this before calling csr_init11d_info */
mac->roam.configParam.nTxPowerCap = pParam->nTxPowerCap;
- mac->roam.configParam.allow_tpc_from_ap =
- pParam->allow_tpc_from_ap;
if (wlan_reg_11d_enabled_on_host(mac->psoc))
status = csr_init11d_info(mac, &pParam->Csr11dinfo);
else
@@ -2911,7 +2908,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal mac, tCsrConfigParam *pParam)
pParam->nScanResultAgeCount = cfg_params->agingCount;
pParam->bCatRssiOffset = cfg_params->bCatRssiOffset;
pParam->nTxPowerCap = cfg_params->nTxPowerCap;
- pParam->allow_tpc_from_ap = cfg_params->allow_tpc_from_ap;
pParam->statsReqPeriodicity = cfg_params->statsReqPeriodicity;
pParam->statsReqPeriodicityInPS = cfg_params->statsReqPeriodicityInPS;
pParam->fEnableDFSChnlScan = mac->scan.fEnableDFSChnlScan;