Selaa lähdekoodia

qcacld-3.0: Add check for STA disconnect in pe disconnect cb

In PE layer, STA session's mlme state check is added to avoid race
between NB disconnect and SB disconnect from emergency roaming disconnect.

In pe_disconnect_cb, if session's mlme state is already disconnecting no
need to send tear down link with AP.

Change-Id: I096b44167d65aa307e6685f07d42656d4e38a042
CRs-Fixed: 2627760
Abhishek Ambure 5 vuotta sitten
vanhempi
sitoutus
ef4725cfe4
1 muutettua tiedostoa jossa 8 lisäystä ja 0 poistoa
  1. 8 0
      core/mac/src/pe/lim/lim_api.c

+ 8 - 0
core/mac/src/pe/lim/lim_api.c

@@ -2230,6 +2230,14 @@ pe_disconnect_callback(struct mac_context *mac, uint8_t vdev_id,
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	if (!((session->limMlmState == eLIM_MLM_LINK_ESTABLISHED_STATE) &&
+	      (session->limSmeState != eLIM_SME_WT_DISASSOC_STATE) &&
+	      (session->limSmeState != eLIM_SME_WT_DEAUTH_STATE))) {
+		pe_info("Cannot handle in mlmstate %d sme state %d as vdev_id:%d is not in connected state",
+			session->limMlmState, session->limSmeState, vdev_id);
+		return QDF_STATUS_SUCCESS;
+	}
+
 	if (deauth_disassoc_frame &&
 	    deauth_disassoc_frame_len > SIR_MAC_MIN_IE_LEN) {
 		lim_extract_ies_from_deauth_disassoc(session,