diff options
| author | Yuanyuan Liu <yuanliu@codeaurora.org> | 2017-11-30 11:11:42 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-12-04 11:18:42 -0800 |
| commit | 554899595c018f4075db6f3a3d0f0221ceaec053 (patch) | |
| tree | cad9481548178ea75e8a95826af66b6362a9e5e1 | |
| parent | 501a8de7b638d28c32338a124908258509b55371 (diff) | |
icnss: Reject register_driver request when WLAN FW is down
Reject regsiter_driver request when WLAN FW is already down as
WLAN FW is in a bad state and can't communicate with host driver.
Change-Id: I57ba839101f5c0a361e74060b18b45f87c71634c
CRs-Fixed: 2151726
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
| -rw-r--r-- | drivers/soc/qcom/icnss.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 73d6bea83b95..e7f83ed1307b 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -2246,6 +2246,12 @@ static int icnss_driver_event_register_driver(void *data) if (test_bit(SKIP_QMI, &quirks)) set_bit(ICNSS_FW_READY, &penv->state); + if (test_bit(ICNSS_FW_DOWN, &penv->state)) { + icnss_pr_err("FW is in bad state, state: 0x%lx\n", + penv->state); + return -ENODEV; + } + if (!test_bit(ICNSS_FW_READY, &penv->state)) { icnss_pr_dbg("FW is not ready yet, state: 0x%lx\n", penv->state); |
