Skip to contentSkip to conversation

mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

PATCH In review Ilan Peer 5 participants 11 messages Apr 7, 2015 – May 6, 2015 Networking drivers (wireless)

lore
Share & tools
lore

Ilan Peer

author
#0 lore raw

PATCH 1/2 mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

Previously, VHT capabilities and supported MCSs where set for all bands, although VHT is only allowed on 5.2 GHz band. Fix it.

---
 drivers/net/wireless/mac80211_hwsim.c | 50 +++++++++++++++++------------------
 1 file changed, 25 insertions(+), 25 deletions(-)
drivers/net/wireless/mac80211_hwsim.c +25 -25
index d5c0a1a..2f0ebda 100644
@@ -2438,6 +2438,31 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
 			sband->n_channels = ARRAY_SIZE(hwsim_channels_5ghz);
 			sband->bitrates = data->rates + 4;
 			sband->n_bitrates = ARRAY_SIZE(hwsim_rates) - 4;
+
+			sband->vht_cap.vht_supported = true;
+			sband->vht_cap.cap =
+				IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 |
+				IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ |
+				IEEE80211_VHT_CAP_RXLDPC |
+				IEEE80211_VHT_CAP_SHORT_GI_80 |
+				IEEE80211_VHT_CAP_SHORT_GI_160 |
+				IEEE80211_VHT_CAP_TXSTBC |
+				IEEE80211_VHT_CAP_RXSTBC_1 |
+				IEEE80211_VHT_CAP_RXSTBC_2 |
+				IEEE80211_VHT_CAP_RXSTBC_3 |
+				IEEE80211_VHT_CAP_RXSTBC_4 |
+				IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
+			sband->vht_cap.vht_mcs.rx_mcs_map =
+				cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_8 << 0 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_8 << 2 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 4 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_8 << 6 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_8 << 8 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 10 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 12 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_8 << 14);
+			sband->vht_cap.vht_mcs.tx_mcs_map =
+				sband->vht_cap.vht_mcs.rx_mcs_map;
 			break;
 		default:
 			continue;
@@ -2458,31 +2483,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
 		sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
 
 		hw->wiphy->bands[band] = sband;
-
-		sband->vht_cap.vht_supported = true;
-		sband->vht_cap.cap =
-			IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 |
-			IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ |
-			IEEE80211_VHT_CAP_RXLDPC |
-			IEEE80211_VHT_CAP_SHORT_GI_80 |
-			IEEE80211_VHT_CAP_SHORT_GI_160 |
-			IEEE80211_VHT_CAP_TXSTBC |
-			IEEE80211_VHT_CAP_RXSTBC_1 |
-			IEEE80211_VHT_CAP_RXSTBC_2 |
-			IEEE80211_VHT_CAP_RXSTBC_3 |
-			IEEE80211_VHT_CAP_RXSTBC_4 |
-			IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
-		sband->vht_cap.vht_mcs.rx_mcs_map =
-			cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_8 << 0 |
-				    IEEE80211_VHT_MCS_SUPPORT_0_8 << 2 |
-				    IEEE80211_VHT_MCS_SUPPORT_0_9 << 4 |
-				    IEEE80211_VHT_MCS_SUPPORT_0_8 << 6 |
-				    IEEE80211_VHT_MCS_SUPPORT_0_8 << 8 |
-				    IEEE80211_VHT_MCS_SUPPORT_0_9 << 10 |
-				    IEEE80211_VHT_MCS_SUPPORT_0_9 << 12 |
-				    IEEE80211_VHT_MCS_SUPPORT_0_8 << 14);
-		sband->vht_cap.vht_mcs.tx_mcs_map =
-			sband->vht_cap.vht_mcs.rx_mcs_map;
 	}
 
 	/* By default all radios belong to the first group */
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 2/2 mac80211_hwsim: Fix the supported VHT mcs rates

Declare that MCS 0-9 are supported for all Rx chains.

---
 drivers/net/wireless/mac80211_hwsim.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/wireless/mac80211_hwsim.c +5 -5
index 2f0ebda..c5f5841 100644
@@ -2453,14 +2453,14 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
 				IEEE80211_VHT_CAP_RXSTBC_4 |
 				IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
 			sband->vht_cap.vht_mcs.rx_mcs_map =
