diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2010-04-16 06:23:57 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-16 19:47:09 (GMT) |
commit | 7d0d0df0eca695c83a08dc386824a9d1d7c526a4 (patch) | |
tree | df2104a15ef84bcd15478e956b3458241b3b7a78 /drivers/net/wireless/ath/ath9k/ar9002_hw.c | |
parent | 6819d57f07440a8f9540967d9212a70e9c98eceb (diff) | |
download | linux-7d0d0df0eca695c83a08dc386824a9d1d7c526a4.tar.xz |
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.c | 7 |
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 17b98a3..adb33b3 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); |