2015-04-07 16:05:32

by Ilan Peer

[permalink] [raw]
Subject: [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.

Signed-off-by: Ilan Peer <[email protected]>
---
drivers/net/wireless/mac80211_hwsim.c | 50 +++++++++++++++++------------------
1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index d5c0a1a..2f0ebda 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -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 */
--
1.9.1



2015-04-10 10:39:56

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

On Thu, 2015-04-09 at 10:35 +0300, Jouni Malinen wrote:
> On Wed, Apr 08, 2015 at 06:29:38PM +0000, Peer, Ilan wrote:
> > 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.

> 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.

> 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


2015-04-08 18:41:19

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

On Wed, 2015-04-08 at 18:29 +0000, Peer, Ilan wrote:

> > 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


2015-04-09 11:02:18

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

On Thu, Apr 9, 2015 at 1:05 PM, Jouni Malinen <[email protected]> wrote:
> On Wed, Apr 08, 2015 at 06:29:38PM +0000, Peer, Ilan wrote:
>> 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?
>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?

2015-04-09 07:35:28

by Jouni Malinen

[permalink] [raw]
Subject: Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

On Wed, Apr 08, 2015 at 06:29:38PM +0000, Peer, Ilan wrote:
> 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.

--
Jouni Malinen PGP id EFC895FA

2015-04-07 16:05:36

by Ilan Peer

[permalink] [raw]
Subject: [PATCH 2/2] mac80211_hwsim: Fix the supported VHT mcs rates

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

Signed-off-by: Ilan Peer <[email protected]>
---
drivers/net/wireless/mac80211_hwsim.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 2f0ebda..c5f5841 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -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;
--
1.9.1


2015-04-08 18:41:33

by Ben Greear

[permalink] [raw]
Subject: Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

On 04/08/2015 11:29 AM, Peer, Ilan wrote:
> Hi Ben,
>
>> -----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:
>>> 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

--
Ben Greear <[email protected]>
Candela Technologies Inc http://www.candelatech.com


2015-04-10 14:16:34

by Jouni Malinen

[permalink] [raw]
Subject: Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

On Fri, Apr 10, 2015 at 12:39:48PM +0200, Johannes Berg wrote:
> On Thu, 2015-04-09 at 10:35 +0300, Jouni Malinen wrote:
> > 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).

> > 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.

--
Jouni Malinen PGP id EFC895FA

2015-04-07 16:08:21

by Ben Greear

[permalink] [raw]
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:
> 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

--
Ben Greear <[email protected]>
Candela Technologies Inc http://www.candelatech.com


2015-04-08 18:29:43

by Ilan Peer

[permalink] [raw]
Subject: RE: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

Hi Ben,

> -----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:
> > 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.


2015-05-06 12:53:28

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band

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