ath5k: correct interrupt storm warning
authorBob Copeland <me@bobcopeland.com>
Tue, 28 Apr 2009 02:18:10 +0000 (22:18 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 6 May 2009 19:14:50 +0000 (15:14 -0400)
Ben Greear points out that the "too many interrupts" message will
never print in the intended case since the interrupt counter
will be -1 after the loop.  Change it to pre-decrement so it will
be 0 on the thousandth iteration.

Cc: Ben Greear <greearb@candelatech.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c

index 410fc4cfc4c6378dcdac352d7e384afca911a65b..7b80cebffd41b02c607e14db76e7f4b57d4f7c09 100644 (file)
@@ -2505,7 +2505,7 @@ ath5k_intr(int irq, void *dev_id)
                                ath5k_hw_update_mib_counters(ah, &sc->ll_stats);
                        }
                }
-       } while (ath5k_hw_is_intr_pending(ah) && counter-- > 0);
+       } while (ath5k_hw_is_intr_pending(ah) && --counter > 0);
 
        if (unlikely(!counter))
                ATH5K_WARN(sc, "too many interrupts, giving up for now\n");