diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index c31aab5437ae..21c14950095e 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -1760,7 +1760,6 @@ static void mlme_init_power_cfg(struct wlan_objmgr_psoc *psoc,
power->power_usage.len = CFG_POWER_USAGE_MAX_LEN;
qdf_mem_copy(power->power_usage.data, cfg_get(psoc, CFG_POWER_USAGE),
power->power_usage.len);
- power->max_tx_power = cfg_get(psoc, CFG_MAX_TX_POWER);
power->current_tx_power_level =
(uint8_t)cfg_default(CFG_CURRENT_TX_POWER_LEVEL);
power->local_power_constraint =
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_power.h b/components/mlme/dispatcher/inc/cfg_mlme_power.h
index 81763ef8bc41..24938867aa3b 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_power.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_power.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -116,31 +116,6 @@
CFG_VALUE_OR_DEFAULT, \
"power limit 5g")
-/*
- *
- * gTxPowerCap - WLAN max tx power
- * @Min: 0
- * @Max: 128
- * @Default: 128
- *
- * This ini is used to configure the device max tx power.
- *
- * Related: None.
- *
- * Supported Feature: Concurrency
- *
- * Usage: Internal/External
- *
- *
- */
-#define CFG_MAX_TX_POWER CFG_INI_UINT( \
- "gTxPowerCap", \
- 0, \
- 128, \
- 128, \
- CFG_VALUE_OR_DEFAULT, \
- "WLAN max tx power")
-
/*
*
* current_tx_power_level - current tx power level
@@ -177,7 +152,6 @@
CFG(CFG_POWER_USAGE) \
CFG(CFG_SET_TXPOWER_LIMIT2G) \
CFG(CFG_SET_TXPOWER_LIMIT5G) \
- CFG(CFG_MAX_TX_POWER) \
CFG(CFG_CURRENT_TX_POWER_LEVEL) \
CFG(CFG_LOCAL_POWER_CONSTRAINT)
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index ab858ae9f20b..00078eb23391 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -1980,7 +1980,6 @@ struct mlme_power_usage {
* @power_usage: power usage mode, min, max, mod
* @tx_power_2g: limit tx power in 2.4 ghz
* @tx_power_5g: limit tx power in 5 ghz
- * @max_tx_power: WLAN max tx power
* @current_tx_power_level: current tx power level
* @local_power_constraint: local power constraint
*/
@@ -1992,7 +1991,6 @@ struct wlan_mlme_power {
struct mlme_power_usage power_usage;
uint8_t tx_power_2g;
uint8_t tx_power_5g;
- uint8_t max_tx_power;
uint8_t current_tx_power_level;
uint8_t local_power_constraint;
};
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c
index fbfc6b821f67..aadfccba0ba9 100644
--- a/core/mac/src/pe/lim/lim_ft.c
+++ b/core/mac/src/pe/lim/lim_ft.c
@@ -643,7 +643,6 @@ void lim_fill_ft_session(struct mac_context *mac,
tx_pwr_attr.reg_max = regMax;
tx_pwr_attr.ap_tx_power = localPowerConstraint;
- tx_pwr_attr.ini_tx_power = mac->mlme_cfg->power.max_tx_power;
tx_pwr_attr.frequency = ft_session->curr_op_freq;
#ifdef FEATURE_WLAN_ESE
@@ -652,10 +651,8 @@ void lim_fill_ft_session(struct mac_context *mac,
ft_session->maxTxPower = QDF_MIN(regMax, (localPowerConstraint));
#endif
- pe_debug("Reg max: %d local pwr: %d, ini tx pwr: %d max tx pwr: %d",
- regMax, localPowerConstraint,
- mac->mlme_cfg->power.max_tx_power,
- ft_session->maxTxPower);
+ pe_debug("Reg max: %d local pwr: %d, max tx pwr: %d", regMax,
+ localPowerConstraint, ft_session->maxTxPower);
if (!lim_is_roam_synch_in_progress(pe_session)) {
ft_session->limPrevSmeState = ft_session->limSmeState;
ft_session->limSmeState = eLIM_SME_WT_REASSOC_STATE;
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index c919ebe8176e..bd6ebfcd7a2a 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -1550,8 +1550,6 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
tx_pwr_attr.reg_max = reg_max;
tx_pwr_attr.ap_tx_power = local_power_constraint;
- tx_pwr_attr.ini_tx_power =
- mac_ctx->mlme_cfg->power.max_tx_power;
tx_pwr_attr.frequency = session->curr_op_freq;
session->maxTxPower = lim_get_max_tx_power(mac_ctx,
@@ -1677,7 +1675,6 @@ uint8_t lim_get_max_tx_power(struct mac_context *mac,
return attr->reg_max;
tx_power = QDF_MIN(attr->reg_max, attr->ap_tx_power);
- tx_power = QDF_MIN(tx_power, attr->ini_tx_power);
if (tx_power >= MIN_TX_PWR_CAP && tx_power <= MAX_TX_PWR_CAP)
max_tx_power = tx_power;
diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h
index 6db9a01265d6..7b25db0259ca 100644
--- a/core/mac/src/pe/lim/lim_utils.h
+++ b/core/mac/src/pe/lim/lim_utils.h
@@ -123,13 +123,11 @@ typedef struct last_processed_frame {
* struct lim_max_tx_pwr_attr - List of tx powers from various sources
* @reg_max: power from regulatory database
* @ap_tx_power: local power constraint adjusted value
- * @ini_tx_power: Max tx power from ini config
* @frequency: current operating frequency for which above powers are defined
*/
struct lim_max_tx_pwr_attr {
int8_t reg_max;
int8_t ap_tx_power;
- uint8_t ini_tx_power;
uint32_t frequency;
};
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c
index ec412ec91a41..9735aaa13bcd 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -240,7 +240,6 @@ rrm_process_link_measurement_request(struct mac_context *mac,
tx_pwr_attr.reg_max = pe_session->def_max_tx_pwr;
tx_pwr_attr.ap_tx_power = pLinkReq->MaxTxPower.maxTxPower;
- tx_pwr_attr.ini_tx_power = mac->mlme_cfg->power.max_tx_power;
LinkReport.txPower = lim_get_max_tx_power(mac, &tx_pwr_attr);
diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c
index fe0f38b90d1b..2772cb6dc5f0 100644
--- a/core/mac/src/pe/sch/sch_beacon_process.c
+++ b/core/mac/src/pe/sch/sch_beacon_process.c
@@ -872,7 +872,6 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx,
tx_pwr_attr.reg_max = regMax;
tx_pwr_attr.ap_tx_power = local_constraint;
- tx_pwr_attr.ini_tx_power = mac_ctx->mlme_cfg->power.max_tx_power;
tx_pwr_attr.frequency = session->curr_op_freq;
maxTxPower = lim_get_max_tx_power(mac_ctx, &tx_pwr_attr);
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 77bb149006fa..2b27ed91fd7e 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -3302,8 +3302,7 @@ static QDF_STATUS csr_init11d_info(struct mac_context *mac, tCsr11dinfo *ps11din
pChanInfo->numChannels =
ps11dinfo->ChnPower[index].numChannels;
pChanInfo->maxTxPower =
- QDF_MIN(ps11dinfo->ChnPower[index].maxtxPower,
- mac->mlme_cfg->power.max_tx_power);
+ ps11dinfo->ChnPower[index].maxtxPower;
pChanInfo++;
count++;
}
@@ -3364,8 +3363,7 @@ QDF_STATUS csr_init_channel_power_list(struct mac_context *mac,
pChanInfo->numChannels =
ps11dinfo->ChnPower[index].numChannels;
pChanInfo->maxTxPower =
- QDF_MIN(ps11dinfo->ChnPower[index].maxtxPower,
- mac->mlme_cfg->power.max_tx_power);
+ ps11dinfo->ChnPower[index].maxtxPower;
pChanInfo++;
count++;
}
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index 6ed134b39d6b..f5c6bbef6449 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/core/sme/src/csr/csr_api_scan.c
@@ -528,8 +528,7 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(struct mac_context *mac,
qdf_mem_free(pChannelSet);
return QDF_STATUS_E_FAILURE;
}
- pChannelSet->txPower = QDF_MIN(pChannelInfo->maxTxPower,
- mac->mlme_cfg->power.max_tx_power);
+ pChannelSet->txPower = pChannelInfo->maxTxPower;
if (f2GHzInfoFound) {
if (!f2GListPurged) {
/* purge previous results if found new */
@@ -634,9 +633,8 @@ static void csr_diag_reset_country_information(struct mac_context *mac)
Index++) {
p11dLog->Channels[Index] =
wlan_reg_freq_to_chan(mac->pdev, mac->scan.base_channels.channel_freq_list[Index]);
- p11dLog->TxPwr[Index] = QDF_MIN(
- mac->scan.defaultPowerTable[Index].tx_power,
- mac->mlme_cfg->power.max_tx_power);
+ p11dLog->TxPwr[Index] =
+ mac->scan.defaultPowerTable[Index].tx_power;
}
}
if (!mac->mlme_cfg->gen.enabled_11d)
@@ -832,8 +830,7 @@ void csr_save_channel_power_for_band(struct mac_context *mac, bool fill_5f)
mac->scan.defaultPowerTable[idx].center_freq;
chan_info->numChannels = 1;
chan_info->maxTxPower =
- QDF_MIN(mac->scan.defaultPowerTable[idx].tx_power,
- mac->mlme_cfg->power.max_tx_power);
+ mac->scan.defaultPowerTable[idx].tx_power;
chan_info++;
count++;
}
@@ -1542,9 +1539,7 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
ch_pwr_set->first_freq =
ch_set->first_chan_freq;
ch_pwr_set->numChannels = 1;
- ch_pwr_set->maxTxPower =
- QDF_MIN(ch_set->txPower,
- mac->mlme_cfg->power.max_tx_power);
+ ch_pwr_set->maxTxPower = ch_set->txPower;
cbLen += sizeof(tSirMacChanInfo);
ch_pwr_set++;
count++;
@@ -1561,8 +1556,7 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
}
ch_pwr_set->first_freq = ch_set->first_chan_freq;
ch_pwr_set->numChannels = ch_set->numChannels;
- ch_pwr_set->maxTxPower = QDF_MIN(ch_set->txPower,
- mac->mlme_cfg->power.max_tx_power);
+ ch_pwr_set->maxTxPower = ch_set->txPower;
cbLen += sizeof(tSirMacChanInfo);
ch_pwr_set++;
count++;