From 364c0cb3396862936f12246f98d5510e623fe841 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Fri, 16 Aug 2019 15:24:11 +0530 Subject: [PATCH] qcacld-3.0: Dont process SYNC IND if ROAM STOP cmd already posted to WMA Currently, HOST sets discon_in_progress flag after posting ROAM_SCAN_OFFLOAD_STOP command to WMA for a session. In case of disconnection in HOST while roaming in FW if ROAM SYNC IND from fw comes to host after posting ROAM_SCAN_OFFLOAD_STOP command to WMA, host start processing SYNC IND and FW start processing ROAM_SCAN_OFFLOAD_STOP which will cause to cleanup/disconnect with new AP to which it has just roamed. After this cleanup fw will send HO_FAIL. Now host as part of roam sync indication sends PEER_REORDER_QUEUE_SETUP for the deleted peer which results in firmware assert. Fix is to set discon_in_progress flag to true before posting ROAM_SCAN_OFFLOAD_STOP command to WMA in order to ignore ROAM SYNC IND and return status as failure to fw. Change-Id: Id5c787d5489a6c0722b090951db388484f94f2e9 CRs-Fixed: 2505851 --- core/sme/src/common/sme_api.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index f8efc50e6b59..8e8e713e9f1a 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -6379,6 +6379,14 @@ QDF_STATUS sme_stop_roaming(mac_handle_t mac_handle, uint8_t session_id, session = CSR_GET_SESSION(mac_ctx, session_id); + /* In case of disconnect/try disconnect, set discon_in_progress flag + * before posting ROAM_SCAN_OFFLOAD_STOP cmd to WMA. It will allow + * host to not process roam sync indication in + * csr_process_roam_sync_callback where "session->discon_in_progress" + * is checked and will return failure. + */ + if (reason == eCsrForcedDisassoc) + session->discon_in_progress = true; /* * set the driver_disabled_roaming flag to true even if roaming * is not enabled on this session so that roam start requests for