diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-02-11 12:07:19 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-12 14:28:40 -0500 |
commit | 42c4568a4ace0adc27a9d6f02936e2047ba6fc7e (patch) | |
tree | be0b60ad408401fd2449d87ca1d380731f0dcbf0 | |
parent | 4cad6c7c38930618d77e65af82c1403d63879eee (diff) |
ath9k: add a workaround for ack timeout issues
Adding support for setting the coverage class in some cases broke
association and data transfer, as it overwrote the initial ACK timeout
value from the initvals with a smaller value.
I don't know why the new value works in 5 GHz (matches the initval
there), but not in 2.4 GHz (initvals use 64us here), so until the
problem is fully understood, the value should be increased again.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index f15fee76a4e2..f00f5c744f48 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1217,6 +1217,17 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
1217 | /* As defined by IEEE 802.11-2007 17.3.8.6 */ | 1217 | /* As defined by IEEE 802.11-2007 17.3.8.6 */ |
1218 | slottime = ah->slottime + 3 * ah->coverage_class; | 1218 | slottime = ah->slottime + 3 * ah->coverage_class; |
1219 | acktimeout = slottime + sifstime; | 1219 | acktimeout = slottime + sifstime; |
1220 | |||
1221 | /* | ||
1222 | * Workaround for early ACK timeouts, add an offset to match the | ||
1223 | * initval's 64us ack timeout value. | ||
1224 | * This was initially only meant to work around an issue with delayed | ||
1225 | * BA frames in some implementations, but it has been found to fix ACK | ||
1226 | * timeout issues in other cases as well. | ||
1227 | */ | ||
1228 | if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ) | ||
1229 | acktimeout += 64 - sifstime - ah->slottime; | ||
1230 | |||
1220 | ath9k_hw_setslottime(ah, slottime); | 1231 | ath9k_hw_setslottime(ah, slottime); |
1221 | ath9k_hw_set_ack_timeout(ah, acktimeout); | 1232 | ath9k_hw_set_ack_timeout(ah, acktimeout); |
1222 | ath9k_hw_set_cts_timeout(ah, acktimeout); | 1233 | ath9k_hw_set_cts_timeout(ah, acktimeout); |