From 83592e020b52af3f93edf50dcb048f8f54de5581 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Mon, 6 May 2019 14:33:22 -0700 Subject: [PATCH] qcacld-3.0: Move wow disable check after hdd validate context Commit I0f79731a750c9d759bcd5593f11a740572e9d4ad added wow disable check to disable wow(apps low power) mode features for all modes. Move wow disable check after hdd validate context to make code more readable. There is no issue with current code as well because DSC vdev op protection already protects cfg80211 suspend/resume OPs from SSR and driver unload. Change-Id: I3a39a445e7431735e8ac64fc12b9e7ba71d8816c CRs-Fixed: 2447777 --- core/hdd/src/wlan_hdd_power.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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 ");