Browse Source

qcacmn: Remove obsolete g_qdf_trace_info infrastructure

The original version of the QDF trace functionality, introduced in
Change-Id I1d0cdfd8730a5c021aaa50b7dc8549d491d760b3, included a log
filtering mechanism inherited from the MCC code.  This mechanism used
an internal table g_qdf_trace_info along with the following APIs which
were used to configure and query the table:
- qdf_trace_set_level
- qdf_trace_set_module_trace_level
- qdf_trace_set_value
- qdf_trace_get_level

Subsequently, as part of the MCC/WIN QDF convergence project,
Change-Id I871c09189202d021405777db732e8821e7aaca7c ("qcacmn: Update
QDF Debug Framework") updated the QDF trace functionality, and as a
result the usage of the g_qdf_trace_info table was replaced.

Since the legacy infrastructure is no longer used, remove it.

Change-Id: I1bb0c0e03c1d1e3227550477779d5db1549ff570
CRs-Fixed: 2461904
Jeff Johnson 5 years ago
parent
commit
796998f706
2 changed files with 0 additions and 225 deletions
  1. 0 40
      qdf/inc/qdf_trace.h
  2. 0 185
      qdf/linux/src/qdf_trace.c

+ 0 - 40
qdf/inc/qdf_trace.h

@@ -474,41 +474,6 @@ enum qdf_dpt_debugfs_state {
 	QDF_DPT_DEBUGFS_STATE_SHOW_COMPLETE,
 };
 
-/* Function declarations and documenation */
-
-/**
- * qdf_trace_set_level() - Set the trace level for a particular module
- * @level : trace level
- *
- * Trace level is a member of the QDF_TRACE_LEVEL enumeration indicating
- * the severity of the condition causing the trace message to be issued.
- * More severe conditions are more likely to be logged.
- *
- * This is an external API that allows trace levels to be set for each module.
- *
- * Return:  nothing
- */
-void qdf_trace_set_level(QDF_MODULE_ID module, QDF_TRACE_LEVEL level);
-
-/**
- * qdf_trace_get_level() - get the trace level
- * @level : trace level
- *
- * This is an external API that returns a bool value to signify if a
- * particular trace level is set for the specified module.
- * A member of the QDF_TRACE_LEVEL enumeration indicating the severity
- * of the condition causing the trace message to be issued.
- *
- * Note that individual trace levels are the only valid values
- * for this API.  QDF_TRACE_LEVEL_NONE and QDF_TRACE_LEVEL_ALL
- * are not valid input and will return false
- *
- * Return:
- *  false - the specified trace level for the specified module is OFF
- *  true - the specified trace level for the specified module is ON
- */
-bool qdf_trace_get_level(QDF_MODULE_ID module, QDF_TRACE_LEVEL level);
-
 typedef void (*tp_qdf_trace_cb)(void *p_mac, tp_qdf_trace_record, uint16_t);
 typedef void (*tp_qdf_state_info_cb) (char **buf, uint16_t *size);
 #ifdef WLAN_FEATURE_MEMDUMP_ENABLE
@@ -952,11 +917,6 @@ void qdf_dp_trace_data_pkt(qdf_nbuf_t nbuf, uint8_t pdev_id,
 
 void qdf_trace_display(void);
 
-void qdf_trace_set_value(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
-			 uint8_t on);
-
-void qdf_trace_set_module_trace_level(QDF_MODULE_ID module, uint32_t level);
-
 void __printf(3, 4) qdf_snprintf(char *str_buffer, unsigned int size,
 		  char *str_format, ...);
 

+ 0 - 185
qdf/linux/src/qdf_trace.c

@@ -49,48 +49,8 @@ qdf_declare_param(qdf_log_flush_timer_period, uint);
 
 enum qdf_timestamp_unit qdf_log_timestamp_type = QDF_LOG_TIMESTAMP_UNIT;
 
-/**
- * typedef struct module_trace_info - Trace level for a module, as a bitmask.
- * The bits in this mask are ordered by QDF_TRACE_LEVEL.  For example,
- * each bit represents one of the bits in QDF_TRACE_LEVEL that may be turned
- * on to have traces at that level logged, i.e. if QDF_TRACE_LEVEL_ERROR is
- * == 2, then if bit 2 (low order) is turned ON, then ERROR traces will be
- * printed to the trace log. Note that all bits turned OFF means no traces
- * @module_trace_level: trace level
- * @module_name_str: 3 character string name for the module
- */
-typedef struct {
-	uint16_t module_trace_level;
-	unsigned char module_name_str[4];
-} module_trace_info;
-
 #define DP_TRACE_META_DATA_STRLEN 50
 
-/* Array of static data that contains all of the per module trace
- * information.  This includes the trace level for the module and
- * the 3 character 'name' of the module for marking the trace logs
- */
-module_trace_info g_qdf_trace_info[QDF_MODULE_ID_MAX] = {
-	[QDF_MODULE_ID_TLSHIM] = {QDF_DEFAULT_TRACE_LEVEL, "DP"},
-	[QDF_MODULE_ID_WMI] = {QDF_DEFAULT_TRACE_LEVEL, "WMI"},
-	[QDF_MODULE_ID_HDD] = {QDF_DEFAULT_TRACE_LEVEL, "HDD"},
-	[QDF_MODULE_ID_SME] = {QDF_DEFAULT_TRACE_LEVEL, "SME"},
-	[QDF_MODULE_ID_PE] = {QDF_DEFAULT_TRACE_LEVEL, "PE "},
-	[QDF_MODULE_ID_WMA] = {QDF_DEFAULT_TRACE_LEVEL, "WMA"},
-	[QDF_MODULE_ID_SYS] = {QDF_DEFAULT_TRACE_LEVEL, "SYS"},
-	[QDF_MODULE_ID_QDF] = {QDF_DEFAULT_TRACE_LEVEL, "QDF"},
-	[QDF_MODULE_ID_SAP] = {QDF_DEFAULT_TRACE_LEVEL, "SAP"},
-	[QDF_MODULE_ID_HDD_SOFTAP] = {QDF_DEFAULT_TRACE_LEVEL, "HSP"},
-	[QDF_MODULE_ID_HDD_DATA] = {QDF_DEFAULT_TRACE_LEVEL, "HDP"},
-	[QDF_MODULE_ID_HDD_SAP_DATA] = {QDF_DEFAULT_TRACE_LEVEL, "SDP"},
-	[QDF_MODULE_ID_BMI] = {QDF_DEFAULT_TRACE_LEVEL, "BMI"},
-	[QDF_MODULE_ID_HIF] = {QDF_DEFAULT_TRACE_LEVEL, "HIF"},
-	[QDF_MODULE_ID_TXRX] = {QDF_DEFAULT_TRACE_LEVEL, "TRX"},
-	[QDF_MODULE_ID_HTT] = {QDF_DEFAULT_TRACE_LEVEL, "HTT"},
-	[QDF_MODULE_ID_SERIALIZATION] = {QDF_DEFAULT_TRACE_LEVEL, "SER"},
-	[QDF_MODULE_ID_REGULATORY] = {QDF_DEFAULT_TRACE_LEVEL, "REG"},
-};
-
 #ifdef TRACE_RECORD
 /* Static and Global variables */
 static spinlock_t ltrace_lock;
@@ -141,151 +101,6 @@ static struct s_qdf_dp_trace_data g_qdf_dp_trace_data;
 static tp_qdf_dp_trace_cb qdf_dp_trace_cb_table[QDF_DP_TRACE_MAX + 1];
 #endif
 
-/**
- * qdf_trace_set_level() - Set the trace level for a particular module
- * @module: Module id
- * @level : trace level
- *
- * Trace level is a member of the QDF_TRACE_LEVEL enumeration indicating
- * the severity of the condition causing the trace message to be issued.
- * More severe conditions are more likely to be logged.
- *
- * This is an external API that allows trace levels to be set for each module.
- *
- * Return:  None
- */
-void qdf_trace_set_level(QDF_MODULE_ID module, QDF_TRACE_LEVEL level)
-{
-	/* make sure the caller is passing in a valid LEVEL */
-	if (level >= QDF_TRACE_LEVEL_MAX) {
-		pr_err("%s: Invalid trace level %d passed in!\n", __func__,
-		       level);
-		return;
-	}
-
-	/* Treat 'none' differently.  NONE means we have to run off all
-	 * the bits in the bit mask so none of the traces appear. Anything
-	 * other than 'none' means we need to turn ON a bit in the bitmask
-	 */
-	if (QDF_TRACE_LEVEL_NONE == level)
-		g_qdf_trace_info[module].module_trace_level =
-			QDF_TRACE_LEVEL_NONE;
-	else
-		/* set the desired bit in the bit mask for the module trace
-		 * level
-		 */
-		g_qdf_trace_info[module].module_trace_level |=
-			QDF_TRACE_LEVEL_TO_MODULE_BITMASK(level);
-}
-qdf_export_symbol(qdf_trace_set_level);
-
-/**
- * qdf_trace_set_module_trace_level() - Set module trace level
- * @module: Module id
- * @level: Trace level for a module, as a bitmask as per 'module_trace_info'
- *
- * Sets the module trace level where the trace level is given as a bit mask
- *
- * Return: None
- */
-void qdf_trace_set_module_trace_level(QDF_MODULE_ID module, uint32_t level)
-{
-	if (module < 0 || module >= QDF_MODULE_ID_MAX) {
-		pr_err("%s: Invalid module id %d passed\n", __func__, module);
-		return;
-	}
-	g_qdf_trace_info[module].module_trace_level = level;
-}
-qdf_export_symbol(qdf_trace_set_module_trace_level);
-
-/**
- * qdf_trace_set_value() - Set module trace value
- * @module: Module id
- * @level: Trace level for a module, as a bitmask as per 'module_trace_info'
- * @on: set/clear the desired bit in the bit mask
- *
- * Return: None
- */
-void qdf_trace_set_value(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
-			 uint8_t on)
-{
-	/* make sure the caller is passing in a valid LEVEL */
-	if (level < 0 || level >= QDF_TRACE_LEVEL_MAX) {
-		pr_err("%s: Invalid trace level %d passed in!\n", __func__,
-		       level);
-		return;
-	}
-
-	/* make sure the caller is passing in a valid module */
-	if (module < 0 || module >= QDF_MODULE_ID_MAX) {
-		pr_err("%s: Invalid module id %d passed in!\n", __func__,
-		       module);
-		return;
-	}
-
-	/* Treat 'none' differently.  NONE means we have to turn off all
-	 * the bits in the bit mask so none of the traces appear
-	 */
-	if (QDF_TRACE_LEVEL_NONE == level) {
-		g_qdf_trace_info[module].module_trace_level =
-			QDF_TRACE_LEVEL_NONE;
-	}
-	/* Treat 'All' differently.  All means we have to turn on all
-	 * the bits in the bit mask so all of the traces appear
-	 */
-	else if (QDF_TRACE_LEVEL_ALL == level) {
-		g_qdf_trace_info[module].module_trace_level = 0xFFFF;
-	} else {
-		if (on)
-			/* set the desired bit in the bit mask for the module
-			 * trace level
-			 */
-			g_qdf_trace_info[module].module_trace_level |=
-				QDF_TRACE_LEVEL_TO_MODULE_BITMASK(level);
-		else
-			/* clear the desired bit in the bit mask for the module
-			 * trace level
-			 */
-			g_qdf_trace_info[module].module_trace_level &=
-				~(QDF_TRACE_LEVEL_TO_MODULE_BITMASK(level));
-	}
-}
-qdf_export_symbol(qdf_trace_set_value);
-
-/**
- * qdf_trace_get_level() - get the trace level
- * @module: module Id
- * @level: trace level
- *
- * This is an external API that returns a bool value to signify if a
- * particular trace level is set for the specified module.
- * A member of the QDF_TRACE_LEVEL enumeration indicating the severity
- * of the condition causing the trace message to be issued.
- *
- * Note that individual trace levels are the only valid values
- * for this API.  QDF_TRACE_LEVEL_NONE and QDF_TRACE_LEVEL_ALL
- * are not valid input and will return false
- *
- * Return:
- * false - the specified trace level for the specified module is OFF
- * true - the specified trace level for the specified module is ON
- */
-bool qdf_trace_get_level(QDF_MODULE_ID module, QDF_TRACE_LEVEL level)
-{
-	bool trace_on = false;
-
-	if ((QDF_TRACE_LEVEL_NONE == level) ||
-	    (QDF_TRACE_LEVEL_ALL == level) || (level >= QDF_TRACE_LEVEL_MAX)) {
-		trace_on = false;
-	} else {
-		trace_on = (level & g_qdf_trace_info[module].module_trace_level)
-			  ? true : false;
-	}
-
-	return trace_on;
-}
-qdf_export_symbol(qdf_trace_get_level);
-
 /**
  * qdf_snprintf() - wrapper function to snprintf
  * @str_buffer: string Buffer