diff options
| author | yeshwanth sriram guntuka <ysriramg@codeaurora.org> | 2017-04-10 16:54:23 +0530 |
|---|---|---|
| committer | spuligil <spuligil@codeaurora.org> | 2017-04-15 12:49:41 -0700 |
| commit | 0f8dc0aab9f6c0bd849ffb8bcdb3c11538748965 (patch) | |
| tree | f0e8c231fff38d51308d807481b9f48352d3853a | |
| parent | 3a6c8597a637536c2b9fa0986107d475151c31a8 (diff) | |
qcacld-3.0: Fix connect failure due to scan stuck
Peer sta kickout ind was received from fw nine times
which resulted in queuing nine scan commands as part
of csr_scan_request_lost_link1 without checking for
max allowed scans. The ninth scan cmd is not released
as fw did not send completion event resulting in
subsequent connect to fail.
Fix is to
1) check for max allowed scans before
queuing scan command.
2) check for lim sme state to avoid invoking tear
down link with ap multiple times on receiving
multiple peer sta kickout ind from fw.
3) don't invoke csr_scan_request_lost_link1 as part
of csr_roam_lost_link as supplicant will issue scan
after successful disconnection.
Change-Id: I850fd336fc73e4b2c2362dfd11db433b68ccd1fb
CRs-Fixed: 2031342
| -rw-r--r-- | core/mac/src/pe/lim/lim_link_monitoring_algo.c | 14 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 31 |
2 files changed, 17 insertions, 28 deletions
diff --git a/core/mac/src/pe/lim/lim_link_monitoring_algo.c b/core/mac/src/pe/lim/lim_link_monitoring_algo.c index b528f76eb3bd..b47b56b05afe 100644 --- a/core/mac/src/pe/lim/lim_link_monitoring_algo.c +++ b/core/mac/src/pe/lim/lim_link_monitoring_algo.c @@ -221,11 +221,17 @@ void lim_delete_sta_context(tpAniSirGlobal mac_ctx, tpSirMsgQ lim_msg) switch (msg->reasonCode) { case HAL_DEL_STA_REASON_CODE_KEEP_ALIVE: if (LIM_IS_STA_ROLE(session_entry) && !msg->is_tdls) { - if (session_entry->limMlmState != - eLIM_MLM_LINK_ESTABLISHED_STATE) { - pe_err("Do not process in limMlmState %s(%x)", + if (!((session_entry->limMlmState == + eLIM_MLM_LINK_ESTABLISHED_STATE) && + (session_entry->limSmeState != + eLIM_SME_WT_DISASSOC_STATE) && + (session_entry->limSmeState != + eLIM_SME_WT_DEAUTH_STATE))) { + pe_err("Do not process in limMlmState %s(%x) limSmeState %s(%x)", lim_mlm_state_str(session_entry->limMlmState), - session_entry->limMlmState); + session_entry->limMlmState, + lim_mlm_state_str(session_entry->limSmeState), + session_entry->limSmeState); qdf_mem_free(msg); return; } diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 5af6c7623386..3c091fb1c03e 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -11985,17 +11985,12 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId, tSirSmeDisassocInd *pDisassocIndMsg = NULL; eCsrRoamResult result = eCSR_ROAM_RESULT_LOSTLINK; tCsrRoamInfo roamInfo; - bool fToRoam; tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (!pSession) { sme_err("session: %d not found", sessionId); return QDF_STATUS_E_FAILURE; } - /* Only need to roam for infra station. In this case P2P client will - * roam as well - */ - fToRoam = CSR_IS_INFRASTRUCTURE(&pSession->connectedProfile); pSession->fCancelRoaming = false; if (eWNI_SME_DISASSOC_IND == type) { result = eCSR_ROAM_RESULT_DISASSOC_IND; @@ -12025,9 +12020,6 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId, else if (eWNI_SME_DEAUTH_IND == type) status = csr_send_mb_deauth_cnf_msg(pMac, pDeauthIndMsg); - if (!QDF_IS_STATUS_SUCCESS(status)) - /* If fail to send confirmation to PE, not to trigger roaming */ - fToRoam = false; /* prepare to tell HDD to disconnect */ qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); roamInfo.statusCode = (tSirResultCodes) pSession->roamingStatusCode; @@ -12048,22 +12040,6 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId, } sme_debug("roamInfo.staId: %d", roamInfo.staId); - /* See if we can possibly roam. If so, start the roaming process and - * notify HDD that we are roaming. But if we cannot possibly roam, or - * if we are unable to currently roam, then notify HDD of the lost link - */ - if (fToRoam) { - /* Only remove the connected BSS in infrastructure mode */ - csr_roam_remove_connected_bss_from_scan_cache(pMac, - &pSession-> - connectedProfile); - /* Not to do anying for lostlink with WDS */ - status = csr_roam_start_roaming(pMac, sessionId, - (eWNI_SME_DEAUTH_IND == type) ? - eCsrLostlinkRoamingDeauth : - eCsrLostlinkRoamingDisassoc); - } - return status; } @@ -18706,6 +18682,13 @@ QDF_STATUS csr_queue_sme_command(tpAniSirGlobal pMac, tSmeCmd *pCommand, if ((pCommand->command == eSmeCommandScan) || (pCommand->command == eSmeCommandRemainOnChannel)) { + if (csr_ll_count(&pMac->sme.smeScanCmdActiveList) >= + pMac->scan.max_scan_count) { + sme_err("scan pending list count %d", + pMac->sme.smeScanCmdPendingList.Count); + csr_scan_call_callback(pMac, pCommand, eCSR_SCAN_ABORT); + return QDF_STATUS_E_FAILURE; + } sme_debug( "scan pending list count %d scan_id %d", pMac->sme.smeScanCmdPendingList.Count, |
