|
@@ -1118,8 +1118,13 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params)
|
|
|
hdd_info("starting bus suspend");
|
|
|
|
|
|
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
- if (!hdd_ctx)
|
|
|
- return -ENODEV;
|
|
|
+
|
|
|
+ err = wlan_hdd_validate_context(hdd_ctx);
|
|
|
+ if (err)
|
|
|
+ return err;
|
|
|
+
|
|
|
+ /* Wait for the stop module if already in progress */
|
|
|
+ hdd_psoc_idle_timer_stop(hdd_ctx);
|
|
|
|
|
|
/* If Wifi is off, return success for system suspend */
|
|
|
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
|
|
@@ -1127,9 +1132,6 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
- err = wlan_hdd_validate_context(hdd_ctx);
|
|
|
- if (err)
|
|
|
- return err;
|
|
|
|
|
|
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
|
|
if (!hif_ctx)
|