build: scan.mk: consider KernelPackage pattern as well
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 339-mac80211-minstrel-reduce-MINSTREL_SCALE.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Wed, 14 Dec 2016 20:15:33 +0100
3 Subject: [PATCH] mac80211: minstrel: reduce MINSTREL_SCALE
4
5 The loss of a bit of extra precision does not hurt the calculation, 12
6 bits is still enough to calculate probabilities well. Reducing the scale
7 makes it easier to avoid overflows
8
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/net/mac80211/rc80211_minstrel.h
13 +++ b/net/mac80211/rc80211_minstrel.h
14 @@ -14,7 +14,7 @@
15 #define SAMPLE_COLUMNS 10 /* number of columns in sample table */
16
17 /* scaled fraction values */
18 -#define MINSTREL_SCALE 16
19 +#define MINSTREL_SCALE 12
20 #define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div)
21 #define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE)
22