-				cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_8 << 0 |
-					    IEEE80211_VHT_MCS_SUPPORT_0_8 << 2 |
+				cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_9 << 0 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 2 |
 					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 4 |
-					    IEEE80211_VHT_MCS_SUPPORT_0_8 << 6 |
-					    IEEE80211_VHT_MCS_SUPPORT_0_8 << 8 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 6 |
+					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 8 |
 					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 10 |
 					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 12 |
-					    IEEE80211_VHT_MCS_SUPPORT_0_8 << 14);
+					    IEEE80211_VHT_MCS_SUPPORT_0_9 << 14);
 			sband->vht_cap.vht_mcs.tx_mcs_map =
 				sband->vht_cap.vht_mcs.rx_mcs_map;
 			break;
Signature · 1 line
1.9.1
#2 lore raw
In reply to Ilan Peer
Quoted 2 lines · Ilan Peer

Previously, VHT capabilities and supported MCSs where set for all bands, although VHT is only allowed on 5.2 GHz band. Fix it.

I saw a patch on ath10k list that enabled VHT for 2.4Ghz for that driver/firmware...are you sure it is absolutely not supported?

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
author
#3 lore raw

Hi Ben,

Quoted 8 lines

-----Original Message-----
From: Ben Greear [mailto:[email protected]]
Sent: Tuesday, April 07, 2015 19:08
To: Peer, Ilan
Cc: [email protected]
Subject: Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

Quoted 7 lines
Quoted 2 lines · Ilan Peer

Previously, VHT capabilities and supported MCSs where set for all bands, although VHT is only allowed on 5.2 GHz band. Fix it.

I saw a patch on ath10k list that enabled VHT for 2.4Ghz for that driver/firmware...are you sure it is absolutely not supported?

According to the 802.11ac amendment: "The IEEE 802.11 VHT STA operates in frequency bands below 6 GHz excluding the 2.4 GHz band", so at least the spec. is clear about it. However, I guess it would be possible to enable VHT for 2.4 as well to enjoy some of benefits, but do you see a reason/use case to enable it also for hwsim?

Regards,

Ilan.

maintainer
#4 lore raw
Quoted 8 lines · Ilan
Quoted 2 lines

I saw a patch on ath10k list that enabled VHT for 2.4Ghz for that driver/firmware...are you sure it is absolutely not supported?

According to the 802.11ac amendment: "The IEEE 802.11 VHT STA operates in frequency bands below 6 GHz excluding the 2.4 GHz band", so at least the spec. is clear about it. However, I guess it would be possible to enable VHT for 2.4 as well to enjoy some of benefits, but do you see a reason/use case to enable it also for hwsim?

In addition to this: there's some interest with vendors to enable the higher MCSes that VHT has on 2.4 GHz, so have only 20/40 MHz bandwidth but with up to MCS 9. This is a bit problematic as the standard doesn't really allow this, since as soon as you have VHT IEs you implicitly have support for 80 MHz.

There's some ongoing analysis in this area to see how vendors would really want to do this IIRC, but for now I think we should disable it here in hwsim to match what the real devices are doing, and once we figure out how we want to handle the higher MCSes in 2.4 GHz we can enable the same in hwsim.

johannes

#5 lore raw
In reply to Peer, Ilan
Quoted 11 lines · Ilan

Hi Ben,

Quoted 9 lines

-----Original Message-----
From: Ben Greear [mailto:[email protected]]
Sent: Tuesday, April 07, 2015 19:08
To: Peer, Ilan
Cc: [email protected]
Subject: Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

On 04/07/2015 09:05 AM, Ilan Peer wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Previously, VHT capabilities and supported MCSs where set for all bands, although VHT is only allowed on 5.2 GHz band. Fix it.

I saw a patch on ath10k list that enabled VHT for 2.4Ghz for that driver/firmware...are you sure it is absolutely not supported?

According to the 802.11ac amendment: "The IEEE 802.11 VHT STA operates in frequency bands below 6 GHz excluding the 2.4 GHz band", so at least the spec. is clear about it. However, I guess it would be possible to enable VHT for 2.4 as well to enjoy some of benefits, but do you see a reason/use case to enable it also for hwsim?

I just don't see a reason to forbid it since hwsim never goes over the air, and at least some hardware appears to support AC on 2.4, but I don't care strongly about the issue one way or another.

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#6 lore raw
In reply to Peer, Ilan
Quoted 1 line · Ilan

