mac80211/ath9k: fix duration calculation for short-guard-interval frames (thanks...
[openwrt-10.03/.git] / package / mac80211 / patches / 580-ath9k_fix_duration_calculation.patch
1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -27,9 +27,9 @@
4  #define HT_STF                  4
5  #define HT_LTF(_ns)             (4 * (_ns))
6  #define SYMBOL_TIME(_ns)        ((_ns) << 2) /* ns * 4 us */
7 -#define SYMBOL_TIME_HALFGI(_ns) (((_ns) * 18 + 4) / 5)  /* ns * 3.6 us */
8 +#define SYMBOL_TIME_HALFGI(_ns) (((_ns) * 18 + 4) / 6)  /* ns * 3.6 us */
9  #define NUM_SYMBOLS_PER_USEC(_usec) (_usec >> 2)
10 -#define NUM_SYMBOLS_PER_USEC_HALFGI(_usec) (((_usec*5)-4)/18)
11 +#define NUM_SYMBOLS_PER_USEC_HALFGI(_usec) (((_usec*6)-4)/18)
12  
13  #define OFDM_SIFS_TIME             16
14