Skip to content

Commit

Permalink
mac80211: fix VHT MCS calculation
Browse files Browse the repository at this point in the history
The VHT MCSes we advertise to the AP were supposed to
be restricted to the AP, but due to a bug in the logic
mac80211 will advertise rates to the AP that aren't
even supported by the local device. To fix this skip
any adjustment if the NSS isn't supported at all.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Mar 1, 2013
1 parent 7cbf9d0 commit 24af717
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,9 @@ static void ieee80211_add_vht_ie(struct ieee80211_sub_if_data *sdata,
our_mcs = (le16_to_cpu(vht_cap.vht_mcs.rx_mcs_map) &
mask) >> shift;

if (our_mcs == IEEE80211_VHT_MCS_NOT_SUPPORTED)
continue;

switch (ap_mcs) {
default:
if (our_mcs <= ap_mcs)
Expand Down

0 comments on commit 24af717

Please sign in to comment.