Procházet zdrojové kódy

qca-wifi: add multi soc support for HTT logger feature

add multi soc support for HTT logger feature

Change-Id: Ic5fe4be754736c775ac77e9ec69c2ed3d333caec
Tallapragada Kalyan před 4 roky
rodič
revize
4dc550f02c
2 změnil soubory, kde provedl 13 přidání a 5 odebrání
  1. 8 4
      dp/wifi3.0/dp_htt_logger.c
  2. 5 1
      dp/wifi3.0/dp_htt_logger.h

+ 8 - 4
dp/wifi3.0/dp_htt_logger.c

@@ -969,12 +969,13 @@ static void htt_debugfs_remove(struct htt_logger *htt_logger_handle)
  * Return: init status
  */
 
-static QDF_STATUS htt_debugfs_init(struct htt_logger *htt_logger_handle)
+static QDF_STATUS htt_debugfs_init(struct htt_logger *htt_logger_handle,
+				   uint8_t psoc_id)
 {
 	char buf[32];
 	int i;
 
-	snprintf(buf, sizeof(buf), "HTT_SOC_LOGGER");
+	snprintf(buf, sizeof(buf), "HTT_SOC%d_LOGGER", psoc_id);
 
 	htt_logger_handle->log_info.htt_log_debugfs_dir =
 		qdf_debugfs_create_dir(buf, NULL);
@@ -1006,7 +1007,8 @@ out:
  * htt_interface_logging_init() - Initialize HTT tracer
  * @ htt_logger_handle: htt logger handler
  */
-void htt_interface_logging_init(struct htt_logger **phtt_logger_handle)
+void htt_interface_logging_init(struct htt_logger **phtt_logger_handle,
+				struct cdp_ctrl_objmgr_psoc *ctrl_psoc)
 {
 	QDF_STATUS ret;
 	struct htt_logger *htt_logger_handle;
@@ -1014,6 +1016,7 @@ void htt_interface_logging_init(struct htt_logger **phtt_logger_handle)
 	struct htt_log_buf_t *event_log_buf;
 	struct htt_log_buf_t *wbm_event_log_buf;
 	uint64_t htt_disable_mask;
+	struct wlan_objmgr_psoc *psoc;
 
 	*phtt_logger_handle = (struct htt_logger *)qdf_mem_malloc(
 				sizeof(struct htt_logger));
@@ -1064,7 +1067,8 @@ void htt_interface_logging_init(struct htt_logger **phtt_logger_handle)
 	/* Enable HTT logging */
 	enable_htt_logging(htt_logger_handle);
 
-	ret = htt_debugfs_init(*phtt_logger_handle);
+	psoc = (struct wlan_objmgr_psoc *)(ctrl_psoc);
+	ret = htt_debugfs_init(*phtt_logger_handle, wlan_psoc_get_id(psoc));
 	if (QDF_STATUS_SUCCESS != ret)
 		goto debugfs_init_failed;
 	return;

+ 5 - 1
dp/wifi3.0/dp_htt_logger.h

@@ -19,6 +19,8 @@
 #ifndef _HTT_EVENT_LOGGING__
 #define _HTT_EVENT_LOGGING__
 
+#include <cdp_txrx_handle.h>
+
 #ifndef HTT_EVENT_DEBUG_MAX_ENTRY
 #define HTT_EVENT_DEBUG_MAX_ENTRY (1024)
 #endif
@@ -39,6 +41,7 @@
 #define HTT_LOGP(args ...) \
 	QDF_TRACE(QDF_MODULE_ID_HTT, QDF_TRACE_LEVEL_FATAL, ## args)
 
+
 /**
  * struct htt_command_debug - HTT command log buffer data type
  * @ command - Store HTT MSG id
@@ -148,7 +151,8 @@ struct htt_logger {
  *
  * @ htt_logger_handle - Pointer for HTT tracer
  */
-void htt_interface_logging_init(struct htt_logger **htt_logger_handle);
+void htt_interface_logging_init(struct htt_logger **htt_logger_handle,
+				struct cdp_ctrl_objmgr_psoc *ctrl_psoc);
 
 /**
  * htt_interface_logging_deinit() - Deinitialize HTT event tracer