From 3dfb1cbdc2985cc24db8406a9deaf09ffbd35829 Mon Sep 17 00:00:00 2001 From: "Padma, Santhosh Kumar" Date: Wed, 18 Jun 2014 18:49:14 +0530 Subject: qcacld: Fix duplicate channel in RRM response When non-connected AP moves from lower channel to higher channel, BSSID information of that AP is sent in both old and new channels in RRM response which is a spec violation. This is seen when RRM request is made with active scan mode. Driver uses scan cache to send results as part of RRM response. In scan cache, old entry is not removed by the time RRM is requested after AP has moved into new channel and hence duplicate info is seen in both channels. Fix this by comparing with fresh scan results. Change-Id: I7183ee7e8ec318078a1fc6d7d0c6c5362d5cf498 CRs-Fixed: 676619 --- CORE/SME/src/csr/csrApiScan.c | 2 +- CORE/SME/src/rrm/sme_rrm.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index 0711ed662621..b14f8e1be55c 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -2325,7 +2325,7 @@ eHalStatus csrScanGetResult(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter, pResult->mcEncryptionType = mc; pResult->authType = auth; pResult->Result.ssId = pBssDesc->Result.ssId; - pResult->Result.timer = 0; + pResult->Result.timer = pBssDesc->Result.timer; //save the pIes for later use pResult->Result.pvIes = pNewIes; //save bss description diff --git a/CORE/SME/src/rrm/sme_rrm.c b/CORE/SME/src/rrm/sme_rrm.c index e09e07b9fb08..073c8b5e1b42 100644 --- a/CORE/SME/src/rrm/sme_rrm.c +++ b/CORE/SME/src/rrm/sme_rrm.c @@ -75,6 +75,9 @@ #ifdef FEATURE_WLAN_ESE #define RRM_ROAM_SCORE_NEIGHBOR_IAPP_LIST 30 #endif + +v_TIME_t RRM_scan_timer; + /**--------------------------------------------------------------------------- \brief rrmLLPurgeNeighborCache() - @@ -582,7 +585,10 @@ static eHalStatus sme_RrmSendScanResult( tpAniSirGlobal pMac, while (pScanResult) { pNextResult = sme_ScanResultGetNext(pMac, pResult); - pScanResultsArr[counter++] = pScanResult; + if(pScanResult->timer >= RRM_scan_timer) + { + pScanResultsArr[counter++] = pScanResult; + } pScanResult = pNextResult; //sme_ScanResultGetNext(hHal, pResult); if (counter >= SIR_BCN_REPORT_MAX_BSS_DESC) break; @@ -754,6 +760,8 @@ eHalStatus sme_RrmIssueScanReq( tpAniSirGlobal pMac ) smsLog( pMac, LOG1, "Scan Type(%d) Max Dwell Time(%d)", scanRequest.scanType, scanRequest.maxChnTime ); + RRM_scan_timer = vos_timer_get_system_time(); + #if defined WLAN_VOWIFI_DEBUG smsLog( pMac, LOGE, "For Duration %d ", scanRequest.maxChnTime ); #endif @@ -784,6 +792,12 @@ eHalStatus sme_RrmIssueScanReq( tpAniSirGlobal pMac ) } else if (eSIR_BEACON_TABLE == scanType) /* beacon table */ { + /*In beacon table mode, scan results are taken directly from scan cache + without issuing any scan request. So, it is not proper to update + RRM_scan_timer with latest time and hence made it to zero to satisfy + pScanResult->timer >= RRM_scan_timer */ + RRM_scan_timer = 0; + if ((pSmeRrmContext->currentIndex + 1) < pSmeRrmContext->channelList.numOfChannels) { sme_RrmSendScanResult( pMac, 1, &pSmeRrmContext->channelList.ChannelList[pSmeRrmContext->currentIndex], false ); -- cgit v1.2.3