From f07623b1ebc3e0b20c20bb52f048e29546bca726 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Wed, 23 Jul 2014 18:20:55 -0700 Subject: qcacld: Do not start refresh scan timer in case of LFR2.0 Avoid starting refresh scan timer when not ready to roam in case of LFR2.0 Change-Id: I9b55c8f70d1ce1a823914bb28472d037faba13da CRs-Fixed: 699426 --- CORE/SME/src/csr/csrNeighborRoam.c | 73 ++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c index f36959028610..1d1cfac5298a 100644 --- a/CORE/SME/src/csr/csrNeighborRoam.c +++ b/CORE/SME/src/csr/csrNeighborRoam.c @@ -2601,42 +2601,61 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac, return eHAL_STATUS_SUCCESS; } - hstatus = vos_timer_start(&pNeighborRoamInfo->neighborResultsRefreshTimer, +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + if (!csrRoamIsRoamOffloadScanEnabled(pMac)) + { +#endif + hstatus = vos_timer_start( + &pNeighborRoamInfo->neighborResultsRefreshTimer, pNeighborRoamInfo->cfgParams.neighborResultsRefreshPeriod); - /* This timer should be started before registering the Reassoc callback with TL. This is because, it is very likely - * that the callback getting called immediately and the timer would never be stopped when pre-auth is in progress */ - if( hstatus != eHAL_STATUS_SUCCESS) - { - smsLog(pMac, LOGE, FL("Neighbor results refresh timer failed to start, status = %d"), hstatus); - vos_mem_free(pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList); - pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList = NULL; - pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels = 0; - return eHAL_STATUS_FAILURE; - } + /* This timer should be started before registering the Reassoc + * callback with TL. This is because, it is very likely that the + * callback getting called immediately and the timer would never + * be stopped when pre-auth is in progress */ + if (hstatus != eHAL_STATUS_SUCCESS) + { + smsLog(pMac, LOGE, FL( + "Neighbor results refresh timer failed to start, status = %d"), + hstatus); + vos_mem_free( + pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList); + pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList = + NULL; + pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels = + 0; + return eHAL_STATUS_FAILURE; + } - NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL("Registering DOWN event Reassoc callback with TL. RSSI = %d"), pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1)); - pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx)); - if (NULL == pUsrCtx) { - smsLog(pMac, LOGE, FL("Allocation failed for pUsrCtx")); - return eHAL_STATUS_FAILURE; - } + NEIGHBOR_ROAM_DEBUG(pMac, LOG2, FL( + "Registering DOWN event Reassoc callback with TL. RSSI = %d"), + pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1)); + pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx)); + if (NULL == pUsrCtx) { + smsLog(pMac, LOGE, FL("Allocation failed for pUsrCtx")); + return eHAL_STATUS_FAILURE; + } - pUsrCtx->pMac = pMac; - pUsrCtx->sessionId = sessionId; - /* Register a reassoc Indication callback */ - vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext, - (v_S7_t)pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1), + pUsrCtx->pMac = pMac; + pUsrCtx->sessionId = sessionId; + /* Register a reassoc Indication callback */ + vosStatus = WLANTL_RegRSSIIndicationCB(pMac->roam.gVosContext, + (v_S7_t)pNeighborRoamInfo->cfgParams.neighborReassocThreshold * (-1), WLANTL_HO_THRESHOLD_DOWN, csrNeighborRoamReassocIndCallback, VOS_MODULE_ID_SME, pUsrCtx); - if (!VOS_IS_STATUS_SUCCESS(vosStatus)) - { - //err msg - smsLog(pMac, LOGW, FL(" Couldn't register csrNeighborRoamReassocIndCallback with TL: Status = %d"), vosStatus); - vos_mem_free(pUsrCtx); + if (!VOS_IS_STATUS_SUCCESS(vosStatus)) + { + //err msg + smsLog(pMac, LOGW, FL( + "Couldn't register with TL: Status = %d"), + vosStatus); + vos_mem_free(pUsrCtx); + } +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD } +#endif } #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD -- cgit v1.2.3