aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRaja Mani <rmani@qca.qualcomm.com>2013-03-19 00:18:35 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2013-06-01 08:08:46 -0400
commitab1ef141161c158360fab671e72226cffb5f9774 (patch)
treecb2454c6146347fb492f9fcae8be4d6914eb2fce /drivers/net/wireless
parent3e817f086f06069a23b797ee2279bbae638d5edc (diff)
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: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath6kl/init.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 40ffee6184fd..6a67881f94d6 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -1696,10 +1696,16 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
1696 test_bit(WMI_READY, 1696 test_bit(WMI_READY,
1697 &ar->flag), 1697 &ar->flag),
1698 WMI_TIMEOUT); 1698 WMI_TIMEOUT);
1699 if (timeleft <= 0) {
1700 clear_bit(WMI_READY, &ar->flag);
1701 ath6kl_err("wmi is not ready or wait was interrupted: %ld\n",
1702 timeleft);
1703 ret = -EIO;
1704 goto err_htc_stop;
1705 }
1699 1706
1700 ath6kl_dbg(ATH6KL_DBG_BOOT, "firmware booted\n"); 1707 ath6kl_dbg(ATH6KL_DBG_BOOT, "firmware booted\n");
1701 1708
1702
1703 if (test_and_clear_bit(FIRST_BOOT, &ar->flag)) { 1709 if (test_and_clear_bit(FIRST_BOOT, &ar->flag)) {
1704 ath6kl_info("%s %s fw %s api %d%s\n", 1710 ath6kl_info("%s %s fw %s api %d%s\n",
1705 ar->hw.name, 1711 ar->hw.name,
@@ -1718,12 +1724,6 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
1718 goto err_htc_stop; 1724 goto err_htc_stop;
1719 } 1725 }
1720 1726
1721 if (!timeleft || signal_pending(current)) {
1722 ath6kl_err("wmi is not ready or wait was interrupted\n");
1723 ret = -EIO;
1724 goto err_htc_stop;
1725 }
1726
1727 ath6kl_dbg(ATH6KL_DBG_TRC, "%s: wmi is ready\n", __func__); 1727 ath6kl_dbg(ATH6KL_DBG_TRC, "%s: wmi is ready\n", __func__);
1728 1728
1729 /* communicate the wmi protocol verision to the target */ 1729 /* communicate the wmi protocol verision to the target */