From: Bob Copeland Date: Tue, 28 Apr 2009 02:18:10 +0000 (-0400) Subject: ath5k: correct interrupt storm warning X-Git-Tag: v2.6.31-rc1~330^2~448^2~41 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=2516baa63bc7d05a6573a0f584135484ed182a87;p=~shefty%2Frdma-dev.git ath5k: correct interrupt storm warning 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 Signed-off-by: Bob Copeland Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 410fc4cfc4c..7b80cebffd4 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -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");