diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-11-08 14:54:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-09 16:13:24 -0500 |
commit | 4df3071ebd92ef7115b409da64d0eb405d24a631 (patch) | |
tree | 825eaecb9d9e8d0fde7f61e5f98fdd823ccef718 /drivers/net/wireless/ath/ath9k/mac.h | |
parent | 790a11f268373b60069bc1371dc05143107c607c (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.h | 6 |
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 | ||
670 | struct ath_hw; | 670 | struct ath_hw; |
671 | struct ath9k_channel; | 671 | struct ath9k_channel; |
672 | enum ath9k_int; | ||
672 | 673 | ||
673 | u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q); | 674 | u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q); |
674 | void ath9k_hw_puttxbuf(struct ath_hw *ah, u32 q, u32 txdp); | 675 | void 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 */ |
702 | bool ath9k_hw_intrpend(struct ath_hw *ah); | 703 | bool ath9k_hw_intrpend(struct ath_hw *ah); |
703 | enum ath9k_int ath9k_hw_set_interrupts(struct ath_hw *ah, | 704 | void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints); |
704 | enum ath9k_int ints); | 705 | void ath9k_hw_enable_interrupts(struct ath_hw *ah); |
706 | void ath9k_hw_disable_interrupts(struct ath_hw *ah); | ||
705 | 707 | ||
706 | void ar9002_hw_attach_mac_ops(struct ath_hw *ah); | 708 | void ar9002_hw_attach_mac_ops(struct ath_hw *ah); |
707 | 709 | ||