Przeglądaj źródła

qcacmn: add SSR host log collection API usage

Current code does not use the SSR host log collection API.
Fix this by adding SSR host log collection API usage.

Change-Id: I9dfb0bd7054986760a711d0752f37f4327c706b2
CRs-Fixed: 3339933
Mohammed Ahmed 2 lat temu
rodzic
commit
cef49bdf89

+ 12 - 5
hal/wifi3.0/hal_srng.c

@@ -24,6 +24,7 @@
 #include "qdf_module.h"
 #include "wcss_version.h"
 #include <qdf_tracepoint.h>
+#include "qdf_ssr_driver_dump.h"
 
 struct tcl_data_cmd gtcl_data_symbol __attribute__((used));
 
@@ -1161,23 +1162,29 @@ void *hal_attach(struct hif_opaque_softc *hif_handle, qdf_device_t qdf_dev)
 
 	qdf_minidump_log(hal, sizeof(*hal), "hal_soc");
 
+	qdf_ssr_driver_dump_register_region("hal_soc", hal, sizeof(*hal));
+
 	qdf_atomic_init(&hal->active_work_cnt);
 	if (hal_delayed_reg_write_init(hal) != QDF_STATUS_SUCCESS) {
 		hal_err("unable to initialize delayed reg write");
-		goto fail3;
+		goto fail4;
 	}
 
 	if (hal_reo_shared_qaddr_setup((hal_soc_handle_t)hal)
 	    != QDF_STATUS_SUCCESS) {
 		hal_err("unable to setup reo shared qaddr");
-		goto fail4;
+		goto fail5;
 	}
 
 	hif_rtpm_register(HIF_RTPM_ID_HAL_REO_CMD, NULL);
 
 	return (void *)hal;
-fail4:
+fail5:
 	hal_delayed_reg_write_deinit(hal);
