From 1e3ec6b86d8f259dd18969bd62b2f06d3f9bf6f8 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Tue, 7 Aug 2018 11:18:47 -0700 Subject: [PATCH] qcacld-3.0: Reduce logs with high occurrence Several logs show up repeatedly in dmesg. Reduce the following logs to help avoid spamming dmesg: * wlan_ipa_wdi_meter_notifier_cb() * hdd_print_netdev_txq_status() * hdd_wlan_start_modules() * hdd_wlan_stop_modules() * csr_nonscan_pending_ll_peek_head() * sme_qos_statustype() Change-Id: Ic5ca059f258dee92ffaa4b0ecca47df41b424c11 CRs-Fixed: 2292710 --- components/ipa/core/src/wlan_ipa_stats.c | 2 +- core/hdd/src/wlan_hdd_cfg80211.c | 2 +- core/hdd/src/wlan_hdd_main.c | 26 ++++++++---------------- core/sme/src/csr/csr_util.c | 5 ++--- core/sme/src/qos/sme_qos.c | 4 ++-- 5 files changed, 15 insertions(+), 24 deletions(-) diff --git a/components/ipa/core/src/wlan_ipa_stats.c b/components/ipa/core/src/wlan_ipa_stats.c index 00a8e19d0281..5a25430f2765 100644 --- a/components/ipa/core/src/wlan_ipa_stats.c +++ b/components/ipa/core/src/wlan_ipa_stats.c @@ -863,7 +863,7 @@ void wlan_ipa_wdi_meter_notifier_cb(qdf_ipa_wdi_meter_evt_type_t evt, qdf_ipa_set_wifi_quota_t *ipa_set_quota; QDF_STATUS status; - ipa_info("event=%d", evt); + ipa_debug("event=%d", evt); iface_ctx = wlan_ipa_get_iface(ipa_ctx, QDF_STA_MODE); if (!iface_ctx) { diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 7d1880f11d39..07f7a99209aa 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -19909,7 +19909,7 @@ static void hdd_print_netdev_txq_status(struct net_device *dev) for (i = 0; i < dev->num_tx_queues; i++) { struct netdev_queue *txq = netdev_get_tx_queue(dev, i); - hdd_info("netdev tx queue[%u] state: 0x%lx", i, txq->state); + hdd_debug("netdev tx queue[%u] state: 0x%lx", i, txq->state); } } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index f0b6b388bb24..3110e2c6af49 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2789,8 +2789,6 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) void *hif_ctx; struct target_psoc_info *tgt_hdl; - hdd_debug("state:%d reinit:%d", hdd_ctx->driver_status, reinit); - qdf_dev = cds_get_context(QDF_MODULE_ID_QDF_DEVICE); if (!qdf_dev) { hdd_err("QDF Device Context is Invalid return"); @@ -2802,7 +2800,7 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) mutex_lock(&hdd_ctx->iface_change_lock); if (hdd_ctx->driver_status == DRIVER_MODULES_ENABLED) { mutex_unlock(&hdd_ctx->iface_change_lock); - hdd_info("Driver modules already Enabled"); + hdd_debug("Driver modules already Enabled"); hdd_exit(); return 0; } @@ -2822,7 +2820,7 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) if (!reinit && !unint) { ret = pld_power_on(qdf_dev->dev); if (ret) { - hdd_err("Failed to Powerup the device; errno: %d", + hdd_err("Failed to power up device; errno:%d", ret); goto release_lock; } @@ -2944,7 +2942,7 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) break; default: - hdd_err("WLAN start invoked in wrong state! :%d\n", + QDF_DEBUG_PANIC("Unknown driver state:%d", hdd_ctx->driver_status); ret = -EINVAL; goto release_lock; @@ -10809,8 +10807,6 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) struct target_psoc_info *tgt_hdl; hdd_enter(); - hdd_alert("stop WLAN module: entering driver status=%d", - hdd_ctx->driver_status); hdd_deregister_policy_manager_callback(hdd_ctx->hdd_psoc); @@ -10840,21 +10836,20 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER); hdd_ctx->stop_modules_in_progress = false; cds_set_module_stop_in_progress(false); + return 0; } } - hdd_info("Present Driver Status: %d", hdd_ctx->driver_status); - /* free user wowl patterns */ hdd_free_user_wowl_ptrns(); switch (hdd_ctx->driver_status) { case DRIVER_MODULES_UNINITIALIZED: - hdd_info("Modules not initialized just return"); + hdd_debug("Modules not initialized just return"); goto done; case DRIVER_MODULES_CLOSED: - hdd_info("Modules already closed"); + hdd_debug("Modules already closed"); goto done; case DRIVER_MODULES_ENABLED: hdd_info("Wlan transitioning (OPENED <- ENABLED)"); @@ -10875,9 +10870,8 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) hdd_info("Wlan transitioning (CLOSED <- OPENED)"); break; default: - hdd_err("Trying to stop wlan in a wrong state: %d", + QDF_DEBUG_PANIC("Unknown driver state:%d", hdd_ctx->driver_status); - QDF_ASSERT(0); ret = -EINVAL; goto done; } @@ -10944,9 +10938,9 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) if (IS_IDLE_STOP && cds_is_target_ready()) { ret = pld_power_off(qdf_ctx->dev); if (ret) - hdd_err("CNSS power down failed put device into Low power mode:%d", - ret); + hdd_err("Failed to power down device; errno:%d", ret); } + /* Free the cache channels of the command SET_DISABLE_CHANNEL_LIST */ wlan_hdd_free_cache_channels(hdd_ctx); @@ -10962,8 +10956,6 @@ done: hdd_ctx->stop_modules_in_progress = false; cds_set_module_stop_in_progress(false); mutex_unlock(&hdd_ctx->iface_change_lock); - hdd_alert("stop WLAN module: exit driver status=%d", - hdd_ctx->driver_status); hdd_exit(); diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 5809f288c817..e5914a4adf59 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -521,10 +521,9 @@ tListElem *csr_nonscan_pending_ll_peek_head(struct sAniSirGlobal *mac_ctx, cmd = wlan_serialization_peek_head_pending_cmd_using_psoc(mac_ctx->psoc, false); - if (!cmd) { - sme_err("No cmd found"); + if (!cmd) return NULL; - } + sme_cmd = cmd->umac_cmd; return &sme_cmd->Link; diff --git a/core/sme/src/qos/sme_qos.c b/core/sme/src/qos/sme_qos.c index 08ce59aff430..4aa4299b1f4e 100644 --- a/core/sme/src/qos/sme_qos.c +++ b/core/sme/src/qos/sme_qos.c @@ -2861,9 +2861,9 @@ static enum sme_qos_statustype sme_qos_setup(tpAniSirGlobal pMac, static QDF_STATUS sme_qos_process_set_key_success_ind(tpAniSirGlobal pMac, uint8_t sessionId, void *pEvent_info) { - QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, - "########### Set Key Complete #############"); + sme_debug("Set Key complete"); (void)sme_qos_process_buffered_cmd(sessionId); + return QDF_STATUS_SUCCESS; }