icnss: Avoid wlan driver remove during modem graceful shutdown

In case of modem graceful shutdown case during wlan driver
remove it delete the wlan interface and later probe time
create the new interface. some time new interface may get
different interface index. Android wificond framework module
is not aware about this interface index change due to this
after recovery it try to do scan with old interface index
which result into scan failure.

To address above issue avoid wlan driver remove during modem
graceful shutdown.

CRs-Fixed: 2157835
Change-Id: I8b828bef8b5f43cc39ba8ee578dcafc6afaa98d6
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
This commit is contained in:
Hardik Kantilal Patel 2018-01-12 18:02:10 +05:30 committed by Gerrit - the friendly Code Review server
parent abdd204a44
commit 7311ff92a3

View file

@ -2329,29 +2329,6 @@ out:
return 0;
}
static int icnss_call_driver_remove(struct icnss_priv *priv)
{
icnss_pr_dbg("Calling driver remove state: 0x%lx\n", priv->state);
clear_bit(ICNSS_FW_READY, &priv->state);
if (!test_bit(ICNSS_DRIVER_PROBED, &penv->state))
return 0;
if (!priv->ops || !priv->ops->remove)
return 0;
set_bit(ICNSS_DRIVER_UNLOADING, &penv->state);
penv->ops->remove(&priv->pdev->dev);
clear_bit(ICNSS_DRIVER_UNLOADING, &penv->state);
clear_bit(ICNSS_DRIVER_PROBED, &priv->state);
icnss_hw_power_off(penv);
return 0;
}
static int icnss_fw_crashed(struct icnss_priv *priv,
struct icnss_event_pd_service_down_data *event_data)
{
@ -2387,10 +2364,7 @@ static int icnss_driver_event_pd_service_down(struct icnss_priv *priv,
goto out;
}
if (event_data->crashed)
icnss_fw_crashed(priv, event_data);
else
icnss_call_driver_remove(priv);
icnss_fw_crashed(priv, event_data);
out:
kfree(data);