mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Fix Link tx power updation for RRM
Update Link tx power with TPC power calculated in lim_calculate_tpc everytime a radio measurement request is received. Change-Id: Ie564fd13b071f0265c2a5c80088d5550e07395b3 CRs-Fixed: 2938684
This commit is contained in:
parent
c4e3177ed0
commit
527074d526
1 changed files with 13 additions and 9 deletions
|
|
@ -250,6 +250,7 @@ rrm_process_link_measurement_request(struct mac_context *mac,
|
|||
int8_t currentRSSI = 0;
|
||||
struct vdev_mlme_obj *mlme_obj;
|
||||
struct wlan_lmac_if_reg_tx_ops *tx_ops;
|
||||
uint8_t ap_pwr_constraint = 0;
|
||||
|
||||
pe_debug("Received Link measurement request");
|
||||
|
||||
|
|
@ -266,17 +267,20 @@ rrm_process_link_measurement_request(struct mac_context *mac,
|
|||
}
|
||||
|
||||
if (wlan_reg_is_ext_tpc_supported(mac->psoc)) {
|
||||
if (pLinkReq->MaxTxPower.maxTxPower !=
|
||||
mlme_obj->reg_tpc_obj.ap_constraint_power) {
|
||||
ap_pwr_constraint = mlme_obj->reg_tpc_obj.ap_constraint_power;
|
||||
mlme_obj->reg_tpc_obj.ap_constraint_power =
|
||||
pLinkReq->MaxTxPower.maxTxPower;
|
||||
lim_calculate_tpc(mac, pe_session, true);
|
||||
|
||||
tx_ops = wlan_reg_get_tx_ops(mac->psoc);
|
||||
|
||||
mlme_obj->reg_tpc_obj.ap_constraint_power =
|
||||
pLinkReq->MaxTxPower.maxTxPower;
|
||||
lim_calculate_tpc(mac, pe_session, true);
|
||||
|
||||
LinkReport.txPower =
|
||||
LinkReport.txPower =
|
||||
mlme_obj->reg_tpc_obj.chan_power_info[0].tx_power;
|
||||
if (LinkReport.txPower < MIN_TX_PWR_CAP)
|
||||
LinkReport.txPower = MIN_TX_PWR_CAP;
|
||||
else if (LinkReport.txPower > MAX_TX_PWR_CAP)
|
||||
LinkReport.txPower = MAX_TX_PWR_CAP;
|
||||
|
||||
if (pLinkReq->MaxTxPower.maxTxPower != ap_pwr_constraint) {
|
||||
tx_ops = wlan_reg_get_tx_ops(mac->psoc);
|
||||
|
||||
if (tx_ops->set_tpc_power)
|
||||
tx_ops->set_tpc_power(mac->psoc,
|
||||
|
|
|
|||
Loading…
Reference in a new issue