summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-11-17 18:49:46 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-11-18 17:09:23 -0500
commit79553f82c993ed511450748f01e16e4dccdc8c02 (patch)
tree8bc278121451286657dc380069f74c99a0722e75
parenta1590f2404d1c8d16f8ceed4fccc32ab9831e484 (diff)
wl1251: Fix regression in IRQ loop handling
In some cases, the IRQ loop handler could acknowledge an interrupt to the chipset, but not service it. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index dad010d114f..2e1c10f9670 100644
--- a/drivers/net/wireless/wl12xx/wl1251_main.c
+++ b/drivers/net/wireless/wl12xx/wl1251_main.c
@@ -308,9 +308,11 @@ static void wl1251_irq_work(struct work_struct *work)
wl1251_debug(DEBUG_IRQ,
"WL1251_ACX_INTR_INIT_COMPLETE");
- intr = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_CLEAR);
+ if (--ctr == 0)
+ break;
- } while (intr && --ctr);
+ intr = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_CLEAR);
+ } while (intr);
out_sleep:
wl1251_reg_write32(wl, ACX_REG_INTERRUPT_MASK, ~(wl->intr_mask));