diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-06-14 21:32:15 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-08-26 16:27:30 +0200 |
commit | 1a1a504a54fc338f65b57d309714e399e4ae84ec (patch) | |
tree | 2830cebd20c62299d82e5208d7e516b234f7118c /package/kernel/mac80211/patches/subsys/317-mac80211-minstrel_ht-fix-infinite-loop-because-suppo.patch | |
parent | 8bf8de95a20d9fee54bbd579832c578c62cbc901 (diff) | |
download | upstream-1a1a504a54fc338f65b57d309714e399e4ae84ec.tar.gz upstream-1a1a504a54fc338f65b57d309714e399e4ae84ec.tar.bz2 upstream-1a1a504a54fc338f65b57d309714e399e4ae84ec.zip |
mac80211: add new minstrel_ht patches to improve probing on mt76x2
Also include follow-up regression fix from master
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commits 9861050b85e5 and f0992d7a309f)
Diffstat (limited to 'package/kernel/mac80211/patches/subsys/317-mac80211-minstrel_ht-fix-infinite-loop-because-suppo.patch')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/317-mac80211-minstrel_ht-fix-infinite-loop-because-suppo.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/317-mac80211-minstrel_ht-fix-infinite-loop-because-suppo.patch b/package/kernel/mac80211/patches/subsys/317-mac80211-minstrel_ht-fix-infinite-loop-because-suppo.patch new file mode 100644 index 0000000000..59fc726683 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/317-mac80211-minstrel_ht-fix-infinite-loop-because-suppo.patch @@ -0,0 +1,25 @@ +From: Colin Ian King <colin.king@canonical.com> +Date: Thu, 22 Aug 2019 13:20:34 +0100 +Subject: [PATCH] mac80211: minstrel_ht: fix infinite loop because supported is + not being shifted + +Currently the for-loop will spin forever if variable supported is +non-zero because supported is never changed. Fix this by adding in +the missing right shift of supported. + +Addresses-Coverity: ("Infinite loop") +Fixes: 48cb39522a9d ("mac80211: minstrel_ht: improve rate probing for devices with static fallback") +Signed-off-by: Colin Ian King <colin.king@canonical.com> +--- + +--- a/net/mac80211/rc80211_minstrel_ht.c ++++ b/net/mac80211/rc80211_minstrel_ht.c +@@ -601,7 +601,7 @@ minstrel_ht_rate_sample_switch(struct mi + u16 supported = mi->supported[g_idx]; + + supported >>= mi->max_tp_rate[0] % MCS_GROUP_RATES; +- for (i = 0; supported; i++) { ++ for (i = 0; supported; supported >>= 1, i++) { + if (!(supported & 1)) + continue; + |