From a6e3ebad4335f2bab12552328065d5fb2e97707f Mon Sep 17 00:00:00 2001 From: "Selvaraj, Sridhar" Date: Tue, 14 Mar 2017 19:52:39 +0530 Subject: [PATCH] qcacld-3.0: Ignore LFR3 ROAM SYNCH indication if disconnect in progress Currently, WMA is not checking whether the south bound disconnect (deauth/disassoc from AP) is in progress before processing LFR3 Roam synch indication which leads to FW out of sync with host. Fix is to ignore LFR3 Roam Synch Indication if south bound disconnect is in progress in host. Change-Id: If3c78139cf1d1d0aa0f977bd2cbdca53c7b1a81c CRs-Fixed: 2019702 --- core/mac/src/pe/lim/lim_api.c | 8 ++++++++ core/wma/src/wma_scan_roam.c | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 1bd1af39d5e7..86d4de5b1819 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -1995,6 +1995,14 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("LFR3:session is not in STA mode")); return status; } + /* + * If deauth from AP already in progress, ignore Roam Synch Indication + * from firmware. + */ + if (session_ptr->limSmeState != eLIM_SME_LINK_EST_STATE) { + lim_log(mac_ctx, LOGE, FL("LFR3: Not in Link est state")); + return status; + } status = lim_roam_fill_bss_descr(mac_ctx, roam_sync_ind_ptr, bss_desc); if (!QDF_IS_STATUS_SUCCESS(status)) { lim_log(mac_ctx, LOGE, FL("LFR3:Failed to fill Bss Descr")); diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 60df1d1875c1..cb467e8ac560 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -2387,8 +2387,13 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event, goto cleanup_label; } qdf_mem_zero(bss_desc_ptr, sizeof(tSirBssDescription) + ie_len); - wma->pe_roam_synch_cb((tpAniSirGlobal)wma->mac_context, - roam_synch_ind_ptr, bss_desc_ptr); + if (QDF_IS_STATUS_ERROR(wma->pe_roam_synch_cb( + (tpAniSirGlobal)wma->mac_context, + roam_synch_ind_ptr, bss_desc_ptr))) { + WMA_LOGE("LFR3: PE roam synch cb failed"); + status = -EBUSY; + goto cleanup_label; + } wma_roam_update_vdev(wma, roam_synch_ind_ptr); wma->csr_roam_synch_cb((tpAniSirGlobal)wma->mac_context, roam_synch_ind_ptr, bss_desc_ptr, SIR_ROAM_SYNCH_PROPAGATION);