From a90af11d6f749f1d4417db2e702a3f2425ff287b Mon Sep 17 00:00:00 2001 From: Lincoln Tran Date: Tue, 9 Mar 2021 15:55:43 -0800 Subject: [PATCH] qcacld-3.0: Fix max TX pwr count in PSD case The calculation to find the number of fields from the maximum transmit power count is incorrect. Fix the calculation so the correct number of values are sent to FW. Change-Id: I274cc12df49f9eb619ef50aaef0ce1bd85e8d667 CRs-fixed: 2894809 --- core/mac/src/pe/lim/lim_process_sme_req_messages.c | 5 ++++- 1 file changed, 4 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 0a51913995cf..f85f5b6c2288 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 @@ -1683,7 +1683,7 @@ static uint8_t lim_get_num_tpe_octets(uint8_t max_transmit_power_count) if (!max_transmit_power_count) return max_transmit_power_count; - return 1 << (max_transmit_power_count); + return 1 << (max_transmit_power_count - 1); } void lim_parse_tpe_ie(struct mac_context *mac, struct pe_session *session, @@ -2076,6 +2076,9 @@ void lim_calculate_tpc(struct mac_context *mac, mlme_obj->reg_tpc_obj.is_psd_power = is_psd_power; mlme_obj->reg_tpc_obj.eirp_power = eirp_power; mlme_obj->reg_tpc_obj.power_type_6g = ap_power_type_6g; + + pe_debug("num_pwr_levels: %d, is_psd_power: %d, eirp_power: %d, ap_pwr_type: %d", + num_pwr_levels, is_psd_power, eirp_power, ap_power_type_6g); } /**