All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
@ 2015-04-07 16:05 Ilan Peer
  2015-04-07 16:05 ` [PATCH 2/2] mac80211_hwsim: Fix the supported VHT mcs rates Ilan Peer
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Ilan Peer @ 2015-04-07 16:05 UTC (permalink / raw)
  To: linux-wireless; +Cc: 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.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] mac80211_hwsim: Fix the supported VHT mcs rates
  2015-04-07 16:05 [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band Ilan Peer
@ 2015-04-07 16:05 ` Ilan Peer
  2015-04-07 16:08 ` [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band Ben Greear
  2015-05-06 12:53 ` Johannes Berg
  2 siblings, 0 replies; 11+ messages in thread
From: Ilan Peer @ 2015-04-07 16:05 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ilan Peer

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

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
  2015-04-07 16:05 [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band Ilan Peer
  2015-04-07 16:05 ` [PATCH 2/2] mac80211_hwsim: Fix the supported VHT mcs rates Ilan Peer
@ 2015-04-07 16:08 ` Ben Greear
  2015-04-08 18:29   ` Peer, Ilan
  2015-05-06 12:53 ` Johannes Berg
  2 siblings, 1 reply; 11+ messages in thread
From: Ben Greear @ 2015-04-07 16:08 UTC (permalink / raw)
  To: Ilan Peer; +Cc: linux-wireless

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 <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
  2015-04-07 16:08 ` [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band Ben Greear
@ 2015-04-08 18:29   ` Peer, Ilan
  2015-04-08 18:41     ` Johannes Berg
                       ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Peer, Ilan @ 2015-04-08 18:29 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless

Hi Ben,

> -----Original Message-----
> From: Ben Greear [mailto:greearb@candelatech.com]
> Sent: Tuesday, April 07, 2015 19:08
> To: Peer, Ilan
> Cc: linux-wireless@vger.kernel.org
> 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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
  2015-04-08 18:29   ` Peer, Ilan
@ 2015-04-08 18:41     ` Johannes Berg
  2015-04-08 18:41     ` Ben Greear
  2015-04-09  7:35     ` Jouni Malinen
  2 siblings, 0 replies; 11+ messages in thread
From: Johannes Berg @ 2015-04-08 18:41 UTC (permalink / raw)
  To: Peer, Ilan; +Cc: Ben Greear, linux-wireless

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
  2015-04-08 18:29   ` Peer, Ilan
  2015-04-08 18:41     ` Johannes Berg
@ 2015-04-08 18:41     ` Ben Greear
  2015-04-09  7:35     ` Jouni Malinen
  2 siblings, 0 replies; 11+ messages in thread
From: Ben Greear @ 2015-04-08 18:41 UTC (permalink / raw)
  To: Peer, Ilan; +Cc: linux-wireless

On 04/08/2015 11:29 AM, Peer, Ilan wrote:
> Hi Ben,
> 
>> -----Original Message-----
>> From: Ben Greear [mailto:greearb@candelatech.com]
>> Sent: Tuesday, April 07, 2015 19:08
>> To: Peer, Ilan
>> Cc: linux-wireless@vger.kernel.org
>> 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 <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
  2015-04-08 18:29   ` Peer, Ilan
  2015-04-08 18:41     ` Johannes Berg
  2015-04-08 18:41     ` Ben Greear
@ 2015-04-09  7:35     ` Jouni Malinen
  2015-04-09 11:01       ` Krishna Chaitanya
  2015-04-10 10:39       ` Johannes Berg
  2 siblings, 2 replies; 11+ messages in thread
From: Jouni Malinen @ 2015-04-09  7:35 UTC (permalink / raw)
  To: Peer, Ilan; +Cc: Ben Greear, linux-wireless

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
  2015-04-09  7:35     ` Jouni Malinen
@ 2015-04-09 11:01       ` Krishna Chaitanya
  2015-04-10 10:39       ` Johannes Berg
  1 sibling, 0 replies; 11+ messages in thread
From: Krishna Chaitanya @ 2015-04-09 11:01 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: Peer, Ilan, Ben Greear, linux-wireless

On Thu, Apr 9, 2015 at 1:05 PM, Jouni Malinen <j@w1.fi> 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?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
  2015-04-09  7:35     ` Jouni Malinen
  2015-04-09 11:01       ` Krishna Chaitanya
@ 2015-04-10 10:39       ` Johannes Berg
  2015-04-10 14:16         ` Jouni Malinen
  1 sibling, 1 reply; 11+ messages in thread
From: Johannes Berg @ 2015-04-10 10:39 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: Peer, Ilan, Ben Greear, linux-wireless

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
  2015-04-10 10:39       ` Johannes Berg
@ 2015-04-10 14:16         ` Jouni Malinen
  0 siblings, 0 replies; 11+ messages in thread
From: Jouni Malinen @ 2015-04-10 14:16 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Peer, Ilan, Ben Greear, linux-wireless

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
  2015-04-07 16:05 [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band Ilan Peer
  2015-04-07 16:05 ` [PATCH 2/2] mac80211_hwsim: Fix the supported VHT mcs rates Ilan Peer
  2015-04-07 16:08 ` [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band Ben Greear
@ 2015-05-06 12:53 ` Johannes Berg
  2 siblings, 0 replies; 11+ messages in thread
From: Johannes Berg @ 2015-05-06 12:53 UTC (permalink / raw)
  To: Ilan Peer; +Cc: linux-wireless

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-06 12:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07 16:05 [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band Ilan Peer
2015-04-07 16:05 ` [PATCH 2/2] mac80211_hwsim: Fix the supported VHT mcs rates Ilan Peer
2015-04-07 16:08 ` [PATCH 1/2] mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band Ben Greear
2015-04-08 18:29   ` Peer, Ilan
2015-04-08 18:41     ` Johannes Berg
2015-04-08 18:41     ` Ben Greear
2015-04-09  7:35     ` Jouni Malinen
2015-04-09 11:01       ` Krishna Chaitanya
2015-04-10 10:39       ` Johannes Berg
2015-04-10 14:16         ` Jouni Malinen
2015-05-06 12:53 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.