Browse Source

qcacld-3.0: Issue LFR2.0 connect only in proper CSR state

In DBS, LFR 2.0 takes more time to complete the roaming sequence
due to DBS config changes through policy manager. If roaming is
in progress and cfg80211 issues disconnect, disconnect handler is
supposed to wait for 4 sec before processing. In some DBS scenarios,
4 sec wait timer can expire and disconnect proceed for clean up
before the roaming sequence can complete, results in race condition.
Thus adding CSR state check before proceeding with LFR issue connect.

Change-Id: I794c6bf3f749bba9c339fd18b5202d50091b73a7
CRs-Fixed: 2481706
nakul kachhwaha 5 years ago
parent
commit
f2e2dc1523
1 changed files with 9 additions and 0 deletions
  1. 9 0
      core/sme/src/csr/csr_api_roam.c

+ 9 - 0
core/sme/src/csr/csr_api_roam.c

@@ -9482,6 +9482,13 @@ QDF_STATUS csr_continue_lfr2_connect(struct mac_context *mac,
 	if (!scan_handle_roam_ap)
 		goto POST_ROAM_FAILURE;
 
+	if ((mac->roam.roamSession[session_id].connectState ==
+				eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED) ||
+	    (mac->roam.roamSession[session_id].connectState ==
+				eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING)) {
+		goto purge_scan_result;
+	}
+
 	status = csr_roam_lfr2_issue_connect(mac, session_id,
 						scan_handle_roam_ap,
 						roam_id);
@@ -9489,6 +9496,8 @@ QDF_STATUS csr_continue_lfr2_connect(struct mac_context *mac,
 		qdf_mem_free(roam_info);
 		return status;
 	}
+
+purge_scan_result:
 	csr_scan_result_purge(mac, scan_handle_roam_ap);
 
 POST_ROAM_FAILURE: