Browse Source

qcacld-3.0: return success for resume request during recovery

Linux kernel will shut down all interfaces if it fails
to resume WLAN, considering the firmware crash case in
system suspended state, the interfaces are left in down
state after recovery, which is different from the other
recovery cases, and it doesn't make sense.
To avoid it, return success for system resume request
if recovery is in progress.

Change-Id: I888f4702a10a72e5989bc0e867832b3ce72eec24
CRs-Fixed: 3322055
Yu Wang 2 years ago
parent
commit
858aa9611e
1 changed files with 9 additions and 0 deletions
  1. 9 0
      core/hdd/src/wlan_hdd_power.c

+ 9 - 0
core/hdd/src/wlan_hdd_power.c

@@ -2433,6 +2433,15 @@ static int _wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
 		return 0;
 	}
 
+	/**
+	 * Return success if recovery is in progress, otherwise, linux kernel
+	 * will shutdown all interfaces in wiphy_resume.
+	 */
+	if (cds_is_driver_recovering()) {
+		hdd_debug("Recovery in progress");
+		return 0;
+	}
+
 	errno = wlan_hdd_validate_context(hdd_ctx);
 	if (errno)
 		return errno;