summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ar9002_hw.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-04-16 11:53:57 +0530
committerJohn W. Linville <linville@tuxdriver.com>2010-04-16 15:47:09 -0400
commit7d0d0df0eca695c83a08dc386824a9d1d7c526a4 (patch)
treedf2104a15ef84bcd15478e956b3458241b3b7a78 /drivers/net/wireless/ath/ath9k/ar9002_hw.c
parent6819d57f07440a8f9540967d9212a70e9c98eceb (diff)
downloadlinux-7d0d0df0eca695c83a08dc386824a9d1d7c526a4.tar.bz2
ath9k_hw: Use buffered register writes
This patch adds macros at certain places which could be optimized for multiple register writes. The performance of ath9k_htc improves considerably, especially reducing the latency involved in a scan run. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9002_hw.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9002_hw.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
index 17b98a3f33bc..adb33b34a56d 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
@@ -488,10 +488,15 @@ static int ar9002_hw_get_radiorev(struct ath_hw *ah)
u32 val;
int i;
- REG_WRITE(ah, AR_PHY(0x36), 0x00007058);
+ ENABLE_REGWRITE_BUFFER(ah);
+ REG_WRITE(ah, AR_PHY(0x36), 0x00007058);
for (i = 0; i < 8; i++)
REG_WRITE(ah, AR_PHY(0x20), 0x00010000);
+
+ REGWRITE_BUFFER_FLUSH(ah);
+ DISABLE_REGWRITE_BUFFER(ah);
+
val = (REG_READ(ah, AR_PHY(256)) >> 24) & 0xff;
val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4);