]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ath5k: fix SIFS time handling
authorFelix Fietkau <nbd@openwrt.org>
Sat, 9 Apr 2011 21:10:20 +0000 (23:10 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 12 Apr 2011 20:59:06 +0000 (16:59 -0400)
ath5k uses 8 usec as a sifs time, extracted from the initvals, whereas the
standard requires a sifs time of 10. The difference originates from the fact
that the SIFS register has an offset of 2 usec.
Fix the SIFS time definition to use the standard value of 10 usec and subtract
2 usecs when writing the SIFS register.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/ath5k.h
drivers/net/wireless/ath/ath5k/qcu.c

index 996d8afafdb7e6127528aa1a8b1102daf8288d12..a49aeac378cd6a653d75db1c17b0f1a26aac49e7 100644 (file)
 
 /* SIFS */
 #define        AR5K_INIT_SIFS_TURBO                    6
-/* XXX: 8 from initvals 10 from standard */
-#define        AR5K_INIT_SIFS_DEFAULT_BG               8
+#define        AR5K_INIT_SIFS_DEFAULT_BG               10
 #define        AR5K_INIT_SIFS_DEFAULT_A                16
 #define        AR5K_INIT_SIFS_HALF_RATE                32
 #define AR5K_INIT_SIFS_QUARTER_RATE            64
index 93abcfacd990ec5efc4d7c0502a9101a5b1d86c9..b18c5021aac36f826904787632ba8499d39d9f7e 100644 (file)
@@ -519,7 +519,7 @@ int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time)
                return -EINVAL;
 
        sifs = ath5k_hw_get_default_sifs(ah);
-       sifs_clock = ath5k_hw_htoclock(ah, sifs);
+       sifs_clock = ath5k_hw_htoclock(ah, sifs - 2);
 
        /* EIFS
         * Txtime of ack at lowest rate + SIFS + DIFS