f489f0ff4cb13354cbe94708642bef045f1eda72
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 520-ath9k_ack_timeout_workaround.patch
1 --- a/drivers/net/wireless/ath/ath9k/hw.c
2 +++ b/drivers/net/wireless/ath/ath9k/hw.c
3 @@ -1233,6 +1233,17 @@ void ath9k_hw_init_global_settings(struc
4 /* As defined by IEEE 802.11-2007 17.3.8.6 */
5 slottime = ah->slottime + 3 * ah->coverage_class;
6 acktimeout = slottime + sifstime;
7 +
8 + /*
9 + * Workaround for early ACK timeouts, add an offset to match the
10 + * initval's 64us ack timeout value.
11 + * This was initially only meant to work around an issue with delayed
12 + * BA frames in some implementations, but it has been found to fix ACK
13 + * timeout issues in other cases as well.
14 + */
15 + if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ)
16 + acktimeout += 64 - sifstime - ah->slottime;
17 +
18 ath9k_hw_setslottime(ah, slottime);
19 ath9k_hw_set_ack_timeout(ah, acktimeout);
20 ath9k_hw_set_cts_timeout(ah, acktimeout);