icnss: Reject driver reinit request when FW is down

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>
This commit is contained in:
Yuanyuan Liu 2017-12-04 16:01:31 -08:00 committed by Gerrit - the friendly Code Review server
parent 06b749683b
commit 8a23ecb418

View file

@ -2174,6 +2174,12 @@ static int icnss_pd_restart_complete(struct icnss_priv *priv)
if (!priv->ops || !priv->ops->reinit) if (!priv->ops || !priv->ops->reinit)
goto out; 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)) if (!test_bit(ICNSS_DRIVER_PROBED, &priv->state))
goto call_probe; goto call_probe;