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

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

Merge "icnss2: Check for PD restart complete before pm resume"

parents 632b644d c71b1c0e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -3351,6 +3351,9 @@ 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) {
		ret = wlfw_exit_power_save_send_msg(priv);
		if (ret) {
@@ -3464,13 +3467,17 @@ static int icnss_pm_runtime_resume(struct device *dev)
	if (!priv->ops || !priv->ops->runtime_resume)
		goto out;

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

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

	ret = wlfw_exit_power_save_send_msg(priv);
	if (ret) {
		priv->stats.pm_resume_err++;
		return ret;
	}

	icnss_pr_vdbg("Runtime resume\n");
	ret = priv->ops->runtime_resume(dev);

out: