icnss2: Avoid sending modem shutdown indication to fw if it is down

Icnss2 driver sends modem shutdown indication to
wlan fw if modem is shutting down gracefully. In
cases where wlan fw got crashed and in separate context
modem is getting gracefully restarted (eg. device restart),
icnss driver trying to send modem shutdown indication
and as part of server exit it is unregsitering and
registering to qmi service at same time. Due to this,
qmi handle is getting changed while trying to send qmi
message to wlan fw. So, avoid sending modem shutdown qmi
message to wlan fw when it is down.

Change-Id: I8cab76b0e0ede293c8cd4c7bc1cc4d7ef4b927db
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
This commit is contained in:
Sandeep Singh 2020-11-10 16:17:14 +05:30
commit ebeccb1568

View file

@ -1048,6 +1048,9 @@ int wlfw_send_modem_shutdown_msg(struct icnss_priv *priv)
if (!priv)
return -ENODEV;
if (test_bit(ICNSS_FW_DOWN, &priv->state))
return -EINVAL;
icnss_pr_dbg("Sending modem shutdown request, state: 0x%lx\n",
priv->state);