[PATCH] mac80211: ignore VHT membership selector when parsing rates

Subsystems: mac80211, the rest

STALE3435d

4 messages, 2 authors, 2017-03-07 · open the first message on its own page

[PATCH] mac80211: ignore VHT membership selector when parsing rates

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2017-03-06 22:08:39

From: Johannes Berg <redacted>

There isn't really much harm in not ignoring, since it doesn't
represent a valid rate, but since we already ignore the HT one
also ignore VHT. Also simplify the code a bit.

Signed-off-by: Johannes Berg <redacted>
---
 net/mac80211/mlme.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1568a74757bc..6340127a71c6 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2823,15 +2823,15 @@ static void ieee80211_get_rates(struct ieee80211_supported_band *sband,
 			*have_higher_than_11mbit = true;
 
 		/*
-		 * BSS_MEMBERSHIP_SELECTOR_HT_PHY is defined in 802.11n-2009
-		 * 7.3.2.2 as a magic value instead of a rate. Hence, skip it.
+		 * Skip HT and VHT BSS membership selectors since they're not
+		 * rates.
 		 *
 		 * Note: Even through the membership selector and the basic
 		 *	 rate flag share the same bit, they are not exactly
 		 *	 the same.
 		 */
-		if (!!(supp_rates[i] & 0x80) &&
-		    (supp_rates[i] & 0x7f) == BSS_MEMBERSHIP_SELECTOR_HT_PHY)
+		if (supp_rates[i] == (0x80 | BSS_MEMBERSHIP_SELECTOR_HT_PHY) ||
+		    supp_rates[i] == (0x80 | BSS_MEMBERSHIP_SELECTOR_VHT_PHY))
 			continue;
 
 		for (j = 0; j < sband->n_bitrates; j++) {
-- 
2.11.0

Re: [PATCH] mac80211: ignore VHT membership selector when parsing rates

From: Arend Van Spriel <arend.vanspriel@broadcom.com>
Date: 2017-03-07 10:35:29

On 6-3-2017 23:01, Johannes Berg wrote:
quoted hunk
From: Johannes Berg <redacted>

There isn't really much harm in not ignoring, since it doesn't
represent a valid rate, but since we already ignore the HT one
also ignore VHT. Also simplify the code a bit.

Signed-off-by: Johannes Berg <redacted>
---
 net/mac80211/mlme.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1568a74757bc..6340127a71c6 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2823,15 +2823,15 @@ static void ieee80211_get_rates(struct ieee80211_supported_band *sband,
 			*have_higher_than_11mbit = true;
 
 		/*
-		 * BSS_MEMBERSHIP_SELECTOR_HT_PHY is defined in 802.11n-2009
-		 * 7.3.2.2 as a magic value instead of a rate. Hence, skip it.
+		 * Skip HT and VHT BSS membership selectors since they're not
+		 * rates.
 		 *
 		 * Note: Even through the membership selector and the basic
typo: through -> though.

Regards,
Arend
 		 *	 rate flag share the same bit, they are not exactly
 		 *	 the same.
 		 */
-		if (!!(supp_rates[i] & 0x80) &&
-		    (supp_rates[i] & 0x7f) == BSS_MEMBERSHIP_SELECTOR_HT_PHY)
+		if (supp_rates[i] == (0x80 | BSS_MEMBERSHIP_SELECTOR_HT_PHY) ||
+		    supp_rates[i] == (0x80 | BSS_MEMBERSHIP_SELECTOR_VHT_PHY))
 			continue;
 
 		for (j = 0; j < sband->n_bitrates; j++) {

Re: [PATCH] mac80211: ignore VHT membership selector when parsing rates

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2017-03-07 09:18:27

quoted
 
 		/*
-		 * BSS_MEMBERSHIP_SELECTOR_HT_PHY is defined in
802.11n-2009
-		 * 7.3.2.2 as a magic value instead of a rate.
Hence, skip it.
+		 * Skip HT and VHT BSS membership selectors since
they're not
+		 * rates.
 		 *
 		 * Note: Even through the membership selector and
the basic
typo: through -> though.
That's just existing context ;-)

Will fix here.

johannes

Re: [PATCH] mac80211: ignore VHT membership selector when parsing rates

From: Arend Van Spriel <arend.vanspriel@broadcom.com>
Date: 2017-03-07 09:57:37


On 7-3-2017 9:42, Johannes Berg wrote:
quoted
quoted
 
 		/*
-		 * BSS_MEMBERSHIP_SELECTOR_HT_PHY is defined in
802.11n-2009
-		 * 7.3.2.2 as a magic value instead of a rate.
Hence, skip it.
+		 * Skip HT and VHT BSS membership selectors since
they're not
+		 * rates.
 		 *
 		 * Note: Even through the membership selector and
the basic
typo: through -> though.
That's just existing context ;-)

Will fix here.
I noticed and indeed could create a patch for it, but this is easier
(for me :-p ).

Gr. AvS
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help