瀏覽代碼

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
Lincoln Tran 4 年之前
父節點
當前提交
7164dae653
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      core/mac/src/pe/lim/lim_process_sme_req_messages.c

+ 4 - 1
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -3918,7 +3918,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,
@@ -4311,6 +4311,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);
 }
 
 /**