From 3f733bc1ecd5b213e3b9078c9cb057a0ae6842d9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 10 Mar 2010 01:09:17 +0000 Subject: [PATCH] mac80211/ath9k: fix duration calculation for short-guard-interval frames (thanks to Duy Nguyen for pointing this out) SVN-Revision: 20114 --- package/mac80211/patches/560-minstrel_ht.patch | 2 +- .../580-ath9k_fix_duration_calculation.patch | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 package/mac80211/patches/580-ath9k_fix_duration_calculation.patch diff --git a/package/mac80211/patches/560-minstrel_ht.patch b/package/mac80211/patches/560-minstrel_ht.patch index 6c3d08eac2..2f2aa9d398 100644 --- a/package/mac80211/patches/560-minstrel_ht.patch +++ b/package/mac80211/patches/560-minstrel_ht.patch @@ -100,7 +100,7 @@ +/* Transmission time for a packet containing (syms) symbols */ +#define MCS_SYMBOL_TIME(sgi, syms) \ + (sgi ? \ -+ ((syms) * 18 + 4) / 5 : /* syms * 3.6 us */ \ ++ ((syms) * 18 + 4) / 6 : /* syms * 3.6 us */ \ + (syms) << 2 /* syms * 4 us */ \ + ) + diff --git a/package/mac80211/patches/580-ath9k_fix_duration_calculation.patch b/package/mac80211/patches/580-ath9k_fix_duration_calculation.patch new file mode 100644 index 0000000000..219e4ee363 --- /dev/null +++ b/package/mac80211/patches/580-ath9k_fix_duration_calculation.patch @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -27,9 +27,9 @@ + #define HT_STF 4 + #define HT_LTF(_ns) (4 * (_ns)) + #define SYMBOL_TIME(_ns) ((_ns) << 2) /* ns * 4 us */ +-#define SYMBOL_TIME_HALFGI(_ns) (((_ns) * 18 + 4) / 5) /* ns * 3.6 us */ ++#define SYMBOL_TIME_HALFGI(_ns) (((_ns) * 18 + 4) / 6) /* ns * 3.6 us */ + #define NUM_SYMBOLS_PER_USEC(_usec) (_usec >> 2) +-#define NUM_SYMBOLS_PER_USEC_HALFGI(_usec) (((_usec*5)-4)/18) ++#define NUM_SYMBOLS_PER_USEC_HALFGI(_usec) (((_usec*6)-4)/18) + + #define OFDM_SIFS_TIME 16 + -- 2.25.1