summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMordechay Goodstein <mordechay.goodstein@intel.com>2019-05-29 15:25:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-14 09:09:42 +0300
commitafe6a610dd5d82e93add11aaee1fb071d5b57a78 (patch)
tree7950f9697450e3134944e41a719fe0ca4d597b9d /net
parentd2aab1140bd37e5bbfbc03152243701ff832d2ba (diff)
downloadlinux-afe6a610dd5d82e93add11aaee1fb071d5b57a78.tar.xz
cfg80211: util: fix bit count off by one
[ Upstream commit 1a473d6092d5d182914bea854ce0b21e6d12519d ] The bits of Rx MCS Map in VHT capability were enumerated with index transform - index i -> (i + 1) bit => nss i. BUG! while it should be - index i -> (i + 1) bit => (i + 1) nss. The bug was exposed in commit a53b2a0b1245 ("iwlwifi: mvm: implement VHT extended NSS support in rs.c"), where iwlwifi started using the function. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Fixes: b0aa75f0b1b2 ("ieee80211: add new VHT capability fields/parsing") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 5a03f38788e7..5ac66a571e33 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1989,7 +1989,7 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,
continue;
if (supp >= mcs_encoding) {
- max_vht_nss = i;
+ max_vht_nss = i + 1;
break;
}
}