Эх сурвалжийг харах

qcacld-3.0: Use HW power limit to cap RRM link tx power

During Radio Measurement request, if the TPC  power exceeds
power limit set by hardware, use this limit to cap the tx
power sent in the link measurement report.

Change-Id: Ib169c767d14160f8994a845a00baead7f8e6c3e1
CRs-Fixed: 3452913
Gururaj Pandurangi 2 жил өмнө
parent
commit
77474a3d1d

+ 11 - 0
core/mac/src/pe/rrm/rrm_api.c

@@ -281,6 +281,17 @@ rrm_process_link_measurement_request(struct mac_context *mac,
 
 		LinkReport.txPower =
 			mlme_obj->reg_tpc_obj.chan_power_info[0].tx_power;
+		/** If hardware limit received from FW is non zero, use it
+		 * to limit the link tx power.
+		 */
+		if (mlme_obj->mgmt.generic.tx_pwrlimit) {
+			LinkReport.txPower =
+				QDF_MIN(LinkReport.txPower,
+					mlme_obj->mgmt.generic.tx_pwrlimit);
+			pe_debug("HW power limit: %d, Link tx power: %d",
+				 mlme_obj->mgmt.generic.tx_pwrlimit,
+				 LinkReport.txPower);
+		}
 		if (LinkReport.txPower < MIN_TX_PWR_CAP)
 			LinkReport.txPower = MIN_TX_PWR_CAP;
 		else if (LinkReport.txPower > MAX_TX_PWR_CAP)