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

Commit 4c8768a5 authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Ignore mode off failure when QMI service is already disconnected



There is a case in emulation platform that before mode off response
comes back, QMI service is disconnected by firmware already. Handle
this case gracefully in the driver.

Change-Id: Idbb920a502e2461c0d5323ac2981b3235a08feae
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 7ebce0d5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -508,6 +508,10 @@ int cnss_wlfw_wlan_mode_send_sync(struct cnss_plat_data *plat_priv,
				sizeof(req), &resp_desc, &resp, sizeof(resp),
				QMI_WLFW_TIMEOUT_MS);
	if (ret < 0) {
		if (mode == QMI_WLFW_OFF_V01 && ret == -ENETRESET) {
			cnss_pr_dbg("WLFW service is disconnected while sending mode off request.\n");
			return 0;
		}
		cnss_pr_err("Failed to send mode request, mode: %d, err = %d\n",
			    mode, ret);
		goto out;