qcacmn: Add shared print_ctrl_obj for qdf_trace_msg

At this point lot of Win code already uses QDF_TRACE macro. It will be
difficult to translate QDF_TRACE to qdf_trace_msg unless all the modules
(already using QDF_TRACE) make changes to use the qdf_print_ctrl
framework. Until that happens, we can have a shared object temporarily
so that wlan_log_to_user and hence user space logging of messages can be
in place

Change-Id: Ia149b86de8c2c36ed1c8508570b31db25f6bc41e
CRs-Fixed: 2018767
This commit is contained in:
Adil Saeed Musthafa 2017-03-13 12:13:47 -07:00 • committed by Sandeep Puligilla
commit 3318807269
7 changed files with 110 additions and 10 deletions

View file

@ -351,6 +351,16 @@ static int wlan_add_user_log_radio_time_stamp(char *tbuf, size_t tbuf_sz,
}
#endif
#ifdef CONFIG_MCL
static inline void print_to_console(char *tbuf, char *to_be_sent)
{
pr_info("%s %s\n", tbuf, to_be_sent);
}
#else
#define print_to_console(str1, str2)
#endif
int wlan_log_to_user(QDF_TRACE_LEVEL log_level, char *to_be_sent, int length)
{
/* Add the current time stamp */
@ -456,7 +466,7 @@ int wlan_log_to_user(QDF_TRACE_LEVEL log_level, char *to_be_sent, int length)
if (gwlan_logging.log_fe_to_console
&& ((QDF_TRACE_LEVEL_FATAL == log_level)
|| (QDF_TRACE_LEVEL_ERROR == log_level))) {
pr_info("%s %s\n", tbuf, to_be_sent);
print_to_console(tbuf, to_be_sent);
}
return 0;