diff mbox

[13/16] wl1251: Fix regression in IRQ loop handling

Message ID 20091117164945.2236.93041.stgit@tikku (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Kalle Valo Nov. 17, 2009, 4:49 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index dad010d..2e1c10f 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));