diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2010-04-15 17:39:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-16 15:43:43 -0400 |
commit | 78ec26778803abd4ebb105bb19c729100c829837 (patch) | |
tree | 8d47b6931472e54a7bccd4c54681c43633b5f6f9 /drivers/net/wireless/ath/ath9k | |
parent | 57b32227cd7f1f81f4143d8bc82a5ffe37ab4df9 (diff) |
ath9k_hw: skip asynch fifo enablement to AR9003
The asynch fifo code is specific to >= AR9287 so stuff it
into the AR9002 hardware family code and skip it for AR9003
cards.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_hw.c | 29 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 1 |
3 files changed, 32 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index 5b21e6914386..cf36f6467914 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
@@ -526,6 +526,35 @@ int ar9002_hw_rf_claim(struct ath_hw *ah) | |||
526 | return 0; | 526 | return 0; |
527 | } | 527 | } |
528 | 528 | ||
529 | /* | ||
530 | * Enable ASYNC FIFO | ||
531 | * | ||
532 | * If Async FIFO is enabled, the following counters change as MAC now runs | ||
533 | * at 117 Mhz instead of 88/44MHz when async FIFO is disabled. | ||
534 | * | ||
535 | * The values below tested for ht40 2 chain. | ||
536 | * Overwrite the delay/timeouts initialized in process ini. | ||
537 | */ | ||
538 | void ar9002_hw_enable_async_fifo(struct ath_hw *ah) | ||
539 | { | ||
540 | if (AR_SREV_9287_12_OR_LATER(ah)) { | ||
541 | REG_WRITE(ah, AR_D_GBL_IFS_SIFS, | ||
542 | AR_D_GBL_IFS_SIFS_ASYNC_FIFO_DUR); | ||
543 | REG_WRITE(ah, AR_D_GBL_IFS_SLOT, | ||
544 | AR_D_GBL_IFS_SLOT_ASYNC_FIFO_DUR); | ||
545 | REG_WRITE(ah, AR_D_GBL_IFS_EIFS, | ||
546 | AR_D_GBL_IFS_EIFS_ASYNC_FIFO_DUR); | ||
547 | |||
548 | REG_WRITE(ah, AR_TIME_OUT, AR_TIME_OUT_ACK_CTS_ASYNC_FIFO_DUR); | ||
549 | REG_WRITE(ah, AR_USEC, AR_USEC_ASYNC_FIFO_DUR); | ||
550 | |||
551 | REG_SET_BIT(ah, AR_MAC_PCU_LOGIC_ANALYZER, | ||
552 | AR_MAC_PCU_LOGIC_ANALYZER_DISBUG20768); | ||
553 | REG_RMW_FIELD(ah, AR_AHB_MODE, AR_AHB_CUSTOM_BURST_EN, | ||
554 | AR_AHB_CUSTOM_BURST_ASYNC_FIFO_VAL); | ||
555 | } | ||
556 | } | ||
557 | |||
529 | /* Sets up the AR5008/AR9001/AR9002 hardware familiy callbacks */ | 558 | /* Sets up the AR5008/AR9001/AR9002 hardware familiy callbacks */ |
530 | void ar9002_hw_attach_ops(struct ath_hw *ah) | 559 | void ar9002_hw_attach_ops(struct ath_hw *ah) |
531 | { | 560 | { |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index fd146c8d4cd8..1dc1b485c3c3 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1265,22 +1265,9 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1265 | 1265 | ||
1266 | ath9k_hw_init_global_settings(ah); | 1266 | ath9k_hw_init_global_settings(ah); |
1267 | 1267 | ||
1268 | if (AR_SREV_9287_12_OR_LATER(ah)) { | 1268 | if (!AR_SREV_9300_20_OR_LATER(ah)) |
1269 | REG_WRITE(ah, AR_D_GBL_IFS_SIFS, | 1269 | ar9002_hw_enable_async_fifo(ah); |
1270 | AR_D_GBL_IFS_SIFS_ASYNC_FIFO_DUR); | ||
1271 | REG_WRITE(ah, AR_D_GBL_IFS_SLOT, | ||
1272 | AR_D_GBL_IFS_SLOT_ASYNC_FIFO_DUR); | ||
1273 | REG_WRITE(ah, AR_D_GBL_IFS_EIFS, | ||
1274 | AR_D_GBL_IFS_EIFS_ASYNC_FIFO_DUR); | ||
1275 | |||
1276 | REG_WRITE(ah, AR_TIME_OUT, AR_TIME_OUT_ACK_CTS_ASYNC_FIFO_DUR); | ||
1277 | REG_WRITE(ah, AR_USEC, AR_USEC_ASYNC_FIFO_DUR); | ||
1278 | 1270 | ||
1279 | REG_SET_BIT(ah, AR_MAC_PCU_LOGIC_ANALYZER, | ||
1280 | AR_MAC_PCU_LOGIC_ANALYZER_DISBUG20768); | ||
1281 | REG_RMW_FIELD(ah, AR_AHB_MODE, AR_AHB_CUSTOM_BURST_EN, | ||
1282 | AR_AHB_CUSTOM_BURST_ASYNC_FIFO_VAL); | ||
1283 | } | ||
1284 | if (AR_SREV_9287_12_OR_LATER(ah)) { | 1271 | if (AR_SREV_9287_12_OR_LATER(ah)) { |
1285 | REG_SET_BIT(ah, AR_PCU_MISC_MODE2, | 1272 | REG_SET_BIT(ah, AR_PCU_MISC_MODE2, |
1286 | AR_PCU_MISC_MODE2_ENABLE_AGGWEP); | 1273 | AR_PCU_MISC_MODE2_ENABLE_AGGWEP); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 16f0f9820796..e4eacdd4c810 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -850,6 +850,7 @@ void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled, | |||
850 | */ | 850 | */ |
851 | void ar9002_hw_cck_chan14_spread(struct ath_hw *ah); | 851 | void ar9002_hw_cck_chan14_spread(struct ath_hw *ah); |
852 | int ar9002_hw_rf_claim(struct ath_hw *ah); | 852 | int ar9002_hw_rf_claim(struct ath_hw *ah); |
853 | void ar9002_hw_enable_async_fifo(struct ath_hw *ah); | ||
853 | 854 | ||
854 | /* | 855 | /* |
855 | * Code specifric to AR9003, we stuff these here to avoid callbacks | 856 | * Code specifric to AR9003, we stuff these here to avoid callbacks |