Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b93407b authored by Hardik Kantilal Patel's avatar Hardik Kantilal Patel
Browse files

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: default avatarHardik Kantilal Patel <hkpatel@codeaurora.org>
parent 4867091e
Loading
Loading
Loading
Loading
+1 −27
Original line number Diff line number Diff line
@@ -2356,29 +2356,6 @@ static int icnss_driver_event_unregister_driver(void *data)
	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)
{
@@ -2418,10 +2395,7 @@ static int icnss_driver_event_pd_service_down(struct icnss_priv *priv,
	if (priv->force_err_fatal)
		ICNSS_ASSERT(0);

	if (event_data->crashed)
	icnss_fw_crashed(priv, event_data);
	else
		icnss_call_driver_remove(priv);

out:
	kfree(data);