From eb61d7e09fa66b3efb2c59ccb7b83e710b291c9a Mon Sep 17 00:00:00 2001 From: Manikandan Mohan Date: Mon, 5 Mar 2018 16:23:21 -0800 Subject: [PATCH] qcacmn: Add WLAN Module name as log prefix Add WLAN module name as logging prefix in multiple wlan driver compilation environment for differentiating the logs pertaining to each driver module. Change-Id: Ib3aeaa280e3beb0de8ceb105e0989cb6004964d6 CRs-fixed: 2197751 --- qdf/linux/src/qdf_trace.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index 4b253d695f0f..f9e27c71dab0 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -2171,6 +2171,18 @@ static inline void print_to_console(char *str_buffer) } #endif +#ifdef MULTI_IF_NAME +static const char *qdf_trace_wlan_modname(void) +{ + return MULTI_IF_NAME; +} +#else +static const char *qdf_trace_wlan_modname(void) +{ + return "wlan"; +} +#endif + void qdf_trace_msg_cmn(unsigned int idx, QDF_MODULE_ID category, QDF_TRACE_LEVEL verbose, @@ -2223,7 +2235,7 @@ void qdf_trace_msg_cmn(unsigned int idx, /* print the prefix string into the string buffer... */ n = scnprintf(str_buffer, QDF_TRACE_BUFFER_SIZE, - "wlan: [%d:%2s:%s] ", + "%s: [%d:%2s:%s] ", qdf_trace_wlan_modname(), in_interrupt() ? 0 : current->pid, VERBOSE_STR[verbose], g_qdf_category_name[category].category_name_str);