summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHema Aparna Medicharla <haparna@qti.qualcomm.com>2013-10-22 20:00:51 +0530
committerMadan Mohan Koyyalamudi <mkoyyala@qca.qualcomm.com>2013-11-14 19:23:12 -0800
commitc9110e8bc5b42c8cc437ecdcb7c790ffba350995 (patch)
tree68720562775f5f912259b15718a958290322c030
parenta2c74fa65009e492195bed885bf727182d6a4d78 (diff)
cld : rrm : Incorrect Tx power values in Measurement report
STA is sending negative Tx power values in the Measurement report with different configuration of Nth beacon filter. Changes are made to send correct power value in measurement report in STA mode. Change-Id: Ic231a9d51472dfa19f442839293f1621c89b462d CRs-fixed: 564721
-rw-r--r--CORE/MAC/src/pe/rrm/rrmApi.c62
1 files changed, 53 insertions, 9 deletions
diff --git a/CORE/MAC/src/pe/rrm/rrmApi.c b/CORE/MAC/src/pe/rrm/rrmApi.c
index 0028cb5a8268..a7312be23809 100644
--- a/CORE/MAC/src/pe/rrm/rrmApi.c
+++ b/CORE/MAC/src/pe/rrm/rrmApi.c
@@ -253,7 +253,7 @@ rrmProcessLinkMeasurementRequest( tpAniSirGlobal pMac,
v_S7_t currentRSSI = 0;
#if defined WLAN_VOWIFI_DEBUG
- PELOGE(limLog( pMac, LOGE, "Received Link measurement request");)
+ PELOG1(limLog( pMac, LOG1, "Received Link measurement request");)
#endif
if( pRxPacketInfo == NULL || pLinkReq == NULL || pSessionEntry == NULL )
{
@@ -261,22 +261,66 @@ rrmProcessLinkMeasurementRequest( tpAniSirGlobal pMac,
return eSIR_FAILURE;
}
pHdr = WDA_GET_RX_MAC_HEADER( pRxPacketInfo );
-#if defined WLAN_VOWIFI_DEBUG
- if( pSessionEntry->maxTxPower != (tPowerdBm) pLinkReq->MaxTxPower.maxTxPower )
+ if( (uint8)(pSessionEntry->maxTxPower) != pLinkReq->MaxTxPower.maxTxPower )
+ {
+ PELOGW(limLog( pMac,
+ LOGW,
+ FL(" maxTx power in link request is not same as local... "
+ " Local = %d LinkReq = %d"),
+ pSessionEntry->maxTxPower,
+ pLinkReq->MaxTxPower.maxTxPower );)
+ if( (MIN_STA_PWR_CAP_DBM <= pLinkReq->MaxTxPower.maxTxPower) &&
+ (MAX_STA_PWR_CAP_DBM >= pLinkReq->MaxTxPower.maxTxPower) )
+ {
+ LinkReport.txPower = pLinkReq->MaxTxPower.maxTxPower;
+ }
+ else if( MIN_STA_PWR_CAP_DBM > pLinkReq->MaxTxPower.maxTxPower )
+ {
+ LinkReport.txPower = MIN_STA_PWR_CAP_DBM;
+ }
+ else if( MAX_STA_PWR_CAP_DBM < pLinkReq->MaxTxPower.maxTxPower )
+ {
+ LinkReport.txPower = MAX_STA_PWR_CAP_DBM;
+ }
+
+ if( (LinkReport.txPower != (uint8)(pSessionEntry->maxTxPower)) &&
+ (eSIR_SUCCESS == rrmSendSetMaxTxPowerReq ( pMac,
+ (tPowerdBm)(LinkReport.txPower),
+ pSessionEntry)) )
+ {
+ pSessionEntry->maxTxPower = (tPowerdBm)(LinkReport.txPower);
+ }
+ }
+ else
{
- PELOGE(limLog( pMac, LOGE, FL(" maxTx power in link request is not same as local...Local = %d LinkReq = %d"),
- pSessionEntry->maxTxPower, pLinkReq->MaxTxPower.maxTxPower );)
+ if( (MIN_STA_PWR_CAP_DBM <= (uint8)(pSessionEntry->maxTxPower)) &&
+ (MAX_STA_PWR_CAP_DBM >= (uint8)(pSessionEntry->maxTxPower)) )
+ {
+ LinkReport.txPower = (uint8)(pSessionEntry->maxTxPower);
+ }
+ else if( MIN_STA_PWR_CAP_DBM > (uint8)(pSessionEntry->maxTxPower) )
+ {
+ LinkReport.txPower = MIN_STA_PWR_CAP_DBM;
+ }
+ else if( MAX_STA_PWR_CAP_DBM < (uint8)(pSessionEntry->maxTxPower) )
+ {
+ LinkReport.txPower = MAX_STA_PWR_CAP_DBM;
+ }
}
-#endif
+ PELOGW(limLog( pMac,
+ LOGW,
+ FL(" maxTx power in link request is not same as local... "
+ " Local = %d Link Report TxPower = %d"),
+ pSessionEntry->maxTxPower,
+ LinkReport.txPower );)
LinkReport.dialogToken = pLinkReq->DialogToken.token;
- LinkReport.txPower = pSessionEntry->txMgmtPower;
LinkReport.rxAntenna = 0;
LinkReport.txAntenna = 0;
currentRSSI = WDA_GET_RX_RSSI_DB(pRxPacketInfo);
#if defined WLAN_VOWIFI_DEBUG
- PELOGE(limLog( pMac, LOGE, "Received Link report frame with %d", currentRSSI);)
+ PELOG1(limLog( pMac, LOG1, "Received Link report frame with %d", currentRSSI);)
#endif
// 2008 11k spec reference: 18.4.8.5 RCPI Measurement
@@ -290,7 +334,7 @@ rrmProcessLinkMeasurementRequest( tpAniSirGlobal pMac,
LinkReport.rsni = WDA_GET_RX_SNR(pRxPacketInfo);
#if defined WLAN_VOWIFI_DEBUG
- PELOGE(limLog( pMac, LOGE, "Sending Link report frame");)
+ PELOG1(limLog( pMac, LOG1, "Sending Link report frame");)
#endif
return limSendLinkReportActionFrame( pMac, &LinkReport, pHdr->sa, pSessionEntry );