From 9cfd7d0f03ece2ac17b9f6766060ada2a2478c80 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Thu, 3 Dec 2015 16:09:38 +0530 Subject: [PATCH] qcacld-3.0: Add disconnect to the head of sme pending command list qcacld-2.0 to qcacld-3.0 propagation If connect is received and queued to sme pending list while scan is in progress in sme, once scan is completed, again scan is queued to get the scanned channel info with reason eCsrScanGetScanChnInfo behind connect command. Connect is executed next with scan command in pending queue. Now if disconnect is received from hdd it is also queued in sme pending cmd list behind scan. Once connect is executed the wait for key state is set and wait key timer is started. As only disconnect and set key command are allowed in wait for key state, the pending cmd queue is not executed with scan command at the head and thus the disconnect is not executed. Also as supplicant has issued disconnect, no keys will be set and pending command queue will not be processed till wait for key timer expires. If during this time unload starts all the commands including the disconnect command sme pending queue are flushed and thus no DEL BSS is sent to firmware before HAL STOP which leads to crash. To avoid this add disconnect to the head of sme pending command list so that disconnect can be processed after connect during wait for key state. Change-Id: I333e7b103ac10e368d34b5bf8b87cc360650cd50 CRs-Fixed: 930713 --- core/sme/src/csr/csr_api_roam.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index fdc18bd2f3a9..8c6f830ab4bc 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -7681,7 +7681,6 @@ CDF_STATUS csr_roam_issue_disassociate_cmd(tpAniSirGlobal pMac, uint32_t session { CDF_STATUS status = CDF_STATUS_SUCCESS; tSmeCmd *pCommand; - bool fHighPriority = false; do { pCommand = csr_get_command_buffer(pMac); if (!pCommand) { @@ -7709,7 +7708,6 @@ CDF_STATUS csr_roam_issue_disassociate_cmd(tpAniSirGlobal pMac, uint32_t session pCommand->u.roamCmd.roamReason = eCsrForcedDeauth; break; case eCSR_DISCONNECT_REASON_HANDOFF: - fHighPriority = true; pCommand->u.roamCmd.roamReason = eCsrSmeIssuedDisassocForHandoff; break; @@ -7735,7 +7733,7 @@ CDF_STATUS csr_roam_issue_disassociate_cmd(tpAniSirGlobal pMac, uint32_t session default: break; } - status = csr_queue_sme_command(pMac, pCommand, fHighPriority); + status = csr_queue_sme_command(pMac, pCommand, true); if (!CDF_IS_STATUS_SUCCESS(status)) { sms_log(pMac, LOGE, FL(" fail to send message status = %d"), status);