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

Commit d2ddbf41 authored by Anurag Chouhan's avatar Anurag Chouhan Committed by Gerrit - the friendly Code Review server
Browse files

icnss: Avoid qmi exchange when fw is down



Currently wlan Host driver call exported API's which
invoke qmi exchanges irrespective of the firmware status.
which leads to QMI timeouts.
To address this issue avoid sending qmi request to
firmware when firmware is down.

CRs-Fixed: 2175302
Change-Id: Ie5e340cebf7ee7f6143472e7dca0dfd9600d1b7d
Signed-off-by: default avatarAnurag Chouhan <achouhan@codeaurora.org>
parent be566880
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -3102,6 +3102,12 @@ int icnss_set_fw_log_mode(struct device *dev, uint8_t fw_log_mode)
	if (!dev)
	if (!dev)
		return -ENODEV;
		return -ENODEV;


	if (test_bit(ICNSS_FW_DOWN, &penv->state)) {
		icnss_pr_err("FW down, ignoring fw_log_mode state: 0x%lx\n",
			     penv->state);
		return -EINVAL;
	}

	icnss_pr_dbg("FW log mode: %u\n", fw_log_mode);
	icnss_pr_dbg("FW log mode: %u\n", fw_log_mode);


	ret = wlfw_ini_send_sync_msg(fw_log_mode);
	ret = wlfw_ini_send_sync_msg(fw_log_mode);
@@ -3195,6 +3201,12 @@ int icnss_wlan_enable(struct device *dev, struct icnss_wlan_enable_cfg *config,
	if (!dev)
	if (!dev)
		return -ENODEV;
		return -ENODEV;


	if (test_bit(ICNSS_FW_DOWN, &penv->state)) {
		icnss_pr_err("FW down, ignoring wlan_enable state: 0x%lx\n",
			     penv->state);
		return -EINVAL;
	}

	icnss_pr_dbg("Mode: %d, config: %p, host_version: %s\n",
	icnss_pr_dbg("Mode: %d, config: %p, host_version: %s\n",
		     mode, config, host_version);
		     mode, config, host_version);