diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 4ce49bddbbf4..20af8602f2e1 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -226,26 +226,18 @@ #define WLAN_CHIP_VERSION "WCNSS" +#define hdd_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_HDD, params) +#define hdd_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_HDD, params) +#define hdd_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_HDD, params) +#define hdd_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_HDD, params) +#define hdd_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_HDD, params) + #define hdd_alert_rl(params...) QDF_TRACE_FATAL_RL(QDF_MODULE_ID_HDD, params) #define hdd_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_HDD, params) #define hdd_warn_rl(params...) QDF_TRACE_WARN_RL(QDF_MODULE_ID_HDD, params) #define hdd_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_HDD, params) #define hdd_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_HDD, params) -#define hdd_log(level, args...) QDF_TRACE(QDF_MODULE_ID_HDD, level, ## args) -#define hdd_logfl(level, format, args...) hdd_log(level, FL(format), ## args) - -#define hdd_alert(format, args...) \ - hdd_logfl(QDF_TRACE_LEVEL_FATAL, format, ## args) -#define hdd_err(format, args...) \ - hdd_logfl(QDF_TRACE_LEVEL_ERROR, format, ## args) -#define hdd_warn(format, args...) \ - hdd_logfl(QDF_TRACE_LEVEL_WARN, format, ## args) -#define hdd_info(format, args...) \ - hdd_logfl(QDF_TRACE_LEVEL_INFO, format, ## args) -#define hdd_debug(format, args...) \ - hdd_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args) - #define hdd_enter() hdd_debug("enter") #define hdd_enter_dev(dev) hdd_debug("enter(%s)", (dev)->name) #define hdd_exit() hdd_debug("exit") diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 6b9290c9b9c7..ce324deb7e12 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -10659,9 +10659,8 @@ static int hdd_validate_avoid_freq_chanlist( if (ch_idx == hdd_ctx->unsafe_channel_list[ unsafe_channel_index]) { - hdd_log(QDF_TRACE_LEVEL_INFO, - "Duplicate channel %d", - ch_idx); + hdd_info("Duplicate channel %d", + ch_idx); ch_found = true; break; } @@ -10723,8 +10722,7 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy, channel_list = (struct ch_avoid_ind_type *)data; if (!channel_list) { - hdd_log(QDF_TRACE_LEVEL_ERROR, - "Avoid frequency channel list empty"); + hdd_err("Avoid frequency channel list empty"); return -EINVAL; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index e9eafd3ff7de..7287580b6f17 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7365,18 +7365,17 @@ void wlan_hdd_display_tx_rx_histogram(struct hdd_context *hdd_ctx) for (i = 0; i < NUM_TX_RX_HISTOGRAM; i++) { /* using hdd_log to avoid printing function name */ if (hdd_ctx->hdd_txrx_hist[i].qtime > 0) - hdd_log(QDF_TRACE_LEVEL_DEBUG, - "[%3d][%15llu]: %6llu, %6llu, %s, %s, %s", - i, hdd_ctx->hdd_txrx_hist[i].qtime, - hdd_ctx->hdd_txrx_hist[i].interval_rx, - hdd_ctx->hdd_txrx_hist[i].interval_tx, - convert_level_to_string( + hdd_debug("[%3d][%15llu]: %6llu, %6llu, %s, %s, %s", + i, hdd_ctx->hdd_txrx_hist[i].qtime, + hdd_ctx->hdd_txrx_hist[i].interval_rx, + hdd_ctx->hdd_txrx_hist[i].interval_tx, + convert_level_to_string( hdd_ctx->hdd_txrx_hist[i]. next_vote_level), - convert_level_to_string( + convert_level_to_string( hdd_ctx->hdd_txrx_hist[i]. next_rx_level), - convert_level_to_string( + convert_level_to_string( hdd_ctx->hdd_txrx_hist[i]. next_tx_level)); } @@ -7531,14 +7530,13 @@ wlan_hdd_display_netif_queue_history(struct hdd_context *hdd_ctx, pause_delta = delta; /* using hdd_log to avoid printing function name */ - hdd_log(QDF_TRACE_LEVEL_DEBUG, - "%s: %d: %d: %ums", - hdd_reason_type_to_string(i), - adapter->queue_oper_stats[i].pause_count, - adapter->queue_oper_stats[i].unpause_count, - qdf_system_ticks_to_msecs( - adapter->queue_oper_stats[i].total_pause_time + - pause_delta)); + hdd_debug("%s: %d: %d: %ums", + hdd_reason_type_to_string(i), + adapter->queue_oper_stats[i].pause_count, + adapter->queue_oper_stats[i].unpause_count, + qdf_system_ticks_to_msecs( + adapter->queue_oper_stats[i].total_pause_time + + pause_delta)); } hdd_debug("Netif queue operation history:"); @@ -7551,15 +7549,14 @@ wlan_hdd_display_netif_queue_history(struct hdd_context *hdd_ctx, /* using hdd_log to avoid printing function name */ if (adapter->queue_oper_history[i].time == 0) continue; - hdd_log(QDF_TRACE_LEVEL_DEBUG, - "%d: %u: %s: %s: %x", - i, qdf_system_ticks_to_msecs( + hdd_debug("%d: %u: %s: %s: %x", + i, qdf_system_ticks_to_msecs( adapter->queue_oper_history[i].time), - hdd_action_type_to_string( - adapter->queue_oper_history[i].netif_action), - hdd_reason_type_to_string( - adapter->queue_oper_history[i].netif_reason), - adapter->queue_oper_history[i].pause_map); + hdd_action_type_to_string( + adapter->queue_oper_history[i].netif_action), + hdd_reason_type_to_string( + adapter->queue_oper_history[i].netif_reason), + adapter->queue_oper_history[i].pause_map); } } } diff --git a/core/hdd/src/wlan_hdd_napi.c b/core/hdd/src/wlan_hdd_napi.c index e98fc8cee2bc..fe3088d8a9c8 100644 --- a/core/hdd/src/wlan_hdd_napi.c +++ b/core/hdd/src/wlan_hdd_napi.c @@ -1,9 +1,8 @@ /* - * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * - * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all @@ -482,8 +481,7 @@ int hdd_display_napi_stats(void) hdd_err("%s unable to retrieve napi structure", __func__); return -EFAULT; } - hdd_log(QDF_TRACE_LEVEL_INFO_LOW, - "[NAPI %u][BL %d]: scheds polls comps done t-lim p-lim corr napi-buckets(%d)", + hdd_debug("[NAPI %u][BL %d]: scheds polls comps done t-lim p-lim corr napi-buckets(%d)", napid->napi_mode, hif_napi_cpu_blacklist(napid, BLACKLIST_QUERY), QCA_NAPI_NUM_BUCKETS); @@ -506,8 +504,7 @@ int hdd_display_napi_stats(void) } if (napis->napi_schedules != 0) - hdd_log(QDF_TRACE_LEVEL_INFO_LOW, - "NAPI[%2d]CPU[%d]: %7d %7d %7d %7d %5d %5d %5d %s", + hdd_debug("NAPI[%2d]CPU[%d]: %7d %7d %7d %7d %5d %5d %5d %s", i, j, napis->napi_schedules, napis->napi_polls,