Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ba78536 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "icnss2: Check for WLAN mode before pm resume"

parents c2f82240 be6981a0
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -3356,10 +3356,11 @@ static int icnss_pm_resume(struct device *dev)
	    !test_bit(ICNSS_DRIVER_PROBED, &priv->state))
		goto out;

	if (test_bit(ICNSS_PD_RESTART, &priv->state))
		return -EAGAIN;

	if (priv->device_id == WCN6750_DEVICE_ID) {
		if (test_bit(ICNSS_PD_RESTART, &priv->state) ||
		    !test_bit(ICNSS_MODE_ON, &priv->state))
			goto out;

		ret = wlfw_exit_power_save_send_msg(priv);
		if (ret) {
			priv->stats.pm_resume_err++;
@@ -3474,8 +3475,9 @@ static int icnss_pm_runtime_resume(struct device *dev)

	icnss_pr_vdbg("Runtime resume, state: 0x%lx\n", priv->state);

	if (test_bit(ICNSS_PD_RESTART, &priv->state))
		return -EAGAIN;
	if (test_bit(ICNSS_PD_RESTART, &priv->state) ||
	    !test_bit(ICNSS_MODE_ON, &priv->state))
		goto out;

	ret = wlfw_exit_power_save_send_msg(priv);
	if (ret) {