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>
This commit is contained in:
committed by
Johannes Berg
parent
a512d4b543
commit
c8ca8c2f93
@@ -11,6 +11,11 @@
|
||||
|
||||
#define EWMA_LEVEL 75 /* ewma weighting factor [%] */
|
||||
|
||||
/* scaled fraction values */
|
||||
#define MINSTREL_SCALE 16
|
||||
#define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div)
|
||||
#define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE)
|
||||
|
||||
/*
|
||||
* Perform EWMA (Exponentially Weighted Moving Average) calculation
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user