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

Commit a6f130f1 authored by Anurag Chouhan's avatar Anurag Chouhan
Browse files

icnss: Clear ignore_qmi_timeout flag at server arrive



Currently, ignore_qmi_timeout flag is reset at pd down handler,
at the same time if any qmi exchange timeout happens, which
results into assert.
To avoid this race condition clear the ignore_qmi_timeout flag
at server arrive.

Change-Id: I8d1a0ea104881d0e1f6d9be5ea4a5a69c3d6bf86
Signed-off-by: default avatarAnurag Chouhan <achouhan@codeaurora.org>
parent 982dcbe0
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -782,6 +782,7 @@ static int icnss_driver_event_server_arrive(void *data)

	set_bit(ICNSS_WLFW_EXISTS, &penv->state);
	clear_bit(ICNSS_FW_DOWN, &penv->state);
	icnss_ignore_fw_timeout(false);

	ret = icnss_connect_to_fw_server(penv, data);
	if (ret)
@@ -1100,8 +1101,10 @@ static int icnss_driver_event_pd_service_down(struct icnss_priv *priv,
	int ret = 0;
	struct icnss_event_pd_service_down_data *event_data = data;

	if (!test_bit(ICNSS_WLFW_EXISTS, &priv->state))
	if (!test_bit(ICNSS_WLFW_EXISTS, &priv->state)) {
		icnss_ignore_fw_timeout(false);
		goto out;
	}

	if (priv->early_crash_ind) {
		icnss_pr_dbg("PD Down ignored as early indication is processed: %d, state: 0x%lx\n",
@@ -1125,8 +1128,6 @@ static int icnss_driver_event_pd_service_down(struct icnss_priv *priv,
out:
	kfree(data);

	icnss_ignore_fw_timeout(false);

	return ret;
}

@@ -1135,15 +1136,16 @@ static int icnss_driver_event_early_crash_ind(struct icnss_priv *priv,
{
	int ret = 0;

	if (!test_bit(ICNSS_WLFW_EXISTS, &priv->state))
	if (!test_bit(ICNSS_WLFW_EXISTS, &priv->state)) {
		icnss_ignore_fw_timeout(false);
		goto out;
	}

	priv->early_crash_ind = true;
	icnss_fw_crashed(priv, NULL);

out:
	kfree(data);
	icnss_ignore_fw_timeout(false);

	return ret;
}