diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-12-20 16:02:32 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-12-20 16:02:32 +0000 |
commit | 0c83afb6ecdc1d55c6afa0009d89f5baab64a0b8 (patch) | |
tree | d1c4a5e51fd9ed8c7157457fae26e71959881f65 /package/kernel/mac80211/patches | |
parent | aa7f693d306c842fb0165b31b7687bde1b98ff14 (diff) | |
download | master-187ad058-0c83afb6ecdc1d55c6afa0009d89f5baab64a0b8.tar.gz master-187ad058-0c83afb6ecdc1d55c6afa0009d89f5baab64a0b8.tar.bz2 master-187ad058-0c83afb6ecdc1d55c6afa0009d89f5baab64a0b8.zip |
ath9k: merge a timer handling fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39150 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches')
-rw-r--r-- | package/kernel/mac80211/patches/300-pending_work.patch | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/package/kernel/mac80211/patches/300-pending_work.patch b/package/kernel/mac80211/patches/300-pending_work.patch index 21ce44575a..bcaeee9063 100644 --- a/package/kernel/mac80211/patches/300-pending_work.patch +++ b/package/kernel/mac80211/patches/300-pending_work.patch @@ -2277,7 +2277,7 @@ + /* Save TSF before chip reset, a cold reset clears it */ + tsf = ath9k_hw_gettsf64(ah); + getrawmonotonic(&ts); -+ usec = ts.tv_sec * 1000 + ts.tv_nsec / 1000; ++ usec = ts.tv_sec * 1000000ULL + ts.tv_nsec / 1000; saveLedState = REG_READ(ah, AR_CFG_LED) & (AR_CFG_LED_ASSOC_CTL | AR_CFG_LED_MODE_SEL | @@ -2288,7 +2288,7 @@ - if (tsf) - ath9k_hw_settsf64(ah, tsf); + getrawmonotonic(&ts); -+ usec = ts.tv_sec * 1000 + ts.tv_nsec / 1000 - usec; ++ usec = ts.tv_sec * 1000000ULL + ts.tv_nsec / 1000 - usec; + ath9k_hw_settsf64(ah, tsf + usec); if (AR_SREV_9280_20_OR_LATER(ah)) @@ -2396,10 +2396,10 @@ - BUG_ON(!timer_period); - - set_bit(timer->index, &timer_table->timer_mask.timer_bits); +- +- tsf = ath9k_hw_gettsf32(ah); + u32 mask = 0; -- tsf = ath9k_hw_gettsf32(ah); -- - timer_next = tsf + trig_timeout; - - ath_dbg(ath9k_hw_common(ah), BTCOEX, @@ -2476,8 +2476,8 @@ + trigger_mask &= timer_table->timer_mask; + thresh_mask &= timer_table->timer_mask; - trigger_mask &= ~thresh_mask; - +- trigger_mask &= ~thresh_mask; +- - while (thresh_mask) { - index = rightmost_index(timer_table, &thresh_mask); + for_each_set_bit(index, &thresh_mask, ARRAY_SIZE(timer_table->timers)) { @@ -2489,6 +2489,8 @@ + continue; + if (!timer->overflow) + continue; ++ ++ trigger_mask &= ~BIT(index); timer->overflow(timer->arg); } |