qcacld-3.0: Add ini to enable/disable Mtrace logging

Add ini to configure Mtrace log level for all the Modules.

Change-Id: I7b2a2d7c4ebeb9731365bd3a33c340ca74717944
CRs-Fixed: 2310401
This commit is contained in:
Ashish Kumar Dhanotiya 2018-09-04 22:00:14 +05:30 • committed by nshrivas
commit 12f682166b
3 changed files with 44 additions and 1 deletions

View file

@ -5631,6 +5631,16 @@ enum hdd_link_speed_rpt_type {
/* disable debug logs for DP by default */
#define CFG_QDF_TRACE_ENABLE_DP_DEFAULT (0x7f)
#ifdef ENABLE_MTRACE_LOG
/*
* Enable MTRACE for all modules
*/
#define CFG_ENABLE_MTRACE "enable_mtrace"
#define CFG_ENABLE_MTRACE_MIN (0)
#define CFG_ENABLE_MTRACE_MAX (1)
#define CFG_ENABLE_MTRACE_DEFAULT (0)
#endif
#define HDD_MCASTBCASTFILTER_FILTER_NONE 0x00
#define HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST 0x01
#define HDD_MCASTBCASTFILTER_FILTER_ALL_BROADCAST 0x02
@ -14164,7 +14174,9 @@ struct hdd_config {
uint16_t qdf_trace_enable_nan;
uint16_t qdf_trace_enable_regulatory;
uint16_t qdf_trace_enable_cp_stats;
#ifdef ENABLE_MTRACE_LOG
bool enable_mtrace;
#endif
uint16_t nTeleBcnMaxListenInterval;
uint8_t enableBypass11d;
uint8_t enableDFSChnlScan;

View file

@ -1723,6 +1723,15 @@ struct reg_table_entry g_registry_table[] = {
CFG_QDF_TRACE_ENABLE_MIN,
CFG_QDF_TRACE_ENABLE_MAX),
#ifdef ENABLE_MTRACE_LOG
REG_VARIABLE(CFG_ENABLE_MTRACE, WLAN_PARAM_Integer,
struct hdd_config, enable_mtrace,
VAR_FLAGS_OPTIONAL,
CFG_ENABLE_MTRACE_DEFAULT,
CFG_ENABLE_MTRACE_MIN,
CFG_ENABLE_MTRACE_MAX),
#endif
REG_VARIABLE(CFG_TELE_BCN_MAX_LI_NAME, WLAN_PARAM_Integer,
struct hdd_config, nTeleBcnMaxListenInterval,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,

View file

@ -8826,6 +8826,26 @@ static void hdd_override_ini_config(struct hdd_context *hdd_ctx)
}
}
#ifdef ENABLE_MTRACE_LOG
static void hdd_set_mtrace_for_each(struct hdd_context *hdd_ctx)
{
uint8_t module_id = 0;
int qdf_print_idx = -1;
qdf_print_idx = qdf_get_pidx();
for (module_id = 0; module_id < QDF_MODULE_ID_MAX; module_id++)
qdf_print_set_category_verbose(
qdf_print_idx,
module_id, QDF_TRACE_LEVEL_TRACE,
hdd_ctx->config->enable_mtrace);
}
#else
static void hdd_set_mtrace_for_each(struct hdd_context *hdd_ctx)
{
}
#endif
/**
* hdd_set_trace_level_for_each - Set trace level for each INI config
* @hdd_ctx - HDD context
@ -8884,6 +8904,8 @@ static void hdd_set_trace_level_for_each(struct hdd_context *hdd_ctx)
hdd_ctx->config->qdf_trace_enable_cp_stats);
hdd_qdf_trace_enable(QDF_MODULE_ID_MLME, 0xffff);
hdd_set_mtrace_for_each(hdd_ctx);
hdd_cfg_print_global_config(hdd_ctx);
}