summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath6kl/hif.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2011-10-27 15:48:52 (GMT)
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-11 10:58:57 (GMT)
commitd60e8ab6b9bcbbb5eb7591c1989f8c79d6b3d964 (patch)
treed4f87bbe935e0606423cd64c930dce2ae3be569d /drivers/net/wireless/ath/ath6kl/hif.c
parent0c30295e4fd5436ad0bd78a6e0974dc4933e2ddb (diff)
downloadlinux-d60e8ab6b9bcbbb5eb7591c1989f8c79d6b3d964.tar.xz
ath6kl: add a timeout to ath6kl_hif_intr_bh_handler()
It's possible to busyloop forever in ath6kl_hif_intr_bh_handler(). Add a check that it lasts only one second. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/hif.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/hif.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/hif.c b/drivers/net/wireless/ath/ath6kl/hif.c
index e2d8088..309be98 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.c
+++ b/drivers/net/wireless/ath/ath6kl/hif.c
@@ -485,6 +485,7 @@ out:
int ath6kl_hif_intr_bh_handler(struct ath6kl *ar)
{
struct ath6kl_device *dev = ar->htc_target->dev;
+ unsigned long timeout;
int status = 0;
bool done = false;
@@ -498,7 +499,8 @@ int ath6kl_hif_intr_bh_handler(struct ath6kl *ar)
* IRQ processing is synchronous, interrupt status registers can be
* re-read.
*/
- while (!done) {
+ timeout = jiffies + msecs_to_jiffies(ATH6KL_HIF_COMMUNICATION_TIMEOUT);
+ while (time_before(jiffies, timeout) && !done) {
status = proc_pending_irqs(dev, &done);
if (status)
break;