diff mbox

mac80211: don't allow 40MHz tx rates in case of 20MHz chandef

Message ID 1415722282-29309-1-git-send-email-egrumbach@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Emmanuel Grumbach Nov. 11, 2014, 4:11 p.m. UTC
From: Eliad Peller <eliad@wizery.com>

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>
---
 net/mac80211/vht.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Johannes Berg Nov. 19, 2014, 5:37 p.m. UTC | #1
On Tue, 2014-11-11 at 18:11 +0200, Emmanuel Grumbach wrote:
> From: Eliad Peller <eliad@wizery.com>
> 
> 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.

Applied. If we need to backport it please send it to stable once it hits
mainline.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index 671ce0d..bc9e8fc 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -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;