diff options
| author | Selvaraj, Sridhar <sselvara@qti.qualcomm.com> | 2016-04-22 17:18:07 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-05-04 19:27:01 +0530 |
| commit | 4c6f1e485f724f80c56b706ebabec222f2aa90ff (patch) | |
| tree | 1d5881611928398bf02ca8cda4cd9ba93346b2e4 | |
| parent | ca5977a93f42553da18a4e6638637bb577f706f7 (diff) | |
qcacld-2.0: Start the scan right away for RRM beacon requests
Currently all the scan requests going from the host to the
firmware pass a rest time to the firmware. The firmware
waits for the rest time before starting the scan. This is
not needed in the case of RRM beacon requests with single
channel request to make it more optimal.
Configure the rest times to minimum and start the scan
right after receiving the request
Change-Id: Ia5c5a1c2c765d13611b901742910325954ce3d8a
CRs-Fixed: 1010596
| -rw-r--r-- | CORE/SME/src/rrm/sme_rrm.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/CORE/SME/src/rrm/sme_rrm.c b/CORE/SME/src/rrm/sme_rrm.c index 1d10b10e6c19..9d696fc1d281 100644 --- a/CORE/SME/src/rrm/sme_rrm.c +++ b/CORE/SME/src/rrm/sme_rrm.c @@ -718,6 +718,7 @@ eHalStatus sme_RrmIssueScanReq( tpAniSirGlobal pMac ) tpRrmSMEContext pSmeRrmContext = &pMac->rrm.rrmSmeContext; tANI_U32 sessionId; tSirScanType scanType; + v_TIME_t current_time; status = csrRoamGetSessionIdFromBSSID( pMac, (tCsrBssid*)pSmeRrmContext->sessionBssId, &sessionId ); if( status != eHAL_STATUS_SUCCESS ) @@ -776,6 +777,25 @@ eHalStatus sme_RrmIssueScanReq( tpAniSirGlobal pMac ) smsLog( pMac, LOG1, "Scan Type(%d) Max Dwell Time(%d)", scanRequest.scanType, scanRequest.maxChnTime ); + /** + * For RRM scans timing is very important especially when the request + * is for limited channels. There is no need for firmware to rest for + * about 100-200 ms on the home channel. Instead, it can start the + * scan right away which will make the host to respond with the beacon + * report as quickly as possible. Ensure that the scan requests are + * not back to back and hence there is a check to see if the requests + * are atleast 1 second apart. + */ + current_time = vos_timer_get_system_time(); + smsLog(pMac, LOG1, "prev scan triggered before %ld ms, totalchannels %d", + current_time - RRM_scan_timer, + pSmeRrmContext->channelList.numOfChannels); + if ((abs(current_time - RRM_scan_timer) > 1000) && + (pSmeRrmContext->channelList.numOfChannels == 1)) { + scanRequest.restTime = 1; + scanRequest.min_rest_time = 1; + scanRequest.idle_time = 1; + } RRM_scan_timer = vos_timer_get_system_time(); |
