mac80211: backport latest version from trunk (as of r28137)
[openwrt-10.03/.git] / package / mac80211 / patches / 570-ath9k_fix_ack_cts_timeout.patch
1 --- a/drivers/net/wireless/ath/ath9k/hw.c
2 +++ b/drivers/net/wireless/ath/ath9k/hw.c
3 @@ -969,7 +969,7 @@ void ath9k_hw_init_global_settings(struc
4         struct ath_common *common = ath9k_hw_common(ah);
5         struct ieee80211_conf *conf = &common->hw->conf;
6         const struct ath9k_channel *chan = ah->curchan;
7 -       int acktimeout;
8 +       int acktimeout, ctstimeout;
9         int slottime;
10         int sifstime;
11         int rx_lat = 0, tx_lat = 0, eifs = 0;
12 @@ -1029,6 +1029,7 @@ void ath9k_hw_init_global_settings(struc
13  
14         /* As defined by IEEE 802.11-2007 17.3.8.6 */
15         acktimeout = slottime + sifstime + 3 * ah->coverage_class;
16 +       ctstimeout = acktimeout;
17  
18         /*
19          * Workaround for early ACK timeouts, add an offset to match the
20 @@ -1043,7 +1044,7 @@ void ath9k_hw_init_global_settings(struc
21         ath9k_hw_set_sifs_time(ah, sifstime);
22         ath9k_hw_setslottime(ah, slottime);
23         ath9k_hw_set_ack_timeout(ah, acktimeout);
24 -       ath9k_hw_set_cts_timeout(ah, acktimeout);
25 +       ath9k_hw_set_cts_timeout(ah, ctstimeout);
26         if (ah->globaltxtimeout != (u32) -1)
27                 ath9k_hw_set_global_txtimeout(ah, ah->globaltxtimeout);
28