aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/mac.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-11-08 14:54:47 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-09 16:13:24 -0500
commit4df3071ebd92ef7115b409da64d0eb405d24a631 (patch)
tree825eaecb9d9e8d0fde7f61e5f98fdd823ccef718 /drivers/net/wireless/ath/ath9k/mac.h
parent790a11f268373b60069bc1371dc05143107c607c (diff)
ath9k_hw: optimize interrupt mask changes
OProfile showed that ath9k was spending way too much time in ath9k_hw_set_interrupts. Since most of the interrupt mask changes only need to globally enable/disable interrupts, it makes sense to split this part into separate functions, replacing all calls to ath9k_hw_set_interrupts(ah, 0) with ath9k_hw_disable_interrupts(ah). ath9k_hw_set_interrupts(ah, ah->imask) only gets changed to ath9k_hw_enable_interrupts(ah), whenever ah->imask was not changed since the point where interrupts were disabled. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mac.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index 7c1a34d64f6..538c676e799 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -669,6 +669,7 @@ enum ath9k_key_type {
669 669
670struct ath_hw; 670struct ath_hw;
671struct ath9k_channel; 671struct ath9k_channel;
672enum ath9k_int;
672 673
673u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q); 674u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q);
674void ath9k_hw_puttxbuf(struct ath_hw *ah, u32 q, u32 txdp); 675void ath9k_hw_puttxbuf(struct ath_hw *ah, u32 q, u32 txdp);
@@ -700,8 +701,9 @@ int ath9k_hw_beaconq_setup(struct ath_hw *ah);
700 701
701/* Interrupt Handling */ 702/* Interrupt Handling */
702bool ath9k_hw_intrpend(struct ath_hw *ah); 703bool ath9k_hw_intrpend(struct ath_hw *ah);
703enum ath9k_int ath9k_hw_set_interrupts(struct ath_hw *ah, 704void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints);
704 enum ath9k_int ints); 705void ath9k_hw_enable_interrupts(struct ath_hw *ah);
706void ath9k_hw_disable_interrupts(struct ath_hw *ah);
705 707
706void ar9002_hw_attach_mac_ops(struct ath_hw *ah); 708void ar9002_hw_attach_mac_ops(struct ath_hw *ah);
707 709