ath9k_hw: fix EIFS value to microseconds
authorAlex Hacker <hacker@epn.ru>
Tue, 16 Aug 2011 10:41:40 +0000 (16:41 +0600)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 24 Aug 2011 18:41:43 +0000 (14:41 -0400)
The EIFS value read from AR_D_GBL_IFS_EIFS register in core clocks and then
written back as microsecond value.

Signed-off-by: Alex Hacker <hacker@epn.ru>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c

index 875faf6..88100cc 100644 (file)
@@ -996,7 +996,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
                slottime = 21;
                sifstime = 64;
        } else {
-               eifs = REG_READ(ah, AR_D_GBL_IFS_EIFS);
+               eifs = REG_READ(ah, AR_D_GBL_IFS_EIFS)/common->clockrate;
                reg = REG_READ(ah, AR_USEC);
                rx_lat = MS(reg, AR_USEC_RX_LAT);
                tx_lat = MS(reg, AR_USEC_TX_LAT);