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
This commit is contained in:
Abhishek Singh 2015-12-16 14:28:48 +05:30 • committed by Akash Patel
commit e068085f29
2 changed files with 72 additions and 0 deletions

View file

@ -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;

View file

@ -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,