ath9k_hw: fix gentimer callback without overflow handler
authorFelix Fietkau <nbd@openwrt.org>
Fri, 20 Dec 2013 15:18:45 +0000 (16:18 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 3 Jan 2014 20:36:56 +0000 (15:36 -0500)
If a gentimer has both the trigger and the overflow bits set, only
mask out the trigger bit if an overflow handler is present.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c

index a4b1ae0262167144d7ecea0d7d6db95da356a4b1..160be020a03119914beda6428bfe2a587d893c07 100644 (file)
@@ -3084,14 +3084,14 @@ void ath_gen_timer_isr(struct ath_hw *ah)
        trigger_mask &= timer_table->timer_mask;
        thresh_mask &= timer_table->timer_mask;
 
-       trigger_mask &= ~thresh_mask;
-
        for_each_set_bit(index, &thresh_mask, ARRAY_SIZE(timer_table->timers)) {
                timer = timer_table->timers[index];
                if (!timer)
                    continue;
                if (!timer->overflow)
                    continue;
+
+               trigger_mask &= ~BIT(index);
                timer->overflow(timer->arg);
        }