From: Luca Coelho <luca@coelho.fi>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
Mordechay Goodstein <mordechay.goodstein@intel.com>,
Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 04/10] cfg80211: util: fix bit count off by one
Date: Wed, 29 May 2019 15:25:31 +0300 [thread overview]
Message-ID: <20190529122537.8564-5-luca@coelho.fi> (raw)
In-Reply-To: <20190529122537.8564-1-luca@coelho.fi>
From: Mordechay Goodstein <mordechay.goodstein@intel.com>
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>
---
net/wireless/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/util.c b/net/wireless/util.c
index cf63b635afc0..33dbf7ee9b97 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1998,7 +1998,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;
}
}
--
2.20.1
next prev parent reply other threads:[~2019-05-29 12:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 12:25 [PATCH 00/10] cfg80211/mac80211 patches from our internal tree 2019-05-29 Luca Coelho
2019-05-29 12:25 ` [PATCH 01/10] cfg80211: report measurement start TSF correctly Luca Coelho
2019-05-29 12:25 ` [PATCH 02/10] cfg80211: use BIT_ULL in cfg80211_parse_mbssid_data() Luca Coelho
2019-05-29 16:28 ` Kalle Valo
2019-05-29 12:25 ` [PATCH 03/10] mac80211: do not start any work during reconfigure flow Luca Coelho
2019-05-29 12:25 ` Luca Coelho [this message]
2019-05-29 12:25 ` [PATCH 05/10] cfg80211: Add a function to iterate all BSS entries Luca Coelho
2019-05-29 12:25 ` [PATCH 06/10] ieee80211: Add a missing extended capability flag definition Luca Coelho
2019-05-29 12:25 ` [PATCH 07/10] mac80211: call rate_control_send_low() internally Luca Coelho
2019-05-29 12:25 ` [PATCH 08/10] mac80211: use STA info in rate_control_send_low() Luca Coelho
2019-05-29 12:25 ` [PATCH 09/10] mac80211: fill low rate even for HAS_RATE_CONTROL Luca Coelho
2019-05-29 12:25 ` [PATCH 10/10] mac80211: extend __rate_control_send_low warning Luca Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190529122537.8564-5-luca@coelho.fi \
--to=luca@coelho.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=mordechay.goodstein@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox