Browse Source

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
Rajeev Kumar 6 năm trước cách đây
mục cha
commit
83592e020b
1 tập tin đã thay đổi với 9 bổ sung10 xóa
  1. 9 10
      core/hdd/src/wlan_hdd_power.c

+ 9 - 10
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 ");