qcacld-3.0: Improve suspend/resume logging

Ensure logging messages in the suspend/resume paths use hdd_err() for failure
and hdd_info() for success. Also, evaluate existing messages, and polish if
appropriate.

Change-Id: I8b9509cf631058602ad6e8cd06a013af63624f00
CRs-Fixed: 1070223
This commit is contained in:
Dustin Brown
2016-09-22 15:06:19 -07:00
committed by qcabuildsw
parent 6126946bbb
commit 2d228235da
3 changed files with 18 additions and 20 deletions

View File

@@ -541,8 +541,7 @@ static int __wlan_hdd_bus_suspend(pm_message_t state)
goto done;
}
err = qdf_status_to_os_return(
ol_txrx_bus_suspend());
err = qdf_status_to_os_return(ol_txrx_bus_suspend());
if (err)
goto done;
@@ -554,8 +553,8 @@ static int __wlan_hdd_bus_suspend(pm_message_t state)
if (err)
goto resume_wma;
hdd_err("suspend done");
return err;
hdd_info("suspend done");
return 0;
resume_wma:
status = wma_bus_resume();
@@ -632,14 +631,14 @@ int __wlan_hdd_bus_suspend_noirq(void)
goto resume_hif_noirq;
hdd_info("suspend_noirq done");
return err;
return 0;
resume_hif_noirq:
status = hif_bus_resume_noirq(hif_ctx);
QDF_BUG(!status);
done:
if (err == -EAGAIN)
hdd_err("firmware not ready for suspend, try again");
hdd_err("Firmware attempting wakeup, try again");
else
hdd_err("suspend_noirq failed, status = %d", err);
return err;
@@ -706,7 +705,7 @@ static int __wlan_hdd_bus_resume(void)
status = ol_txrx_bus_resume();
QDF_BUG(!status);
hdd_err("resume done");
hdd_info("resume done");
return status;
}

View File

@@ -1285,16 +1285,16 @@ static void hdd_resume_wlan(void)
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
QDF_STATUS status;
hdd_notice("WLAN being resumed by OS");
hdd_info("WLAN being resumed by OS");
pHddCtx = cds_get_context(QDF_MODULE_ID_HDD);
if (!pHddCtx) {
hdd_alert("HDD context is Null");
hdd_err("HDD context is Null");
return;
}
if (cds_is_driver_recovering()) {
hdd_warn("Recovery in Progress. State: 0x%x Ignore resume!!!",
hdd_err("Recovery in Progress. State: 0x%x Ignore resume!!!",
cds_get_driver_state());
return;
}
@@ -1309,7 +1309,7 @@ static void hdd_resume_wlan(void)
pAdapter = pAdapterNode->pAdapter;
/* wake the tx queues */
hdd_notice("Enabling queues");
hdd_info("Enabling queues");
wlan_hdd_netif_queue_control(pAdapter,
WLAN_WAKE_ALL_NETIF_QUEUE,
WLAN_CONTROL_PATH);
@@ -1698,7 +1698,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
pHddCtx->isWiphySuspended = false;
if (true != pHddCtx->isSchedScanUpdatePending) {
qdf_spin_unlock(&pHddCtx->sched_scan_lock);
hdd_notice("Return resume is not due to PNO indication");
hdd_info("Return resume is not due to PNO indication");
return 0;
}
/* Reset flag to avoid updatating cfg80211 data old results again */
@@ -1728,7 +1728,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
cfg80211_sched_scan_results(pHddCtx->wiphy);
}
hdd_notice("cfg80211 scan result database updated");
hdd_info("cfg80211 scan result database updated");
EXIT();
return result;
}
@@ -1736,7 +1736,6 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
pAdapterNode = pNext;
}
hdd_notice("Failed to find Adapter");
EXIT();
return result;
}
@@ -1831,7 +1830,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
true ==
WLAN_HDD_GET_AP_CTX_PTR(pAdapter)->
dfs_cac_block_tx) {
hdd_notice("RADAR detection in progress, do not allow suspend");
hdd_err("RADAR detection in progress, do not allow suspend");
return -EAGAIN;
} else if (!pHddCtx->config->enableSapSuspend) {
/* return -EOPNOTSUPP if SAP does not support
@@ -1863,7 +1862,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
if (sme_sta_in_middle_of_roaming
(pHddCtx->hHal, pAdapter->sessionId)) {
hdd_notice("Roaming in progress, do not allow suspend");
hdd_err("Roaming in progress, do not allow suspend");
return -EAGAIN;
}
@@ -1890,7 +1889,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
* firmware to avoid any race conditions.
*/
if (hdd_ipa_suspend(pHddCtx)) {
hdd_notice("IPA not ready to suspend!");
hdd_err("IPA not ready to suspend!");
return -EAGAIN;
}

View File

@@ -4562,7 +4562,7 @@ QDF_STATUS wma_suspend_req(tp_wma_handle wma, enum qdf_suspend_type type)
wmi_set_runtime_pm_inprogress(wma->wmi_handle, true);
if (wma_is_wow_applicable(wma)) {
WMA_LOGE("WOW Suspend");
WMA_LOGI("WOW Suspend");
wma_apply_lphb(wma);
wma_configure_dynamic_wake_events(wma);
@@ -6414,7 +6414,7 @@ static int __wma_bus_suspend(enum qdf_suspend_type type)
}
if (type == QDF_SYSTEM_SUSPEND)
WMA_LOGE("%s: wow mode selected %d", __func__,
WMA_LOGI("%s: wow mode selected %d", __func__,
wma_is_wow_mode_selected(handle));
if (wma_is_wow_mode_selected(handle)) {
@@ -6469,7 +6469,7 @@ int __wma_bus_resume(WMA_HANDLE handle)
tp_wma_handle wma = handle;
QDF_STATUS status;
WMA_LOGE("%s: wow mode %d", __func__, wow_mode);
WMA_LOGI("%s: wow mode %d", __func__, wow_mode);
wma->wow_initial_wake_up = false;