]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mac80211: prevent spurious HT/VHT downgrade message
authorJohannes Berg <johannes.berg@intel.com>
Thu, 14 Feb 2013 11:13:53 +0000 (12:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 16:26:01 +0000 (09:26 -0700)
commit 586e01ededf9b713a1512dd658806791a7ca1a50 upstream.

Even when connecting to an AP that doesn't support VHT,
and even when the local device doesn't support it either,
the downgrade message gets printed. Suppress the message
if HT and/or VHT is disabled.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc: Andrew Lutomirski <luto@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/mlme.c

index 9979bf8d162fba28d807fa265e76ff91d9f0cc7f..e14e676d3bd0873c5302840ffdf91c7251ec41c4 100644 (file)
@@ -3401,6 +3401,10 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
        ret = 0;
 
 out:
+       /* don't print the message below for VHT mismatch if VHT is disabled */
+       if (ret & IEEE80211_STA_DISABLE_VHT)
+               vht_chandef = *chandef;
+
        while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef,
                                        IEEE80211_CHAN_DISABLED)) {
                if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) {