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

Commit a5ed0b42 authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Add small delay after cold boot calibration shutdown



WLAN driver load may be queued right after cold boot calibration so
it results immediately powerup after shutdown which may cause PCIe link
training failure. Hence add a small delay after cold boot calibration
shutdown to avoid such issues.

Change-Id: I3e9495c1dcfdd560a5a314b9bc6e3b2a7aec36ba
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 5dc7d771
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#define FW_READY_TIMEOUT		20000
#define FW_ASSERT_TIMEOUT		5000
#define CNSS_EVENT_PENDING		2989
#define COLD_BOOT_CAL_SHUTDOWN_DELAY_MS	50

#define CNSS_QUIRKS_DEFAULT		0
#ifdef CONFIG_CNSS_EMULATION
@@ -1254,6 +1255,7 @@ static int cnss_cold_boot_cal_done_hdlr(struct cnss_plat_data *plat_priv,
	cnss_wlfw_wlan_mode_send_sync(plat_priv, CNSS_OFF);
	cnss_release_antenna_sharing(plat_priv);
	cnss_bus_dev_shutdown(plat_priv);
	msleep(COLD_BOOT_CAL_SHUTDOWN_DELAY_MS);
	complete(&plat_priv->cal_complete);
	clear_bit(CNSS_COLD_BOOT_CAL, &plat_priv->driver_state);