Sfoglia il codice sorgente

qcacld-3.0: Update Link tx power for RRM scenario

Update Link tx power with TPC power calculated in lim for
RRM scenario. In the legacy case (old FW), Link tx power
was calculated using lim_get_max_tx_power where as for
new FW, we get the power value from lim_calculate_tpc.

Change-Id: Id97f0cad00572180e3436142df9cf95e6d270d12
CRs-Fixed: 2937763
Gururaj Pandurangi 3 anni fa
parent
commit
1e64e7f9c8
1 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 6 3
      core/mac/src/pe/rrm/rrm_api.c

+ 6 - 3
core/mac/src/pe/rrm/rrm_api.c

@@ -275,6 +275,9 @@ rrm_process_link_measurement_request(struct mac_context *mac,
 					pLinkReq->MaxTxPower.maxTxPower;
 			lim_calculate_tpc(mac, pe_session, true);
 
+			LinkReport.txPower =
+			mlme_obj->reg_tpc_obj.chan_power_info[0].tx_power;
+
 			if (tx_ops->set_tpc_power)
 				tx_ops->set_tpc_power(mac->psoc,
 						      pe_session->vdev_id,
@@ -302,12 +305,12 @@ rrm_process_link_measurement_request(struct mac_context *mac,
 			rrm_send_set_max_tx_power_req(mac, LinkReport.txPower,
 						      pe_session))) {
 			pe_warn("Local: %d", pe_session->maxTxPower);
-			pe_warn("Link Request TxPwr: %d Link Report TxPwr: %d",
-				LinkReport.txPower,
-				pLinkReq->MaxTxPower.maxTxPower);
 			pe_session->maxTxPower = LinkReport.txPower;
 		}
 	}
+	pe_warn("Link Request Tx Pwr: %d Link Report Tx Pwr: %d",
+		pLinkReq->MaxTxPower.maxTxPower, LinkReport.txPower);
+
 	LinkReport.dialogToken = pLinkReq->DialogToken.token;
 	LinkReport.rxAntenna = 0;
 	LinkReport.txAntenna = 0;