Commit ab1ef141 authored by Raja Mani's avatar Raja Mani Committed by Kalle Valo

ath6kl: Check wmi ready event status before validating abi version

There is no point to check firmware ABI version when the driver
fails to wait for WMI_READY event during the boot time.

For such failures, the driver should assume the firmware is not
booted and start doing cleanup.
Signed-off-by: default avatarRaja Mani <rmani@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 3e817f08
...@@ -1696,10 +1696,16 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar) ...@@ -1696,10 +1696,16 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
test_bit(WMI_READY, test_bit(WMI_READY,
&ar->flag), &ar->flag),
WMI_TIMEOUT); WMI_TIMEOUT);
if (timeleft <= 0) {
clear_bit(WMI_READY, &ar->flag);
ath6kl_err("wmi is not ready or wait was interrupted: %ld\n",
timeleft);
ret = -EIO;
goto err_htc_stop;
}
ath6kl_dbg(ATH6KL_DBG_BOOT, "firmware booted\n"); ath6kl_dbg(ATH6KL_DBG_BOOT, "firmware booted\n");
if (test_and_clear_bit(FIRST_BOOT, &ar->flag)) { if (test_and_clear_bit(FIRST_BOOT, &ar->flag)) {
ath6kl_info("%s %s fw %s api %d%s\n", ath6kl_info("%s %s fw %s api %d%s\n",
ar->hw.name, ar->hw.name,
...@@ -1718,12 +1724,6 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar) ...@@ -1718,12 +1724,6 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
goto err_htc_stop; goto err_htc_stop;
} }
if (!timeleft || signal_pending(current)) {
ath6kl_err("wmi is not ready or wait was interrupted\n");
ret = -EIO;
goto err_htc_stop;
}
ath6kl_dbg(ATH6KL_DBG_TRC, "%s: wmi is ready\n", __func__); ath6kl_dbg(ATH6KL_DBG_TRC, "%s: wmi is ready\n", __func__);
/* communicate the wmi protocol verision to the target */ /* communicate the wmi protocol verision to the target */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment