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

Commit 443b19ba authored by Prashanth Bhatta's avatar Prashanth Bhatta
Browse files

icnss: Trigger recovery only if PDR enabled



To trigger WLAN host initiated WLAN FW recovery, platform driver
needs to have service notifier handle. Service notifier handle is
obtained only when service locator locates the WLAN user PD. If
service locator doesn't locate the WLAN user PD then service
notifier handle can be NULL. Add sanity check to make sure PDR is
enabled in platform driver before triggering PD restart.

Change-Id: I5524060cc1f4bfff7faf7f3736455beb73801f4a
CRs-fixed: 2012995
Signed-off-by: default avatarPrashanth Bhatta <bhattap@codeaurora.org>
parent 59a631bc
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2922,6 +2922,13 @@ int icnss_trigger_recovery(struct device *dev)
		goto out;
	}

	if (test_bit(ICNSS_PDR_ENABLED, &priv->state)) {
		icnss_pr_err("PD restart not enabled: state: 0x%lx\n",
			     priv->state);
		ret = -EOPNOTSUPP;
		goto out;
	}

	if (!priv->service_notifier[0].handle) {
		icnss_pr_err("Invalid handle during recovery\n");
		ret = -EINVAL;