From e068085f29a3321b2aedb56ededd1f9288cc7605 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Wed, 16 Dec 2015 14:28:48 +0530 Subject: [PATCH] qcacld-3.0: Delete preauth session in case of deauth from host qcacld-2.0 to qcacld-3.0 propagation The preauth session is not deleted if the deauth is from host (eCsrForcedDeauth). Adds the check to delete the preauth session and stop the preAuthReassocIntvlTimer timer, in case of deauth from host. Change-Id: I181344b0f3a41ff5c3a77f30b4c8cf80557c23b5 CRs-fixed: 649521 --- .../src/pe/lim/lim_send_management_frames.c | 38 +++++++++++++++++++ core/sme/src/csr/csr_api_roam.c | 34 +++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index e33d95bf894a..62f452b6e97a 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -3076,6 +3076,44 @@ CDF_STATUS lim_send_deauth_cnf(tpAniSirGlobal pMac) /* / Receive path cleanup with dummy packet */ lim_ft_cleanup_pre_auth_info(pMac, psessionEntry); lim_cleanup_rx_path(pMac, pStaDs, psessionEntry); +#ifdef WLAN_FEATURE_VOWIFI_11R + if ((psessionEntry->limSystemRole == eLIM_STA_ROLE) && + ( +#ifdef FEATURE_WLAN_ESE + (psessionEntry->isESEconnection) || +#endif +#ifdef FEATURE_WLAN_LFR + (psessionEntry->isFastRoamIniFeatureEnabled) || +#endif + (psessionEntry->is11Rconnection))) { + PELOGE(lim_log(pMac, LOGE, + FL("FT Preauth Session (%p,%d) Cleanup Deauth reason %d Trigger = %d"), + psessionEntry, psessionEntry->peSessionId, + pMlmDeauthReq->reasonCode, + pMlmDeauthReq->deauthTrigger);); + lim_ft_cleanup(pMac, psessionEntry); + } else { + PELOGE(lim_log(pMac, LOGE, + FL("No FT Preauth Session Cleanup in role %d" +#ifdef FEATURE_WLAN_ESE + " isESE %d" +#endif +#ifdef FEATURE_WLAN_LFR + " isLFR %d" +#endif + " is11r %d, Deauth reason %d Trigger = %d"), + psessionEntry->limSystemRole, +#ifdef FEATURE_WLAN_ESE + psessionEntry->isESEconnection, +#endif +#ifdef FEATURE_WLAN_LFR + psessionEntry->isFastRoamIniFeatureEnabled, +#endif + psessionEntry->is11Rconnection, + pMlmDeauthReq->reasonCode, + pMlmDeauthReq->deauthTrigger);); + } +#endif /* / Free up buffer allocated for mlmDeauthReq */ cdf_mem_free(pMlmDeauthReq); pMac->lim.limDisassocDeauthCnfReq.pMlmDeauthReq = NULL; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 7c58fde0ba36..44908ed713a6 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -7524,6 +7524,40 @@ CDF_STATUS csr_roam_process_disassoc_deauth(tpAniSirGlobal pMac, tSmeCmd *pComma FL ("set to substate eCSR_ROAM_SUBSTATE_DISASSOC_STA_HAS_LEFT")); } + if (eCsrSmeIssuedDisassocForHandoff != + pCommand->u.roamCmd.roamReason) { + /* + * If we are in neighbor preauth done state then + * on receiving disassoc or deauth we dont roam + * instead we just disassoc from current ap and + * then go to disconnected state. + * This happens for ESE and 11r FT connections ONLY. + */ +#ifdef WLAN_FEATURE_VOWIFI_11R + if (csr_roam_is11r_assoc(pMac, sessionId) && + (csr_neighbor_roam_state_preauth_done(pMac, + sessionId))) { + csr_neighbor_roam_tranistion_preauth_done_to_disconnected( + pMac, sessionId); + } +#endif +#ifdef FEATURE_WLAN_ESE + if (csr_roam_is_ese_assoc(pMac, sessionId) && + (csr_neighbor_roam_state_preauth_done(pMac, + sessionId))) { + csr_neighbor_roam_tranistion_preauth_done_to_disconnected( + pMac, sessionId); + } +#endif +#ifdef FEATURE_WLAN_LFR + if (csr_roam_is_fast_roam_enabled(pMac, sessionId) && + (csr_neighbor_roam_state_preauth_done(pMac, + sessionId))) { + csr_neighbor_roam_tranistion_preauth_done_to_disconnected( + pMac, sessionId); + } +#endif + } if (fDisassoc) { status = csr_roam_issue_disassociate(pMac, sessionId,