aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/qcu.c
diff options
context:
space:
mode:
authorLukáš Turek <8an@praha12.net>2009-12-21 16:50:50 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-12 13:50:08 -0500
commit3578e6ebb305e6bf7519f6e86741772892f4d51a (patch)
tree2ef5b0feeb6a2462d33bbf1fe4396b2567365bd8 /drivers/net/wireless/ath/ath5k/qcu.c
parente1aa369ec8fb981ef78bc5be3b3c58de7c5ff769 (diff)
ath5k: Reimplement clock rate to usec conversion
The original code was correct in 802.11a mode only, 802.11b/g uses different clock rates. The new code uses values taken from FreeBSD HAL and should be correct for all modes including turbo modes. The former rate calculation was used by slope coefficient calculation function ath5k_hw_write_ofdm_timings. However, this function requires the 802.11a values even in 802.11g mode. Thus the use of ath5k_hw_htoclock was replaced by hardcoded values. Possibly the slope coefficient calculation is not related to clock rate at all. Signed-off-by: Lukas Turek <8an@praha12.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/qcu.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/qcu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/qcu.c b/drivers/net/wireless/ath/ath5k/qcu.c
index e322a104e7fe..abe36c0d139c 100644
--- a/drivers/net/wireless/ath/ath5k/qcu.c
+++ b/drivers/net/wireless/ath/ath5k/qcu.c
@@ -529,7 +529,7 @@ unsigned int ath5k_hw_get_slot_time(struct ath5k_hw *ah)
529 else 529 else
530 slot_time_clock = ath5k_hw_reg_read(ah, AR5K_DCU_GBL_IFS_SLOT); 530 slot_time_clock = ath5k_hw_reg_read(ah, AR5K_DCU_GBL_IFS_SLOT);
531 531
532 return ath5k_hw_clocktoh(slot_time_clock & 0xffff, ah->ah_turbo); 532 return ath5k_hw_clocktoh(ah, slot_time_clock & 0xffff);
533} 533}
534 534
535/* 535/*
@@ -537,7 +537,7 @@ unsigned int ath5k_hw_get_slot_time(struct ath5k_hw *ah)
537 */ 537 */
538int ath5k_hw_set_slot_time(struct ath5k_hw *ah, unsigned int slot_time) 538int ath5k_hw_set_slot_time(struct ath5k_hw *ah, unsigned int slot_time)
539{ 539{
540 u32 slot_time_clock = ath5k_hw_htoclock(slot_time, ah->ah_turbo); 540 u32 slot_time_clock = ath5k_hw_htoclock(ah, slot_time);
541 541
542 ATH5K_TRACE(ah->ah_sc); 542 ATH5K_TRACE(ah->ah_sc);
543 543