diff options
author | Felix Fietkau <nbd@nbd.name> | 2022-01-28 13:51:22 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-02-03 15:16:47 +0100 |
commit | 543ada64edb88ff68328bcde5418eac7afcc3634 (patch) | |
tree | 4b9308fd84c3ce2f6899cdff3b797d10b1196fff /package/kernel/mac80211/patches/subsys/309-mac80211-minstrel_ht-fix-MINSTREL_FRAC-macro.patch | |
parent | 02b9b6872a4f70b304264cd4ccea0ec633b16816 (diff) | |
download | upstream-543ada64edb88ff68328bcde5418eac7afcc3634.tar.gz upstream-543ada64edb88ff68328bcde5418eac7afcc3634.tar.bz2 upstream-543ada64edb88ff68328bcde5418eac7afcc3634.zip |
mac80211: reorganize patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/subsys/309-mac80211-minstrel_ht-fix-MINSTREL_FRAC-macro.patch')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/309-mac80211-minstrel_ht-fix-MINSTREL_FRAC-macro.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/309-mac80211-minstrel_ht-fix-MINSTREL_FRAC-macro.patch b/package/kernel/mac80211/patches/subsys/309-mac80211-minstrel_ht-fix-MINSTREL_FRAC-macro.patch new file mode 100644 index 0000000000..0d475b7329 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/309-mac80211-minstrel_ht-fix-MINSTREL_FRAC-macro.patch @@ -0,0 +1,21 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Wed, 28 Apr 2021 21:03:13 +0200 +Subject: [PATCH] mac80211: minstrel_ht: fix MINSTREL_FRAC macro + +Add missing braces to avoid issues with e.g. using additions in the +div expression + +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/net/mac80211/rc80211_minstrel_ht.h ++++ b/net/mac80211/rc80211_minstrel_ht.h +@@ -14,7 +14,7 @@ + + /* scaled fraction values */ + #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 EWMA_LEVEL 96 /* ewma weighting factor [/EWMA_DIV] */ |