summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_driver_ops.c54
-rw-r--r--core/hdd/src/wlan_hdd_power.c3
2 files changed, 41 insertions, 16 deletions
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index a3686133c6c7..332bb3531005 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -512,38 +512,49 @@ static int __wlan_hdd_bus_suspend(pm_message_t state, uint32_t wow_flags)
{
hdd_context_t *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
void *hif_ctx;
- int err = wlan_hdd_validate_context(hdd_ctx);
+ int err;
int status;
- hdd_info("event %d", state.event);
+ hdd_info("starting bus suspend; event:%d, flags:%u",
+ state.event, wow_flags);
- if (err)
+ err = wlan_hdd_validate_context(hdd_ctx);
+ if (err) {
+ hdd_err("Invalid hdd context");
goto done;
+ }
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
- hdd_info("Driver Module closed return success");
+ hdd_info("Driver Module closed; return success");
return 0;
}
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
if (NULL == hif_ctx) {
+ hdd_err("Failed to get hif context");
err = -EINVAL;
goto done;
}
err = qdf_status_to_os_return(ol_txrx_bus_suspend());
- if (err)
+ if (err) {
+ hdd_err("Failed tx/rx bus suspend");
goto done;
+ }
err = wma_bus_suspend(wow_flags);
- if (err)
+ if (err) {
+ hdd_err("Failed wma bus suspend");
goto resume_oltxrx;
+ }
err = hif_bus_suspend(hif_ctx);
- if (err)
+ if (err) {
+ hdd_err("Failed hif bus suspend");
goto resume_wma;
+ }
- hdd_info("suspend done");
+ hdd_info("bus suspend succeeded");
return 0;
resume_wma:
@@ -676,34 +687,45 @@ static int __wlan_hdd_bus_resume(void)
if (cds_is_driver_recovering())
return 0;
+ hdd_info("starting bus resume");
+
status = wlan_hdd_validate_context(hdd_ctx);
- if (status)
+ if (status) {
+ hdd_err("Invalid hdd context");
return status;
+ }
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
- hdd_info("Driver Module closed return success");
+ hdd_info("Driver Module closed; return success");
return 0;
}
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
- if (NULL == hif_ctx)
+ if (NULL == hif_ctx) {
+ hdd_err("Failed to get hif context");
return -EINVAL;
+ }
status = hif_bus_resume(hif_ctx);
- if (status)
+ if (status) {
+ hdd_err("Failed hif bus resume");
goto out;
+ }
status = wma_bus_resume();
- if (status)
+ if (status) {
+ hdd_err("Failed wma bus resume");
goto out;
+ }
qdf_status = ol_txrx_bus_resume();
status = qdf_status_to_os_return(qdf_status);
- if (status)
+ if (status) {
+ hdd_err("Failed tx/rx bus resume");
goto out;
+ }
- hdd_info("resume done");
-
+ hdd_info("bus resume succeeded");
return 0;
out:
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index 9576503586c3..2936eb4b6536 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -2493,6 +2493,8 @@ static void __hdd_wlan_fake_apps_resume(struct wiphy *wiphy,
QDF_BUG(resume_err == 0);
dev->watchdog_timeo = HDD_TX_TIMEOUT;
+
+ hdd_info("Unit-test resume succeeded");
}
/**
@@ -2559,6 +2561,7 @@ int hdd_wlan_fake_apps_suspend(struct wiphy *wiphy, struct net_device *dev)
*/
dev->watchdog_timeo = INT_MAX;
+ hdd_info("Unit-test suspend succeeded");
return 0;
enable_irqs_and_bus_resume: