diff options
author | Thomas Huehn <thomas@net.t-labs.tu-berlin.de> | 2013-03-04 17:30:02 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-06 10:36:07 -0500 |
commit | c8ca8c2f933a516b5f4586d7dc6055b72107f246 (patch) | |
tree | 87a1285588a6dcec2926e804e52fdc4d9bf8fba6 /net/mac80211/rc80211_minstrel.h | |
parent | a512d4b543ea20ec84f712f90a5229ab88a9709c (diff) |
mac80211: merge value scaling macros of minstrel_ht and minstrel
Both minstrel versions use individual ways to scale up integer values
to perform calculations. Merge minstrel_ht's scaling macros into
minstrels header file and use them in both minstrel versions.
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel.h')
-rw-r--r-- | net/mac80211/rc80211_minstrel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h index 98db93f96add..fda4a6154c87 100644 --- a/net/mac80211/rc80211_minstrel.h +++ b/net/mac80211/rc80211_minstrel.h | |||
@@ -11,6 +11,11 @@ | |||
11 | 11 | ||
12 | #define EWMA_LEVEL 75 /* ewma weighting factor [%] */ | 12 | #define EWMA_LEVEL 75 /* ewma weighting factor [%] */ |
13 | 13 | ||
14 | /* scaled fraction values */ | ||
15 | #define MINSTREL_SCALE 16 | ||
16 | #define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div) | ||
17 | #define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE) | ||
18 | |||
14 | /* | 19 | /* |
15 | * Perform EWMA (Exponentially Weighted Moving Average) calculation | 20 | * Perform EWMA (Exponentially Weighted Moving Average) calculation |
16 | */ | 21 | */ |