+fail4:
+	qdf_ssr_driver_dump_unregister_region("hal_soc");
+	qdf_minidump_remove(hal, sizeof(*hal), "hal_soc");
+	qdf_mem_free(hal->ops);
 fail3:
 	qdf_mem_free_consistent(qdf_dev, qdf_dev->dev,
 				sizeof(*hal->shadow_wrptr_mem_vaddr) *
@@ -1234,6 +1241,8 @@ extern void hal_detach(void *hal_soc)
 	hif_rtpm_deregister(HIF_RTPM_ID_HAL_REO_CMD);
 	hal_delayed_reg_write_deinit(hal);
 	hal_reo_shared_qaddr_detach((hal_soc_handle_t)hal);
+	qdf_ssr_driver_dump_unregister_region("hal_soc");
+	qdf_minidump_remove(hal, sizeof(*hal), "hal_soc");
 	qdf_mem_free(hal->ops);
 
 	qdf_mem_free_consistent(hal->qdf_dev, hal->qdf_dev->dev,
@@ -1242,8 +1251,6 @@ extern void hal_detach(void *hal_soc)
 	qdf_mem_free_consistent(hal->qdf_dev, hal->qdf_dev->dev,
 		sizeof(*(hal->shadow_wrptr_mem_vaddr)) * HAL_MAX_LMAC_RINGS,
 		hal->shadow_wrptr_mem_vaddr, hal->shadow_wrptr_mem_paddr, 0);
-	qdf_minidump_remove(hal, sizeof(*hal), "hal_soc");
-
 	qdf_mem_free(hal);
 
 	return;

+ 13 - 0
htc/htc_credit_history.c

@@ -23,6 +23,7 @@
 #include <qdf_lock.h>
 #include <qdf_hang_event_notifier.h>
 #include <qdf_notifier.h>
+#include "qdf_ssr_driver_dump.h"
 
 struct HTC_CREDIT_HISTORY {
 	enum htc_credit_exchange_type type;
@@ -64,6 +65,9 @@ static inline void htc_add_emulation_delay(void)
 
 void htc_credit_history_deinit(void)
 {
+	qdf_ssr_driver_dump_unregister_region("htc_credit_history_length");
+	qdf_ssr_driver_dump_unregister_region("htc_credit_history_idx");
+	qdf_ssr_driver_dump_unregister_region("htc_credit");
 	qdf_minidump_remove(&htc_credit_history_buffer,
 			    sizeof(htc_credit_history_buffer), "htc_credit");
 }
@@ -74,6 +78,15 @@ void htc_credit_history_init(void)
 	g_htc_credit_history_length = 0;
 	qdf_minidump_log(&htc_credit_history_buffer,
 			 sizeof(htc_credit_history_buffer), "htc_credit");
+	qdf_ssr_driver_dump_register_region("htc_credit",
+					    htc_credit_history_buffer,
+					    sizeof(htc_credit_history_buffer));
+	qdf_ssr_driver_dump_register_region("htc_credit_history_idx",
+					    &g_htc_credit_history_idx,
+					    sizeof(g_htc_credit_history_idx));
+	qdf_ssr_driver_dump_register_region("htc_credit_history_length",
+					    &g_htc_credit_history_length,
+					    sizeof(g_htc_credit_history_length));
 }
 
 /**

+ 8 - 1
utils/logging/src/wlan_logging_sock_svc.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -44,6 +44,7 @@
 #include <wlan_connectivity_logging.h>
 #endif
 
+#include "qdf_ssr_driver_dump.h"
 #ifdef CNSS_GENL
 #ifdef CONFIG_CNSS_OUT_OF_TREE
 #include "cnss_nl.h"
@@ -252,11 +253,17 @@ static struct log_msg gplog_msg[MAX_LOGMSG_COUNT];
 static inline QDF_STATUS allocate_log_msg_buffer(void)
 {
 	qdf_minidump_log(gplog_msg, sizeof(gplog_msg), "wlan_logs");
+	qdf_ssr_driver_dump_register_region("gwlan_logging", &gwlan_logging,
+					    sizeof(gwlan_logging));
+	qdf_ssr_driver_dump_register_region("wlan_logs", gplog_msg,
+					    sizeof(gplog_msg));
 	return QDF_STATUS_SUCCESS;
 }
 
 static inline void free_log_msg_buffer(void)
 {
+	qdf_ssr_driver_dump_unregister_region("wlan_logs");
+	qdf_ssr_driver_dump_unregister_region("gwlan_logging");
 	qdf_minidump_remove(gplog_msg, sizeof(gplog_msg), "wlan_logs");
 }
 #endif

+ 46 - 0
wmi/src/wmi_unified.c

@@ -26,6 +26,7 @@
 #include "wmi_unified_api.h"
 #include "qdf_module.h"
 #include "qdf_platform.h"
+#include "qdf_ssr_driver_dump.h"
 #ifdef WMI_EXT_DBG
 #include "qdf_list.h"
 #include "qdf_atomic.h"
@@ -155,6 +156,15 @@ static void wmi_minidump_detach(struct wmi_unified *wmi_handle)
 		&wmi_handle->log_info.wmi_command_tx_cmp_log_buf_info;
 	uint32_t buf_size = info->size * sizeof(struct wmi_command_cmp_debug);
 
+	qdf_ssr_driver_dump_unregister_region("wmi_debug_log_info");
+	qdf_ssr_driver_dump_unregister_region("wmi_rx_event_idx");
+	qdf_ssr_driver_dump_unregister_region("wmi_rx_event");
+	qdf_ssr_driver_dump_unregister_region("wmi_event_log_idx");
+	qdf_ssr_driver_dump_unregister_region("wmi_event_log");
+	qdf_ssr_driver_dump_unregister_region("wmi_command_log_idx");
+	qdf_ssr_driver_dump_unregister_region("wmi_command_log");
+	qdf_ssr_driver_dump_unregister_region("wmi_tx_cmp_idx");
+	qdf_ssr_driver_dump_unregister_region("wmi_tx_cmp");
 	qdf_minidump_remove(info->buf, buf_size, "wmi_tx_cmp");
 }
 
@@ -165,6 +175,42 @@ static void wmi_minidump_attach(struct wmi_unified *wmi_handle)
 	uint32_t buf_size = info->size * sizeof(struct wmi_command_cmp_debug);
 
 	qdf_minidump_log(info->buf, buf_size, "wmi_tx_cmp");
+
+	qdf_ssr_driver_dump_register_region("wmi_tx_cmp", info->buf, buf_size);
+	qdf_ssr_driver_dump_register_region("wmi_tx_cmp_idx",
+					    info->p_buf_tail_idx,
+					    sizeof(*info->p_buf_tail_idx));
+
+	info = &wmi_handle->log_info.wmi_command_log_buf_info;
+	buf_size = info->size * sizeof(struct wmi_command_debug);
+
+	qdf_ssr_driver_dump_register_region("wmi_command_log", info->buf,
+					    buf_size);
+	qdf_ssr_driver_dump_register_region("wmi_command_log_idx",
+					    info->p_buf_tail_idx,
+					    sizeof(*info->p_buf_tail_idx));
+
+	info = &wmi_handle->log_info.wmi_event_log_buf_info;
+	buf_size = info->size * sizeof(struct wmi_event_debug);
+
+	qdf_ssr_driver_dump_register_region("wmi_event_log", info->buf,
+					    buf_size);
+	qdf_ssr_driver_dump_register_region("wmi_event_log_idx",
+					    info->p_buf_tail_idx,
+					    sizeof(*info->p_buf_tail_idx));
+
+	info = &wmi_handle->log_info.wmi_rx_event_log_buf_info;
+	buf_size = info->size * sizeof(struct wmi_event_debug);
+
+	qdf_ssr_driver_dump_register_region("wmi_rx_event", info->buf,
+					    buf_size);
+	qdf_ssr_driver_dump_register_region("wmi_rx_event_idx",
+					    info->p_buf_tail_idx,
+					    sizeof(*info->p_buf_tail_idx));
+
+	qdf_ssr_driver_dump_register_region("wmi_debug_log_info",
+					    &wmi_handle->log_info,
+					    sizeof(wmi_handle->log_info));
 }
 
 #define WMI_COMMAND_RECORD(h, a, b) {					\