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

Commit ca20cfdd authored by Sandeep Singh's avatar Sandeep Singh
Browse files

icnss: Change to gracefully handle mode request rejection



This changes avoids device crash if mode request fails
because of failure in ccpm initialization.

Change-Id: Icd82030b2144fb2d171de7b419d452fc423a2439
Signed-off-by: default avatarSandeep Singh <sandsing@codeaurora.org>
parent 1b1f2e23
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt) "icnss_qmi: " fmt
@@ -482,9 +482,14 @@ int wlfw_wlan_mode_send_sync_msg(struct icnss_priv *priv,
		icnss_qmi_fatal_err("Mode resp wait failed with ret %d\n", ret);
		goto out;
	} else if (resp->resp.result != QMI_RESULT_SUCCESS_V01) {
		ret = -resp->resp.result;
		if (resp->resp.error == QMI_ERR_PLAT_CCPM_CLK_INIT_FAILED) {
			icnss_pr_err("QMI Mode req rejected as CCPM init failed, result:%d error:%d\n",
				     resp->resp.result, resp->resp.error);
			goto out;
		}
		icnss_qmi_fatal_err("QMI Mode request rejected, result:%d error:%d\n",
			resp->resp.result, resp->resp.error);
		ret = -resp->resp.result;
		goto out;
	}