Commit a6289d3f authored by Johannes Berg's avatar Johannes Berg

mac80211: ignore VHT membership selector when parsing rates

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.

Fix a typo in the related comment (pointed out by Arend) while
at it.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 89766727
...@@ -2823,15 +2823,15 @@ static void ieee80211_get_rates(struct ieee80211_supported_band *sband, ...@@ -2823,15 +2823,15 @@ static void ieee80211_get_rates(struct ieee80211_supported_band *sband,
*have_higher_than_11mbit = true; *have_higher_than_11mbit = true;
/* /*
* BSS_MEMBERSHIP_SELECTOR_HT_PHY is defined in 802.11n-2009 * Skip HT and VHT BSS membership selectors since they're not
* 7.3.2.2 as a magic value instead of a rate. Hence, skip it. * rates.
* *
* Note: Even through the membership selector and the basic * Note: Even though the membership selector and the basic
* rate flag share the same bit, they are not exactly * rate flag share the same bit, they are not exactly
* the same. * the same.
*/ */
if (!!(supp_rates[i] & 0x80) && if (supp_rates[i] == (0x80 | BSS_MEMBERSHIP_SELECTOR_HT_PHY) ||
(supp_rates[i] & 0x7f) == BSS_MEMBERSHIP_SELECTOR_HT_PHY) supp_rates[i] == (0x80 | BSS_MEMBERSHIP_SELECTOR_VHT_PHY))
continue; continue;
for (j = 0; j < sband->n_bitrates; j++) { for (j = 0; j < sband->n_bitrates; j++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment