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

Commit 71adcb31 authored by Prashanth Bhatta's avatar Prashanth Bhatta
Browse files

icnss: Ignore PD down if WLAN FW doesn't exists



During Modem SSR, PD down notification gets notified by
service-notifier. There are cases where in WLAN firmware may not
be available on Modem side. Handle PD down notification
gracefully in case WLAN firmware doesn't exists.

CRs-fixed: 1072772
Change-Id: Ibfe29a3950fabfcf8baa5d08b15e0f056dcc1f2a
Signed-off-by: default avatarPrashanth Bhatta <bhattap@codeaurora.org>
parent 4448b911
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -297,6 +297,7 @@ enum icnss_driver_state {
	ICNSS_PDR_ENABLED,
	ICNSS_PD_RESTART,
	ICNSS_MSA0_ASSIGNED,
	ICNSS_WLFW_EXISTS,
};

struct ce_irq_list {
@@ -2214,6 +2215,8 @@ static int icnss_driver_event_server_arrive(void *data)
	if (!penv)
		return -ENODEV;

	set_bit(ICNSS_WLFW_EXISTS, &penv->state);

	penv->wlfw_clnt = qmi_handle_create(icnss_qmi_wlfw_clnt_notify, penv);
	if (!penv->wlfw_clnt) {
		icnss_pr_err("QMI client handle create failed\n");
@@ -2512,6 +2515,9 @@ 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))
		return 0;

	if (test_bit(ICNSS_PD_RESTART, &priv->state)) {
		icnss_pr_err("PD Down while recovery inprogress, crashed: %d, state: 0x%lx\n",
			     event_data->crashed, priv->state);
@@ -3832,6 +3838,8 @@ static int icnss_stats_show_state(struct seq_file *s, struct icnss_priv *priv)
		case ICNSS_MSA0_ASSIGNED:
			seq_puts(s, "MSA0 ASSIGNED");
			continue;
		case ICNSS_WLFW_EXISTS:
			continue;
		}

		seq_printf(s, "UNKNOWN-%d", i);