ath5k: Reimplement clock rate to usec conversion
authorLukáš Turek <8an@praha12.net>
Mon, 21 Dec 2009 21:50:50 +0000 (22:50 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 12 Jan 2010 18:50:08 +0000 (13:50 -0500)
commit3578e6ebb305e6bf7519f6e86741772892f4d51a
tree2ef5b0feeb6a2462d33bbf1fe4396b2567365bd8
parente1aa369ec8fb981ef78bc5be3b3c58de7c5ff769
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>
drivers/net/wireless/ath/ath5k/ath5k.h
drivers/net/wireless/ath/ath5k/pcu.c
drivers/net/wireless/ath/ath5k/qcu.c
drivers/net/wireless/ath/ath5k/reset.c