qcacld-3.0: Migrate HDD to level-specific log wrappers

Change Ie062ada403f8a31aebcde691396987ad9e5352b5 introduced level-
specific logging wrappers to support compiling out entire levels of
logging messages. Migrate the HDD logging wrappers to consume these
new APIs instead of QDF_TRACE.

Change-Id: I20dd9e4844ef9b2170cee0297ef52fd4d27780ff
CRs-Fixed: 2208572
This commit is contained in:
Dustin Brown 2018-03-14 15:03:55 -07:00 • committed by nshrivas
commit 632af71bb3
4 changed files with 33 additions and 49 deletions

View file

@ -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")

View file

@ -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;
}

View file

@ -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);
}
}
}

View file

@ -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,