Skip to contentSkip to conversation

ath6kl: Check wmi ready event status before validating abi version

PATCH Applied Raja Mani 2 participants 2 messages Mar 19, 2013 – Jun 1, 2013 Atheros ATH6KL wireless driver

lore
Share & tools
lore

Raja Mani

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/ath/ath6kl/init.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/wireless/ath/ath6kl/init.c +7 -7
index 072a229..4c54432 100644
@@ -1604,10 +1604,16 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
 						    test_bit(WMI_READY,
 							     &ar->flag),
 						    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");
 
-
 	if (test_and_clear_bit(FIRST_BOOT, &ar->flag)) {
 		ath6kl_info("%s %s fw %s api %d%s\n",
 			    ar->hw.name,
@@ -1624,12 +1630,6 @@ static int __ath6kl_init_hw_start(struct ath6kl *ar)
 		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__);
 
 	/* communicate the wmi protocol verision to the target */
Signature · 1 line
1.7.1
Applied
#1 lore raw
Quoted 7 lines · Raja Mani

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.

Thanks, applied.

Signature · 1 line
Kalle Valo