From bd9a47e43d6b2dad5b31f7505b705b3bca9713a4 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Mon, 16 Apr 2018 16:10:47 +0530 Subject: [PATCH] qcacld-3.0: Send appropriate value of Tx power in TPC report TPC IE, transmit power value reports zero in beacon when operating as P2P-GO or SAP. Fix is to populate appropriate value of tx power in TPC report. Change-Id: Iae52d7bb6a94d167a6bc6f981d62be6f7c12e0c1 CRs-Fixed: 2224187 --- core/mac/src/sys/legacy/src/utils/src/parser_api.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index baa1bd3b854e..0f3c1afdc0f9 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -1827,7 +1827,8 @@ tSirRetStatus populate_dot11f_tpc_report(tpAniSirGlobal pMac, tDot11fIETPCReport *pDot11f, tpPESession psessionEntry) { - uint16_t staid, txPower; + uint16_t staid; + uint8_t tx_power; tSirRetStatus nSirStatus; nSirStatus = lim_get_mgmt_staid(pMac, &staid, psessionEntry); @@ -1838,8 +1839,9 @@ populate_dot11f_tpc_report(tpAniSirGlobal pMac, } /* FramesToDo: This function was "misplaced" in the move to Gen4_TVM... */ /* txPower = halGetRateToPwrValue( pMac, staid, pMac->lim.gLimCurrentChannelId, isBeacon ); */ - txPower = 0; - pDot11f->tx_power = (uint8_t) txPower; + tx_power = cfg_get_regulatory_max_transmit_power(pMac, + psessionEntry->currentOperChannel); + pDot11f->tx_power = tx_power; pDot11f->link_margin = 0; pDot11f->present = 1;