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

Commit b10e896e authored by Hardik Kantilal Patel's avatar Hardik Kantilal Patel
Browse files

icnss: Set FW_DOWN bit early stage in fw crash handler



Right now ICNSS_FW_DOWN flag set in platform driver after
indicating to WLAN Host driver. In some case if ICNSS_UEVENT_FW_DOWN
event to wlan host driver get stuck at same time if WLAN host driver
probe failure happens then in failure path before doing BUG_ON driver
check ICNSS_FW_DOWN with platform driver which never set. this result
into false crash.

To avoid this immediately set ICNSS_FW_DOWN flag in platform driver
before indicating to WLAN host driver.

Change-Id: I26c87feb43b5b3de262661552b8d6842a03cb3b5
Signed-off-by: default avatarHardik Kantilal Patel <hkpatel@codeaurora.org>
parent 3633dccc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -680,14 +680,15 @@ static irqreturn_t fw_crash_indication_handler(int irq, void *ctx)
	icnss_pr_err("Received early crash indication from FW\n");

	if (priv) {
		set_bit(ICNSS_FW_DOWN, &priv->state);
		icnss_ignore_fw_timeout(true);

		if (test_bit(ICNSS_FW_READY, &priv->state) &&
		    !test_bit(ICNSS_DRIVER_UNLOADING, &priv->state)) {
			fw_down_data.crashed = true;
			icnss_call_driver_uevent(priv, ICNSS_UEVENT_FW_DOWN,
						 &fw_down_data);
		}
		set_bit(ICNSS_FW_DOWN, &priv->state);
		icnss_ignore_fw_timeout(true);
	}

	icnss_driver_event_post(ICNSS_DRIVER_EVENT_FW_EARLY_CRASH_IND,