summaryrefslogtreecommitdiff
path: root/isr.c
diff options
context:
space:
mode:
Diffstat (limited to 'isr.c')
-rw-r--r--isr.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/isr.c b/isr.c
index 02d93d4..07bd7c5 100644
--- a/isr.c
+++ b/isr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2015, Marvell International Ltd.
+ * Copyright (C) 2006-2016, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
@@ -21,15 +21,24 @@
#include "isr.h"
#define INVALID_WATCHDOG 0xAA
+#ifdef BG4CT_A0_WORKAROUND
+#define MAX_ISR_ITERATION 2
+#endif
irqreturn_t mwl_isr(int irq, void *dev_id)
{
struct ieee80211_hw *hw = dev_id;
struct mwl_priv *priv = hw->priv;
void __iomem *int_status_mask;
- unsigned int int_status, clr_status;
+#ifdef BG4CT_A0_WORKAROUND
+ unsigned int currIteration = 0;
+#endif
+ u32 int_status, clr_status;
u32 status;
+#ifdef BG4CT_A0_WORKAROUND
+ do {
+#endif
int_status_mask = priv->iobase1 + MACREG_REG_A2H_INTERRUPT_STATUS_MASK;
int_status = readl(priv->iobase1 + MACREG_REG_A2H_INTERRUPT_CAUSE);
@@ -45,12 +54,12 @@ irqreturn_t mwl_isr(int irq, void *dev_id)
if (int_status & MACREG_A2HRIC_BIT_TX_DONE) {
int_status &= ~MACREG_A2HRIC_BIT_TX_DONE;
- if (!priv->is_tx_schedule) {
+ if (!priv->is_tx_done_schedule) {
status = readl(int_status_mask);
writel((status & ~MACREG_A2HRIC_BIT_TX_DONE),
int_status_mask);
- tasklet_schedule(&priv->tx_task);
- priv->is_tx_schedule = true;
+ tasklet_schedule(&priv->tx_done_task);
+ priv->is_tx_done_schedule = true;
}
}
@@ -95,14 +104,15 @@ irqreturn_t mwl_isr(int irq, void *dev_id)
ieee80211_queue_work(hw, &priv->chnl_switch_handle);
}
- if (int_status & MACREG_A2HRIC_BA_WATCHDOG) {
- status = readl(int_status_mask);
+ if (int_status & MACREG_A2HRIC_BA_WATCHDOG)
ieee80211_queue_work(hw, &priv->watchdog_ba_handle);
- }
writel(~clr_status,
priv->iobase1 + MACREG_REG_A2H_INTERRUPT_CAUSE);
}
+#ifdef BG4CT_A0_WORKAROUND
+ } while (currIteration++ < MAX_ISR_ITERATION);
+#endif
return IRQ_HANDLED;
}