summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-03-06 16:59:04 -0500
committerJohannes Berg <johannes.berg@intel.com>2017-03-07 03:41:59 -0500
commita6289d3fcc7349402e198ea8fb22d63ed4cb09dd (patch)
treebdc58af2f315af9d14c13a3219f106d8d08ffb73 /net/mac80211/mlme.c
parent8976672736d6089ae011fda3482e30e4380276f8 (diff)
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: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1568a74757bc..4b4d29edec09 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,
2823 *have_higher_than_11mbit = true; 2823 *have_higher_than_11mbit = true;
2824 2824
2825 /* 2825 /*
2826 * BSS_MEMBERSHIP_SELECTOR_HT_PHY is defined in 802.11n-2009 2826 * Skip HT and VHT BSS membership selectors since they're not
2827 * 7.3.2.2 as a magic value instead of a rate. Hence, skip it. 2827 * rates.
2828 * 2828 *
2829 * Note: Even through the membership selector and the basic 2829 * Note: Even though the membership selector and the basic
2830 * rate flag share the same bit, they are not exactly 2830 * rate flag share the same bit, they are not exactly
2831 * the same. 2831 * the same.
2832 */ 2832 */
2833 if (!!(supp_rates[i] & 0x80) && 2833 if (supp_rates[i] == (0x80 | BSS_MEMBERSHIP_SELECTOR_HT_PHY) ||
2834 (supp_rates[i] & 0x7f) == BSS_MEMBERSHIP_SELECTOR_HT_PHY) 2834 supp_rates[i] == (0x80 | BSS_MEMBERSHIP_SELECTOR_VHT_PHY))
2835 continue; 2835 continue;
2836 2836
2837 for (j = 0; j < sband->n_bitrates; j++) { 2837 for (j = 0; j < sband->n_bitrates; j++) {