diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index edf587fe51df..e68c930e6687 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1606,11 +1606,6 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) hdd_enter(); - if (hdd_ctx->config->is_wow_disabled) { - hdd_err("wow is disabled"); - return -EINVAL; - } - if (cds_is_driver_recovering()) { hdd_debug("Driver is recovering; Skipping resume"); exit_code = 0; @@ -1629,6 +1624,11 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) goto exit_with_code; } + if (hdd_ctx->config->is_wow_disabled) { + hdd_err("wow is disabled"); + return -EINVAL; + } + if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) { hdd_debug("Driver is not enabled; Skipping resume"); exit_code = 0; @@ -1722,15 +1722,14 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, return -EINVAL; } - if (hdd_ctx->config->is_wow_disabled) { - hdd_err("wow is disabled"); - return -EINVAL; - } - rc = wlan_hdd_validate_context(hdd_ctx); if (0 != rc) return rc; + if (hdd_ctx->config->is_wow_disabled) { + hdd_err("wow is disabled"); + return -EINVAL; + } if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) { hdd_debug("Driver Modules not Enabled ");