]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mac80211: don't allow 40MHz tx rates in case of 20MHz chandef
authorEliad Peller <eliad@wizery.com>
Tue, 11 Nov 2014 16:11:22 +0000 (18:11 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 19 Nov 2014 17:46:30 +0000 (18:46 +0100)
When 20MHz chandef is used, 40MHz rates shouldn't be
used (by the rate-control algorithm), even if the sta
ht capabilities indicate support for it.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Singed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/vht.c

index 671ce0d27a80b01bfa5d457ef6134a19d45ee208..bc9e8fc48785f940d2df58518ae9f0a55a105037 100644 (file)
@@ -287,6 +287,8 @@ enum ieee80211_sta_rx_bandwidth ieee80211_sta_cur_vht_bw(struct sta_info *sta)
                /* fall through */
        case NL80211_CHAN_WIDTH_20_NOHT:
        case NL80211_CHAN_WIDTH_20:
+               bw = IEEE80211_STA_RX_BW_20;
+               break;
        case NL80211_CHAN_WIDTH_40:
                bw = sta->sta.ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 ?
                                IEEE80211_STA_RX_BW_40 : IEEE80211_STA_RX_BW_20;