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

Commit a1deecba authored by Anurag Chouhan's avatar Anurag Chouhan
Browse files

icnss: Avoid qmi exchange when fw is not ready



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 until firmware is ready.

Change-Id: I1f2c401b4e4e7e1085c7244c46fa7e1adb7aed66
Signed-off-by: default avatarAnurag Chouhan <achouhan@codeaurora.org>
parent d8e38875
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1799,7 +1799,8 @@ int icnss_set_fw_log_mode(struct device *dev, uint8_t fw_log_mode)
	if (!dev)
		return -ENODEV;

	if (test_bit(ICNSS_FW_DOWN, &penv->state)) {
	if (test_bit(ICNSS_FW_DOWN, &penv->state) ||
	    !test_bit(ICNSS_FW_READY, &penv->state)) {
		icnss_pr_err("FW down, ignoring fw_log_mode state: 0x%lx\n",
			     penv->state);
		return -EINVAL;
@@ -1891,7 +1892,8 @@ int icnss_wlan_enable(struct device *dev, struct icnss_wlan_enable_cfg *config,
		      enum icnss_driver_mode mode,
		      const char *host_version)
{
	if (test_bit(ICNSS_FW_DOWN, &penv->state)) {
	if (test_bit(ICNSS_FW_DOWN, &penv->state) ||
	    !test_bit(ICNSS_FW_READY, &penv->state)) {
		icnss_pr_err("FW down, ignoring wlan_enable state: 0x%lx\n",
			     penv->state);
		return -EINVAL;