Quellcode durchsuchen

qcacld-3.0: Fix TDLS set state cmd sequence for roaming

Firmware expects TDLS set state cmd before vdev stop, but
the cmd is going out of sequence during roaming and induce
crash in the system.
Send the TDLS set state cmd with correct sequence.

Change-Id: Ie106b8a8cebaa7f107c9eff67dda924b231162da
CRs-Fixed: 2045961
Kabilan Kannan vor 8 Jahren
Ursprung
Commit
e8602fd411
2 geänderte Dateien mit 54 neuen und 1 gelöschten Zeilen
  1. 0 1
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 54 0
      core/mac/src/pe/lim/lim_process_tdls.c

+ 0 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -14781,7 +14781,6 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
 		}
 		hdd_notify_sta_disconnect(pAdapter->sessionId,
 					  true, pAdapter->hdd_vdev);
-		wlan_hdd_tdls_notify_disconnect(pAdapter, true);
 #endif
 		hdd_info("Disconnect request from user space with reason: %d (%s) internal reason code: %d",
 			reason, hdd_ieee80211_reason_code_to_str(reason), reasonCode);

+ 54 - 0
core/mac/src/pe/lim/lim_process_tdls.c

@@ -3318,6 +3318,7 @@ skip:
 	}
 }
 
+#ifndef CONVERGED_TDLS_ENABLE
 /**
  * lim_delete_tdls_peers() - delete tdls peers
  *
@@ -3331,6 +3332,11 @@ skip:
 tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx,
 				    tpPESession session_entry)
 {
+	cds_msg_t msg;
+	struct sir_tdls_notify_set_state_disable *tdls_state_disable;
+
+	pe_debug("Enter");
+
 	if (NULL == session_entry) {
 		pe_err("NULL session_entry");
 		return eSIR_FAILURE;
@@ -3339,10 +3345,58 @@ tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx,
 	lim_check_aid_and_delete_peer(mac_ctx, session_entry);
 	if (lim_is_roam_synch_in_progress(session_entry))
 		return eSIR_SUCCESS;
+
+	if (mac_ctx->lim.sme_msg_callback) {
+		tdls_state_disable = qdf_mem_malloc(
+						sizeof(*tdls_state_disable));
+		if (NULL == tdls_state_disable) {
+			pe_err("memory allocation failed");
+			return eSIR_FAILURE;
+		}
+		tdls_state_disable->session_id = session_entry->smeSessionId;
+		msg.type = eWNI_SME_TDLS_NOTIFY_SET_STATE_DISABLE;
+		msg.bodyptr = tdls_state_disable;
+		msg.bodyval = 0;
+		mac_ctx->lim.sme_msg_callback(mac_ctx, &msg);
+	}
+
 	lim_send_sme_tdls_delete_all_peer_ind(mac_ctx, session_entry);
+	pe_debug("Exit");
+	return eSIR_SUCCESS;
+}
+#else
+/**
+ * lim_delete_tdls_peers() - delete tdls peers
+ *
+ * @mac_ctx - global MAC context
+ * @session_entry - PE session entry
+ *
+ * Delete all the TDLS peer connected before leaving the BSS
+ *
+ * Return: eSIR_SUCCESS on success, error code otherwise
+ */
+tSirRetStatus lim_delete_tdls_peers(tpAniSirGlobal mac_ctx,
+				    tpPESession session_entry)
+{
+	pe_debug("Enter");
 
+	if (NULL == session_entry) {
+		pe_err("NULL session_entry");
+		return eSIR_FAILURE;
+	}
+
+	lim_check_aid_and_delete_peer(mac_ctx, session_entry);
+
+	if (lim_is_roam_synch_in_progress(session_entry))
+		return eSIR_SUCCESS;
+
+	tgt_tdls_peers_deleted_notification(mac_ctx->psoc,
+					    session_entry->smeSessionId);
+
+	pe_debug("Exit");
 	return eSIR_SUCCESS;
 }
+#endif
 
 /**
  * lim_process_sme_del_all_tdls_peers(): process delete tdls peers