ath9k_hw: fix the slot time setting for long distance links
authorFelix Fietkau <nbd@openwrt.org>
Mon, 13 Dec 2010 07:40:51 +0000 (08:40 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 13 Dec 2010 20:23:32 +0000 (15:23 -0500)
Testing shows that adjusting the slot time based on the coverage class
produces very high latencies and very low throughput on long distance links.

Adjusting only the ACK timeout and leaving the slot time at the regular
values - while technically not optimal for CSMA - works a lot better on
long links (tested with 10 km distance)

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

index ce4891ea488996100bda5b8b62c67597f1c1b071..0f373be9ef8c0beded58b721b3a76ef24a219b8e 100644 (file)
@@ -808,7 +808,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
        if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ)
                acktimeout += 64 - sifstime - ah->slottime;
 
-       ath9k_hw_setslottime(ah, slottime);
+       ath9k_hw_setslottime(ah, ah->slottime);
        ath9k_hw_set_ack_timeout(ah, acktimeout);
        ath9k_hw_set_cts_timeout(ah, acktimeout);
        if (ah->globaltxtimeout != (u32) -1)