From 4d1dd6e78ca97c1bd24a37a8205dd70dcffd1938 Mon Sep 17 00:00:00 2001 From: Lincoln Tran Date: Fri, 30 Apr 2021 11:28:43 -0700 Subject: [PATCH] qcacld-3.0: Add path to skip TPE IE in TX power calc When calculating the TX power, add a path to not consider the TPE IE values in case of 2G/5G bands. If device is operating in 6G band, include the TPE IE regardless of INI configuration. Change-Id: If829318319e9b799c75a59ce3beed39bae5bffa2 CRs-fixed: 2936487 --- core/mac/src/pe/lim/lim_process_sme_req_messages.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 fcfccbf9377e..642089b638bc 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 @@ -1970,6 +1970,7 @@ void lim_calculate_tpc(struct mac_context *mac, struct ch_params ch_params; struct vdev_mlme_obj *mlme_obj; uint8_t tpe_power; + bool skip_tpe = false; if (!session->lim_join_req) { pe_err("Join Request is NULL"); @@ -1997,6 +1998,7 @@ void lim_calculate_tpc(struct mac_context *mac, if (!wlan_reg_is_6ghz_chan_freq(oper_freq)) { reg_max = wlan_reg_get_channel_reg_power_for_freq(mac->pdev, oper_freq); + skip_tpe = wlan_mlme_skip_tpe(mac->psoc); } else { is_6ghz_freq = true; is_psd_power = wlan_reg_is_6g_psd_power(mac->pdev); @@ -2076,7 +2078,7 @@ void lim_calculate_tpc(struct mac_context *mac, max_tx_power = reg_max - local_constraint; } /* If TPE is present */ - if (is_tpe_present) { + if (is_tpe_present && !skip_tpe) { if (!is_psd_power && mlme_obj->reg_tpc_obj.eirp_power) tpe_power = mlme_obj->reg_tpc_obj.eirp_power; else