diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-01-22 21:50:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-23 14:02:45 -0500 |
commit | a64e1a45060f41423c89768f4f7bef3283678539 (patch) | |
tree | 65a6a53e3725770962899ba2cea8cfe0cd1e1277 | |
parent | 7f6d740753ff0d29a330b06eb3efa0dfc791bbba (diff) |
ath9k: Fix RX interrupt mitigation
The threshold values for RX interrupt mitigation
are different for AR9003 and AR9002 families.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index ce41658a6003..fbf43c05713f 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -358,6 +358,14 @@ static void ath9k_hw_init_config(struct ath_hw *ah) | |||
358 | 358 | ||
359 | ah->config.rx_intr_mitigation = true; | 359 | ah->config.rx_intr_mitigation = true; |
360 | 360 | ||
361 | if (AR_SREV_9300_20_OR_LATER(ah)) { | ||
362 | ah->config.rimt_last = 500; | ||
363 | ah->config.rimt_first = 2000; | ||
364 | } else { | ||
365 | ah->config.rimt_last = 250; | ||
366 | ah->config.rimt_first = 700; | ||
367 | } | ||
368 | |||
361 | /* | 369 | /* |
362 | * We need this for PCI devices only (Cardbus, PCI, miniPCI) | 370 | * We need this for PCI devices only (Cardbus, PCI, miniPCI) |
363 | * _and_ if on non-uniprocessor systems (Multiprocessor/HT). | 371 | * _and_ if on non-uniprocessor systems (Multiprocessor/HT). |
@@ -1876,8 +1884,8 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1876 | REG_WRITE(ah, AR_OBS, 8); | 1884 | REG_WRITE(ah, AR_OBS, 8); |
1877 | 1885 | ||
1878 | if (ah->config.rx_intr_mitigation) { | 1886 | if (ah->config.rx_intr_mitigation) { |
1879 | REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500); | 1887 | REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, ah->config.rimt_last); |
1880 | REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 2000); | 1888 | REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, ah->config.rimt_first); |
1881 | } | 1889 | } |
1882 | 1890 | ||
1883 | if (ah->config.tx_intr_mitigation) { | 1891 | if (ah->config.tx_intr_mitigation) { |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index e766399bdcda..0acd4b5a4892 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -310,6 +310,8 @@ struct ath9k_ops_config { | |||
310 | u8 max_txtrig_level; | 310 | u8 max_txtrig_level; |
311 | u16 ani_poll_interval; /* ANI poll interval in ms */ | 311 | u16 ani_poll_interval; /* ANI poll interval in ms */ |
312 | u16 hw_hang_checks; | 312 | u16 hw_hang_checks; |
313 | u16 rimt_first; | ||
314 | u16 rimt_last; | ||
313 | 315 | ||
314 | /* Platform specific config */ | 316 | /* Platform specific config */ |
315 | u32 aspm_l1_fix; | 317 | u32 aspm_l1_fix; |