瀏覽代碼

qcacmn: Trigger panic on CM active command timeout

Trigger panic on CM active command timeout.

Change-Id: I5013d2141dc2f0c9c9d1ed762b126e9d41fb7220
CRs-Fixed: 2983061
Abhishek Singh 4 年之前
父節點
當前提交
62fe3e3986

+ 1 - 2
umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

@@ -203,8 +203,7 @@ cm_ser_connect_cb(struct wlan_serialization_command *cmd,
 	case WLAN_SER_CB_ACTIVE_CMD_TIMEOUT:
 		mlme_err(CM_PREFIX_FMT "Active command timeout",
 			 CM_PREFIX_REF(wlan_vdev_get_id(vdev), cmd->cmd_id));
-		QDF_ASSERT(0);
-
+		cm_trigger_panic_on_cmd_timeout(cm_ctx->vdev);
 		cm_connect_cmd_timeout(cm_ctx, cmd->cmd_id);
 		break;
 	case WLAN_SER_CB_RELEASE_MEM_CMD:

+ 1 - 1
umac/mlme/connection_mgr/core/src/wlan_cm_disconnect.c

@@ -186,7 +186,7 @@ cm_ser_disconnect_cb(struct wlan_serialization_command *cmd,
 	case WLAN_SER_CB_ACTIVE_CMD_TIMEOUT:
 		mlme_err(CM_PREFIX_FMT "Active command timeout",
 			 CM_PREFIX_REF(wlan_vdev_get_id(vdev), cmd->cmd_id));
-		QDF_ASSERT(0);
+		cm_trigger_panic_on_cmd_timeout(cm_ctx->vdev);
 		cm_send_disconnect_resp(cm_ctx, cmd->cmd_id);
 		break;
 	case WLAN_SER_CB_RELEASE_MEM_CMD:

+ 1 - 1
umac/mlme/connection_mgr/core/src/wlan_cm_host_roam.c

@@ -643,7 +643,7 @@ cm_ser_reassoc_cb(struct wlan_serialization_command *cmd,
 	case WLAN_SER_CB_ACTIVE_CMD_TIMEOUT:
 		mlme_err(CM_PREFIX_FMT "Active command timeout",
 			 CM_PREFIX_REF(wlan_vdev_get_id(vdev), cmd->cmd_id));
-		QDF_ASSERT(0);
+		cm_trigger_panic_on_cmd_timeout(cm_ctx->vdev);
 		cm_reassoc_cmd_timeout(cm_ctx, cmd->cmd_id);
 		break;
 	case WLAN_SER_CB_RELEASE_MEM_CMD:

+ 8 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_main_api.h

@@ -796,6 +796,14 @@ void cm_inform_bcn_probe(struct cnx_mgr *cm_ctx, uint8_t *bcn_probe,
 void cm_set_max_connect_attempts(struct wlan_objmgr_vdev *vdev,
 				 uint8_t max_connect_attempts);
 
+/**
+ * cm_trigger_panic_on_cmd_timeout() - trigger panic on active command timeout
+ * @vdev: vdev pointer
+ *
+ * Return: void
+ */
+void cm_trigger_panic_on_cmd_timeout(struct wlan_objmgr_vdev *vdev);
+
 /**
  * cm_set_max_connect_timeout() - Set max connect timeout
  * @vdev: vdev pointer

+ 21 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_util.c

@@ -27,6 +27,7 @@
 #include <wlan_policy_mgr_api.h>
 #endif
 #include "wlan_cm_roam.h"
+#include <qdf_platform.h>
 
 static uint32_t cm_get_prefix_for_cm_id(enum wlan_cm_source source) {
 	switch (source) {
@@ -237,6 +238,26 @@ void cm_store_wep_key(struct cnx_mgr *cm_ctx,
 		   crypto_key->cipher_type, wep_keys->key_len,
 		   wep_keys->seq_len);
 }
+
+void cm_trigger_panic_on_cmd_timeout(struct wlan_objmgr_vdev *vdev)
+{
+	struct wlan_objmgr_psoc *psoc;
+
+	psoc = wlan_vdev_get_psoc(vdev);
+	if (!psoc)
+		return;
+
+	if (qdf_is_recovering() || qdf_is_fw_down())
+		return;
+
+	qdf_trigger_self_recovery(psoc, QDF_ACTIVE_LIST_TIMEOUT);
+}
+
+#else
+void cm_trigger_panic_on_cmd_timeout(struct wlan_objmgr_vdev *vdev)
+{
+	QDF_ASSERT(0);
+}
 #endif
 
 #ifdef WLAN_FEATURE_FILS_SK