提交 0217eefa 编写于 作者: F Felix Fietkau 提交者: Johannes Berg

mac80211: minstrel: reduce MINSTREL_SCALE

The loss of a bit of extra precision does not hurt the calculation, 12
bits is still enough to calculate probabilities well. Reducing the scale
makes it easier to avoid overflows
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 1109dc39
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define SAMPLE_COLUMNS 10 /* number of columns in sample table */ #define SAMPLE_COLUMNS 10 /* number of columns in sample table */
/* scaled fraction values */ /* scaled fraction values */
#define MINSTREL_SCALE 16 #define MINSTREL_SCALE 12
#define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div) #define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div)
#define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE) #define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册