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

Commit 11f1f641 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 b585bd9e
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -490,9 +490,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;
	}