From 17720241d47f60d0a3f79fb90876f1d86bc20160 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Fri, 10 Mar 2017 15:48:35 -0800 Subject: [PATCH] qcacmn: Replace wlanLoggingFEToConsole to wlanLoggingToConsole Currently the config ini "wlanLoggingFEToConsole" specifically talks about enabling the logs to kmsg for FATAL and ERROR logs. This cfg.ini item should not be specific to any log level, instead it should just depict whether logging to console should be enabled or not. Hence change wlanLoggingFEToConsole to wlanLoggingToConsole. Change-Id: I54e340ed58891175b53ac2d0137d15a2baea1c9f CRs-Fixed: 2017427 --- utils/logging/inc/wlan_logging_sock_svc.h | 2 +- utils/logging/src/wlan_logging_sock_svc.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/logging/inc/wlan_logging_sock_svc.h b/utils/logging/inc/wlan_logging_sock_svc.h index 9c450238539d..b08e32d50551 100644 --- a/utils/logging/inc/wlan_logging_sock_svc.h +++ b/utils/logging/inc/wlan_logging_sock_svc.h @@ -40,7 +40,7 @@ int wlan_logging_sock_init_svc(void); int wlan_logging_sock_deinit_svc(void); -int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf); +int wlan_logging_sock_activate_svc(int log_to_console, int num_buf); int wlan_logging_sock_deactivate_svc(void); int wlan_log_to_user(QDF_TRACE_LEVEL log_level, char *to_be_sent, int length); diff --git a/utils/logging/src/wlan_logging_sock_svc.c b/utils/logging/src/wlan_logging_sock_svc.c index d0ad14fdf75a..b5848fd211f5 100644 --- a/utils/logging/src/wlan_logging_sock_svc.c +++ b/utils/logging/src/wlan_logging_sock_svc.c @@ -141,7 +141,7 @@ struct pkt_stats_msg { struct wlan_logging { /* Log Fatal and ERROR to console */ - bool log_fe_to_console; + bool log_to_console; /* Number of buffers to be used for logging */ int num_buf; /* Lock to synchronize access to shared logging resource */ @@ -463,7 +463,7 @@ int wlan_log_to_user(QDF_TRACE_LEVEL log_level, char *to_be_sent, int length) wake_up_interruptible(&gwlan_logging.wait_queue); } - if (gwlan_logging.log_fe_to_console + if (gwlan_logging.log_to_console && ((QDF_TRACE_LEVEL_FATAL == log_level) || (QDF_TRACE_LEVEL_ERROR == log_level))) { print_to_console(tbuf, to_be_sent); @@ -980,7 +980,7 @@ static void unregister_logging_sock_handler(void) #endif -int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf) +int wlan_logging_sock_activate_svc(int log_to_console, int num_buf) { int i = 0, j, pkt_stats_size; unsigned long irq_flag; @@ -995,7 +995,7 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf) qdf_mem_zero(gplog_msg, (num_buf * sizeof(struct log_msg))); - gwlan_logging.log_fe_to_console = !!log_fe_to_console; + gwlan_logging.log_to_console = !!log_to_console; gwlan_logging.num_buf = num_buf; spin_lock_irqsave(&gwlan_logging.spin_lock, irq_flag);