From f4705ac2e08c79476c6cd06b12a125462d43bdf9 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Thu, 15 Dec 2016 11:20:43 +0530 Subject: [PATCH] qcacld-2.0: Reset uOsRequestedHandoff when reassoc fails uOsRequestedHandoff is not reset in many scenarios after reassoc fails/timeout. Due to this if the next connect request initiate scan for ssid to find the AP in local cache, the scan for ssid complete handler think that OS requested handoff is in progress and returns without initiating the connect or connect failure. Thus the HDD remains in connecting state and after that scans fails. To fix this reset uOsRequestedHandoff whenever reassoc fails Change-Id: Ife9ee885cc1638f2bc4e02fd91b000c6e00f0689 CRs-Fixed: 1101706 --- .../CORE/SME/src/csr/csrNeighborRoam.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/qcacld-2.0/CORE/SME/src/csr/csrNeighborRoam.c b/drivers/net/wireless/qcacld-2.0/CORE/SME/src/csr/csrNeighborRoam.c index 6d080abf08aa..96b2b496edb3 100644 --- a/drivers/net/wireless/qcacld-2.0/CORE/SME/src/csr/csrNeighborRoam.c +++ b/drivers/net/wireless/qcacld-2.0/CORE/SME/src/csr/csrNeighborRoam.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -4994,6 +4994,9 @@ eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac, eCSR_NEIGHBOR_ROAM_STATE_INIT, sessionId); pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE; +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + pNeighborRoamInfo->uOsRequestedHandoff = 0; +#endif } break; @@ -5030,6 +5033,7 @@ eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac, pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE; csrNeighborRoamResetCfgListChanScanControlInfo(pMac, sessionId); #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + pNeighborRoamInfo->uOsRequestedHandoff = 0; if (!csrRoamIsRoamOffloadScanEnabled(pMac)) { #endif @@ -5067,6 +5071,9 @@ eHalStatus csrNeighborRoamIndicateDisconnect(tpAniSirGlobal pMac, CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT, sessionId) pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE; +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + pNeighborRoamInfo->uOsRequestedHandoff = 0; +#endif break; } #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD @@ -5195,6 +5202,9 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, eCSR_NEIGHBOR_ROAM_STATE_INIT, sessionId) pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE; +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + pNeighborRoamInfo->uOsRequestedHandoff = 0; +#endif break; } /* Fall through if the status is SUCCESS */ @@ -5620,6 +5630,9 @@ eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac, tANI_U8 sessionId) pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE; /* Set the Last Sent Cmd as RSO_STOP */ pNeighborRoamInfo->lastSentCmd = ROAM_SCAN_OFFLOAD_STOP; +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + pNeighborRoamInfo->uOsRequestedHandoff = 0; +#endif return eHAL_STATUS_SUCCESS; } @@ -5970,6 +5983,9 @@ void csrNeighborRoamTranistionPreauthDoneToDisconnected(tpAniSirGlobal pMac, // Transition to init state CSR_NEIGHBOR_ROAM_STATE_TRANSITION(eCSR_NEIGHBOR_ROAM_STATE_INIT, sessionId) pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = eANI_BOOLEAN_FALSE; +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + pNeighborRoamInfo->uOsRequestedHandoff = 0; +#endif } /* ---------------------------------------------------------------------------