diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-12-14 20:46:59 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-12-15 11:07:52 +0100 |
commit | 0217eefa64509d63fbe8d1205310bafb2355cf4d (patch) | |
tree | 7cb77309a9e60c57f211791537ab3835d2eb7531 /net | |
parent | 1109dc392ea0248f7bfca3537011aa7afaa05cee (diff) | |
download | op-kernel-dev-0217eefa64509d63fbe8d1205310bafb2355cf4d.zip op-kernel-dev-0217eefa64509d63fbe8d1205310bafb2355cf4d.tar.gz |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rc80211_minstrel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h index 94b89b1..03716fd 100644 --- a/net/mac80211/rc80211_minstrel.h +++ b/net/mac80211/rc80211_minstrel.h @@ -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) |