According to the 802.11ac amendment: "The IEEE 802.11 VHT STA operates in frequency bands below 6 GHz excluding the 2.4 GHz band", so at least the spec. is clear about it. However, I guess it would be possible to enable VHT for 2.4 as well to enjoy some of benefits, but do you see a reason/use case to enable it also for hwsim?

It does not matter what the standard says on VHT in general; there are clearly already products out there that allow some capabilities defined in 802.11ac (mainly, 256-QAM) to be used on the 2.4 GHz band. As far as hwsim is concerned, I'm already using it to verify the negotiation part for this (see ap_vht_on_24ghz test case). The main remaining question for cfg80211/nl80211 is on whether we can come up with a clean way of advertising driver capability for doing this.

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
#7 lore raw
Quoted 6 lines · Jouni Malinen
Quoted 1 line · Ilan

According to the 802.11ac amendment: "The IEEE 802.11 VHT STA operates in frequency bands below 6 GHz excluding the 2.4 GHz band", so at least the spec. is clear about it. However, I guess it would be possible to enable VHT for 2.4 as well to enjoy some of benefits, but do you see a reason/use case to enable it also for hwsim?

It does not matter what the standard says on VHT in general; there are clearly already products out there that allow some capabilities defined in 802.11ac (mainly, 256-QAM) to be used on the 2.4 GHz band.

Can you name a few for reference?

Quoted 5 lines

As far as
hwsim is concerned, I'm already using it to verify the negotiation part for this (see ap_vht_on_24ghz test case). The main remaining question for cfg80211/nl80211 is on whether we can come up with a clean way of advertising driver capability for doing this.

In order to properly utilize these we need to incorporate these capabilities
in to minstrel RC as well. Any plans for that?

maintainer
#8 lore raw
In reply to Jouni Malinen
Quoted 6 lines · Jouni Malinen
Quoted 1 line · Ilan

According to the 802.11ac amendment: "The IEEE 802.11 VHT STA operates in frequency bands below 6 GHz excluding the 2.4 GHz band", so at least the spec. is clear about it. However, I guess it would be possible to enable VHT for 2.4 as well to enjoy some of benefits, but do you see a reason/use case to enable it also for hwsim?

It does not matter what the standard says on VHT in general; there are clearly already products out there that allow some capabilities defined in 802.11ac (mainly, 256-QAM) to be used on the 2.4 GHz band.

Sure.

Quoted 3 lines

As far as
hwsim is concerned, I'm already using it to verify the negotiation part for this (see ap_vht_on_24ghz test case).

Oh, I guess I can't apply this patch then. But perhaps we should make this an optional capability so we can create a new virtual radio with/without it.

Quoted 3 lines

The main remaining question
for cfg80211/nl80211 is on whether we can come up with a clean way of advertising driver capability for doing this.

I'm not even sure what the question really is. Really you want just high MCSes, but what should happen OTA? Is interoperability even *desired*, given that it will never be tested?

johannes

#9 lore raw
Quoted 8 lines · Johannes Berg
Quoted 3 lines · Jouni Malinen

As far as
hwsim is concerned, I'm already using it to verify the negotiation part for this (see ap_vht_on_24ghz test case).

Oh, I guess I can't apply this patch then. But perhaps we should make this an optional capability so we can create a new virtual radio with/without it.

Well.. It did not look like this patch on its own would actually break the test since there is no reliable way of indicating support for this special case nor really any part in the test to verify that the special TX rates were used (rate control does not even support them for hwsim).

Quoted 7 lines
Quoted 3 lines

The main remaining question
for cfg80211/nl80211 is on whether we can come up with a clean way of advertising driver capability for doing this.

I'm not even sure what the question really is. Really you want just high MCSes, but what should happen OTA? Is interoperability even *desired*, given that it will never be tested?

For now, it looks like there is interoperability between vendors as long as there is agreement on which vendor specific extensions to use for advertising it. hostapd has an implementation that matches the one used by number of Broadcom devices. I'd say that interoperability is desired. I'm not sure what you mean with interoperability never being tested, though. There may not be a formal certification program for this, but this has been tested.

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
maintainer
#10 lore raw
In reply to Ilan Peer

Ok, after all the discussion I've applied this.

When we decide how to advertise QAM-256 support on 2.4 GHz we can look at adding it to hwsim as well.

johannes