Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1511163 > unrolled thread

[PATCH] mac80211: Ignore VHT IE from peer with wrong rx_mcs_map

Started byFilip Matusiak <filip.matusiak@tieto.com>
First post2016-10-28 16:50 +0200
Last post2016-10-28 17:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mac80211: Ignore VHT IE from peer with wrong rx_mcs_map Filip Matusiak <filip.matusiak@tieto.com> - 2016-10-28 16:50 +0200
    Re: [PATCH] mac80211: Ignore VHT IE from peer with wrong rx_mcs_map Johannes Berg <johannes@sipsolutions.net> - 2016-10-28 17:50 +0200

#1511163 — [PATCH] mac80211: Ignore VHT IE from peer with wrong rx_mcs_map

FromFilip Matusiak <filip.matusiak@tieto.com>
Date2016-10-28 16:50 +0200
Subject[PATCH] mac80211: Ignore VHT IE from peer with wrong rx_mcs_map
Message-ID<sxgDM-19i-7@gated-at.bofh.it>
This is a workaround for VHT-enabled STAs which break the spec
and have the VHT-MCS Rx map filled in with value 3 for all eight
spacial streams.

As per spec, in section 22.1.1 Introduction to the VHT PHY
A VHT STA shall support at least single spactial stream VHT-MCSs
0 to 7 (transmit and receive) in all supported channel widths.

For some devices firmware asserts if such situation occurs.

Signed-off-by: Filip Matusiak <filip.matusiak@tieto.com>
---
 net/mac80211/vht.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index ee71576..ce93cff 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -270,6 +270,22 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata,
 		vht_cap->vht_mcs.tx_mcs_map |= cpu_to_le16(peer_tx << i * 2);
 	}
 
+	/*
+	 * This is a workaround for VHT-enabled STAs which break the spec
+	 * and have the VHT-MCS Rx map filled in with value 3 for all eight
+	 * spacial streams.
+	 *
+	 * As per spec, in section 22.1.1 Introduction to the VHT PHY
+	 * A VHT STA shall support at least single spactial stream VHT-MCSs
+	 * 0 to 7 (transmit and receive) in all supported channel widths.
+	 */
+	if (vht_cap->vht_mcs.rx_mcs_map == cpu_to_le16(0xFFFF)) {
+		vht_cap->vht_supported = false;
+		sdata_info(sdata, "Ignoring VHT IE from %pM due to invalid rx_mcs_map\n",
+			   sta->addr);
+		return;
+	}
+
 	/* finally set up the bandwidth */
 	switch (vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
 	case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ:
-- 
2.7.4

[toc] | [next] | [standalone]


#1511184

FromJohannes Berg <johannes@sipsolutions.net>
Date2016-10-28 17:50 +0200
Message-ID<sxhzQ-1Im-9@gated-at.bofh.it>
In reply to#1511163
On Fri, 2016-10-28 at 16:38 +0200, Filip Matusiak wrote:
> This is a workaround for VHT-enabled STAs which break the spec
> and have the VHT-MCS Rx map filled in with value 3 for all eight
> spacial streams.
> 
> As per spec, in section 22.1.1 Introduction to the VHT PHY
> A VHT STA shall support at least single spactial stream VHT-MCSs
> 0 to 7 (transmit and receive) in all supported channel widths.

Interesting, and also kinda dumb :)

> +	/*
> +	 * This is a workaround for VHT-enabled STAs which break the
> 

I find that it helps, in the future, if we know an example of a station
that did this, so we can test other implementations etc. Can you change
the comment accordingly?

johannes

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web