mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
1109dc392e
commit
0217eefa64
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@
|
|||
#define SAMPLE_COLUMNS 10 /* number of columns in sample table */
|
||||
|
||||
/* scaled fraction values */
|
||||
#define MINSTREL_SCALE 16
|
||||
#define MINSTREL_SCALE 12
|
||||
#define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div)
|
||||
#define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE)
|
||||
|
||||
|
|
Loading…
Reference in a new issue