diff --git a/core/hdd/inc/hdd_config.h b/core/hdd/inc/hdd_config.h index 9c9fb5a2915f..da2fe4226171 100644 --- a/core/hdd/inc/hdd_config.h +++ b/core/hdd/inc/hdd_config.h @@ -339,16 +339,33 @@ enum hdd_dot11_mode { /* * - * wlanLoggingToConsole - Wlan logging to console - * @Min: 0 - * @Max: 1 - * @Default: 1 + * wlanConsoleLogLevelsBitmap - Bitmap to enable/disable console log levels + * @Min: 0x00000000 + * @Max: 0x000003ff + * @Default: 0x0000001e + * + * This INI is used to enable/disable console logs for specific log level. + * + * bit-0: Reserved + * bit-1: QDF_TRACE_LEVEL_FATAL + * bit-2: QDF_TRACE_LEVEL_ERROR + * bit-3: QDF_TRACE_LEVEL_WARN + * bit-4: QDF_TRACE_LEVEL_INFO + * bit-5: QDF_TRACE_LEVEL_INFO_HIGH + * bit-6: QDF_TRACE_LEVEL_INFO_MED + * bit-7: QDF_TRACE_LEVEL_INFO_LOW + * bit-8: QDF_TRACE_LEVEL_DEBUG + * bit-9: QDF_TRACE_LEVEL_TRACE + * bit-10 to bit-31: Reserved * * */ -#define CFG_WLAN_LOGGING_CONSOLE_SUPPORT CFG_INI_BOOL( \ - "wlanLoggingToConsole", \ - 1, \ +#define CFG_WLAN_LOGGING_CONSOLE_SUPPORT CFG_INI_UINT( \ + "wlanConsoleLogLevelsBitmap", \ + 0x00000000, \ + 0x000003ff, \ + 0x0000001e, \ + CFG_VALUE_OR_DEFAULT, \ "Wlan logging to console") #define CFG_WLAN_LOGGING_SUPPORT_ALL \ diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index fcdd34287d54..ce50f635bae2 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -137,7 +137,7 @@ struct hdd_config { #ifdef WLAN_LOGGING_SOCK_SVC_ENABLE /* WLAN Logging */ bool wlan_logging_enable; - bool wlan_logging_to_console; + uint32_t wlan_console_log_levels; uint8_t host_log_custom_nl_proto; #endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */ diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 4721cb3e84b7..9007ff98794b 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -11268,8 +11268,7 @@ static void hdd_psoc_idle_timeout_callback(void *priv) #ifdef WLAN_LOGGING_SOCK_SVC_ENABLE static void hdd_set_wlan_logging(struct hdd_context *hdd_ctx) { - wlan_logging_set_log_to_console(hdd_ctx->config-> - wlan_logging_to_console); + wlan_set_console_log_levels(hdd_ctx->config->wlan_console_log_levels); wlan_logging_set_active(hdd_ctx->config->wlan_logging_enable); } #else @@ -11283,7 +11282,7 @@ static void hdd_init_wlan_logging_params(struct hdd_config *config, { config->wlan_logging_enable = cfg_get(psoc, CFG_WLAN_LOGGING_SUPPORT); - config->wlan_logging_to_console = + config->wlan_console_log_levels = cfg_get(psoc, CFG_WLAN_LOGGING_CONSOLE_SUPPORT); config->host_log_custom_nl_proto = cfg_get(psoc, CFG_HOST_LOG_CUSTOM_NETLINK_PROTO);