diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-05-23 06:20:56 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-05-24 12:50:22 -0400 |
commit | 86c157b3f83597e11d8f03a9dece98d1e77a8ce7 (patch) | |
tree | 039443b1f2fae511c5735e55f3b2aebfdf59eb82 /drivers/net/wireless/ath/ath9k/hw.c | |
parent | a37a99102e4573145aa60a2f78a690cc8def027c (diff) |
ath9k_hw: improve performance for AR934x v1.3+
AR934x v1.3 no longer needs the DCU backoff reduction workaround for
preventing rx overruns, but in turn needs the number of usable Tx
buffers to be reduced slightly.
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/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 01e97ce438ba..15dfefcf2d0f 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1172,6 +1172,7 @@ u32 ath9k_regd_get_ctl(struct ath_regulatory *reg, struct ath9k_channel *chan) | |||
1172 | static inline void ath9k_hw_set_dma(struct ath_hw *ah) | 1172 | static inline void ath9k_hw_set_dma(struct ath_hw *ah) |
1173 | { | 1173 | { |
1174 | struct ath_common *common = ath9k_hw_common(ah); | 1174 | struct ath_common *common = ath9k_hw_common(ah); |
1175 | int txbuf_size; | ||
1175 | 1176 | ||
1176 | ENABLE_REGWRITE_BUFFER(ah); | 1177 | ENABLE_REGWRITE_BUFFER(ah); |
1177 | 1178 | ||
@@ -1225,13 +1226,17 @@ static inline void ath9k_hw_set_dma(struct ath_hw *ah) | |||
1225 | * So set the usable tx buf size also to half to | 1226 | * So set the usable tx buf size also to half to |
1226 | * avoid data/delimiter underruns | 1227 | * avoid data/delimiter underruns |
1227 | */ | 1228 | */ |
1228 | REG_WRITE(ah, AR_PCU_TXBUF_CTRL, | 1229 | txbuf_size = AR_9285_PCU_TXBUF_CTRL_USABLE_SIZE; |
1229 | AR_9285_PCU_TXBUF_CTRL_USABLE_SIZE); | 1230 | } else if (AR_SREV_9340_13_OR_LATER(ah)) { |
1230 | } else if (!AR_SREV_9271(ah)) { | 1231 | /* Uses fewer entries for AR934x v1.3+ to prevent rx overruns */ |
1231 | REG_WRITE(ah, AR_PCU_TXBUF_CTRL, | 1232 | txbuf_size = AR_9340_PCU_TXBUF_CTRL_USABLE_SIZE; |
1232 | AR_PCU_TXBUF_CTRL_USABLE_SIZE); | 1233 | } else { |
1234 | txbuf_size = AR_PCU_TXBUF_CTRL_USABLE_SIZE; | ||
1233 | } | 1235 | } |
1234 | 1236 | ||
1237 | if (!AR_SREV_9271(ah)) | ||
1238 | REG_WRITE(ah, AR_PCU_TXBUF_CTRL, txbuf_size); | ||
1239 | |||
1235 | REGWRITE_BUFFER_FLUSH(ah); | 1240 | REGWRITE_BUFFER_FLUSH(ah); |
1236 | 1241 | ||
1237 | if (AR_SREV_9300_20_OR_LATER(ah)) | 1242 | if (AR_SREV_9300_20_OR_LATER(ah)) |