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

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

cnss2: Ignore QMI mode off request during recovery



If device has already crashed and recovery is in progress, QMI mode
off request will be timed out anyway, so ignore sending it.

Change-Id: Ic1395cd9a6497f25736e37d7bdfffae8f8d1d304
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent e29926e9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -575,6 +575,12 @@ int cnss_wlfw_wlan_mode_send_sync(struct cnss_plat_data *plat_priv,
	cnss_pr_dbg("Sending mode message, state: 0x%lx, mode: %d\n",
		    plat_priv->driver_state, mode);

	if (mode == QMI_WLFW_OFF_V01 &&
	    test_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state)) {
		cnss_pr_dbg("Recovery is in progress, ignore mode off request.\n");
		return 0;
	}

	memset(&req, 0, sizeof(req));
	memset(&resp, 0, sizeof(resp));