OSDN Git Service

icnss: Reject driver reinit request when FW is down
authorYuanyuan Liu <yuanliu@codeaurora.org>
Tue, 5 Dec 2017 00:01:31 +0000 (16:01 -0800)
committerGerrit - the friendly Code Review server <code-review@localhost>
Tue, 5 Dec 2017 18:19:25 +0000 (10:19 -0800)
Reject driver reinit request when WLAN FW is down as FW
is in a bad state and can't communicate with host driver.

CRs-Fixed: 2153375
Change-Id: Id16cbfc05984091d61b18c98f7397baa871f82b4
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
drivers/soc/qcom/icnss.c

index e7f83ed..1935f18 100644 (file)
@@ -2174,6 +2174,12 @@ static int icnss_pd_restart_complete(struct icnss_priv *priv)
        if (!priv->ops || !priv->ops->reinit)
                goto out;
 
+       if (test_bit(ICNSS_FW_DOWN, &priv->state)) {
+               icnss_pr_err("FW is in bad state, state: 0x%lx\n",
+                            priv->state);
+               goto out;
+       }
+
        if (!test_bit(ICNSS_DRIVER_PROBED, &priv->state))
                goto call_probe;