mac80211: update to linux 6.1-rc8
[openwrt/staging/wigyori.git] / package / kernel / mac80211 / patches / subsys / 302-mac80211-minstrel_ht-fix-MINSTREL_FRAC-macro.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Wed, 28 Apr 2021 21:03:13 +0200
3 Subject: [PATCH] mac80211: minstrel_ht: fix MINSTREL_FRAC macro
4
5 Add missing braces to avoid issues with e.g. using additions in the
6 div expression
7
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 ---
10
11 --- a/net/mac80211/rc80211_minstrel_ht.h
12 +++ b/net/mac80211/rc80211_minstrel_ht.h
13 @@ -14,7 +14,7 @@
14
15 /* scaled fraction values */
16 #define MINSTREL_SCALE 12
17 -#define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div)
18 +#define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / (div))
19 #define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE)
20
21 #define EWMA_LEVEL 96 /* ewma weighting factor [/EWMA_DIV] */