All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v3] cfg80211/mac80211: 802.11ac changes
@ 2012-06-21 16:51 Mahesh Palivela
  2012-06-21 18:14 ` Johannes Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Mahesh Palivela @ 2012-06-21 16:51 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, johannes

VHT capabilities indication through NL layer
ieee_vht structs, definitions
VHT Cap IE in ProbeReq

signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
---
 include/linux/ieee80211.h  |   69 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/nl80211.h    |    6 ++++
 include/net/cfg80211.h     |   17 +++++++++++
 net/mac80211/ieee80211_i.h |    2 +
 net/mac80211/main.c        |    7 ++++-
 net/mac80211/util.c        |   25 ++++++++++++++++
 net/wireless/nl80211.c     |    9 ++++++
 7 files changed, 134 insertions(+), 1 deletions(-)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index ce9af89..1bed62d 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1072,6 +1072,72 @@ struct ieee80211_ht_operation {
 #define WLAN_HT_SMPS_CONTROL_STATIC	1
 #define WLAN_HT_SMPS_CONTROL_DYNAMIC	3
 
+#define VHT_MCS_SUPPORTED_SET_SIZE      8
+
+struct ieee80211_vht_capabilities {
+	__le32 vht_capabilities_info;
+	u8 vht_supported_mcs_set[VHT_MCS_SUPPORTED_SET_SIZE];
+} __packed;
+
+struct ieee80211_vht_operation {
+	u8 vht_op_info_chwidth;
+	u8 vht_op_info_chan_center_freq_seg1_idx;
+	u8 vht_op_info_chan_center_freq_seg2_idx;
+	__le16 vht_basic_mcs_set;
+} __packed;
+
+/**
+ * struct ieee80211_vht_mcs_info - VHT MCS information
+ * @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams
+ * @rx_highest: Indicates highest long GI VHT PPDU data rate
+ *	STA can receive. Rate expressed in units of 1 Mbps.
+ *	If this field is 0 this value should not be used to
+ *	consider the highest RX data rate supported.
+ * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams
+ * @tx_highest: Indicates highest long GI VHT PPDU data rate
+ *	STA can transmit. Rate expressed in units of 1 Mbps.
+ *	If this field is 0 this value should not be used to
+ *	consider the highest TX data rate supported.
+ */
+struct ieee80211_vht_mcs_info {
+	__le16 rx_mcs_map;
+	__le16 rx_highest;
+	__le16 tx_mcs_map;
+	__le16 tx_highest;
+} __packed;
+
+#define IEEE80211_VHT_MCS_ZERO_TO_SEVEN_SUPPORT 0
+#define IEEE80211_VHT_MCS_ZERO_TO_EIGHT_SUPPORT 1
+#define IEEE80211_VHT_MCS_ZERO_TO_NINE_SUPPORT  2
+#define IEEE80211_VHT_MCS_NOT_SUPPORTED 3
+
+/* 802.11ac VHT Capabilities */
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002
+#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ              0x00000004
+#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ     0x00000008
+#define IEEE80211_VHT_CAP_RXLDPC                              0x00000010
+#define IEEE80211_VHT_CAP_SHORT_GI_80                         0x00000020
+#define IEEE80211_VHT_CAP_SHORT_GI_160                        0x00000040
+#define IEEE80211_VHT_CAP_TXSTBC                              0x00000080
+#define IEEE80211_VHT_CAP_RXSTBC_1                            0x00000100
+#define IEEE80211_VHT_CAP_RXSTBC_2                            0x00000200
+#define IEEE80211_VHT_CAP_RXSTBC_3                            0x00000300
+#define IEEE80211_VHT_CAP_RXSTBC_4                            0x00000400
+#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE               0x00000800
+#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE               0x00001000
+#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX             0x00006000
+#define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX              0x00030000
+#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE               0x00080000
+#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE               0x00100000
+#define IEEE80211_VHT_CAP_VHT_TXOP_PS                         0x00200000
+#define IEEE80211_VHT_CAP_HTC_VHT                             0x00400000
+#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT          0x00800000
+#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB   0x08000000
+#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB     0x0c000000
+#define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN                  0x10000000
+#define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN                  0x20000000
+
 /* Authentication algorithms */
 #define WLAN_AUTH_OPEN 0
 #define WLAN_AUTH_SHARED_KEY 1
@@ -1332,6 +1398,9 @@ enum ieee80211_eid {
 	WLAN_EID_DSE_REGISTERED_LOCATION = 58,
 	WLAN_EID_SUPPORTED_REGULATORY_CLASSES = 59,
 	WLAN_EID_EXT_CHANSWITCH_ANN = 60,
+
+	WLAN_EID_VHT_CAPABILITY = 191,
+	WLAN_EID_VHT_OPERATION = 192,
 };
 
 /* Action category code */
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 970afdf..16ea46e 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1792,6 +1792,9 @@ enum nl80211_mpath_info {
  * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE
  * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n
  * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n
+ * @NL80211_BAND_ATTR_VHT_MCS_SET: 32-byte attribute containing the MCS set as
+ *	defined in 802.11ac
+ * @NL80211_BAND_ATTR_VHT_CAPA: VHT capabilities, as in the HT information IE
  * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined
  * @__NL80211_BAND_ATTR_AFTER_LAST: internal use
  */
@@ -1805,6 +1808,9 @@ enum nl80211_band_attr {
 	NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
 	NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
 
+	NL80211_BAND_ATTR_VHT_MCS_SET,
+	NL80211_BAND_ATTR_VHT_CAPA,
+
 	/* keep last */
 	__NL80211_BAND_ATTR_AFTER_LAST,
 	NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 7319f25..5a4e5b3 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -211,6 +211,22 @@ struct ieee80211_sta_ht_cap {
 };
 
 /**
+ * struct ieee80211_sta_vht_cap - STA's VHT capabilities
+ *
+ * This structure describes most essential parameters needed
+ * to describe 802.11ac VHT capabilities for an STA.
+ *
+ * @vht_supported: is VHT supported by the STA
+ * @cap: VHT capabilities map as described in 802.11ac spec
+ * @vht_mcs: Supported VHT MCS rates
+ */
+struct ieee80211_sta_vht_cap {
+	bool vht_supported;
+	u32 cap; /* use IEEE80211_VHT_CAP_ */
+	struct ieee80211_vht_mcs_info vht_mcs;
+};
+
+/**
  * struct ieee80211_supported_band - frequency band definition
  *
  * This structure describes a frequency band a wiphy
@@ -233,6 +249,7 @@ struct ieee80211_supported_band {
 	int n_channels;
 	int n_bitrates;
 	struct ieee80211_sta_ht_cap ht_cap;
+	struct ieee80211_sta_vht_cap vht_cap;
 };
 
 /*
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index e6cbf5b..bd37ed7 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1471,6 +1471,8 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
 			       struct ieee80211_channel *channel,
 			       enum nl80211_channel_type channel_type,
 			       u16 prot_mode);
+u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
+					u32 cap);
 
 /* channel management */
 enum ieee80211_chan_mode {
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index d81c178..be36a0a 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -679,7 +679,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	int result, i;
 	enum ieee80211_band band;
 	int channels, max_bitrates;
-	bool supp_ht;
+	bool supp_ht, supp_vht;
 	netdev_features_t feature_whitelist;
 	static const u32 cipher_suites[] = {
 		/* keep WEP first, it may be removed below */
@@ -724,6 +724,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	channels = 0;
 	max_bitrates = 0;
 	supp_ht = false;
+	supp_vht = false;
 	for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
 		struct ieee80211_supported_band *sband;
 
@@ -741,6 +742,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 		if (max_bitrates < sband->n_bitrates)
 			max_bitrates = sband->n_bitrates;
 		supp_ht = supp_ht || sband->ht_cap.ht_supported;
+		supp_vht = supp_vht || sband->vht_cap.vht_supported;
 	}
 
 	local->int_scan_req = kzalloc(sizeof(*local->int_scan_req) +
@@ -816,6 +818,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	if (supp_ht)
 		local->scan_ies_len += 2 + sizeof(struct ieee80211_ht_cap);
 
+	if (supp_vht)
+		local->scan_ies_len += 2 + sizeof(struct ieee80211_vht_capabilities);
+
 	if (!local->ops->hw_scan) {
 		/* For hw_scan, driver needs to set these up. */
 		local->hw.wiphy->max_scan_ssids = 4;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 1df4019..cccf82e 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1072,6 +1072,10 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
 		pos += noffset - offset;
 	}
 
+	if (sband->vht_cap.vht_supported)
+		pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap,
+						sband->vht_cap.cap);
+
 	return pos - buffer;
 }
 
@@ -1696,6 +1700,27 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
 	return pos;
 }
 
+u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
+			      u32 cap)
+{
+	__le32 tmp;
+
+	*pos++ = WLAN_EID_VHT_CAPABILITY;
+	*pos++ = sizeof(struct ieee80211_vht_capabilities);
+	memset(pos, 0, sizeof(struct ieee80211_vht_capabilities));
+
+	/* capability flags */
+	tmp = cpu_to_le16(cap);
+	memcpy(pos, &tmp, sizeof(u32));
+	pos += sizeof(u32);
+
+	/* VHT MCS set */
+	memcpy(pos, &vht_cap->vht_mcs, sizeof(vht_cap->vht_mcs));
+	pos += sizeof(vht_cap->vht_mcs);
+
+	return pos;
+}
+
 u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
 			       struct ieee80211_channel *channel,
 			       enum nl80211_channel_type channel_type,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7ae54b8..bd41a5f 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -832,6 +832,15 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
 				dev->wiphy.bands[band]->ht_cap.ampdu_density)))
 			goto nla_put_failure;
 
+		/* add VHT info */
+		if (dev->wiphy.bands[band]->vht_cap.vht_supported &&
+		    (nla_put(msg, NL80211_BAND_ATTR_VHT_MCS_SET,
+			     sizeof(dev->wiphy.bands[band]->vht_cap.vht_mcs),
+			     &dev->wiphy.bands[band]->vht_cap.vht_mcs) ||
+		     nla_put_u32(msg, NL80211_BAND_ATTR_VHT_CAPA,
+				 dev->wiphy.bands[band]->vht_cap.cap)))
+			goto nla_put_failure;
+
 		/* add frequencies */
 		nl_freqs = nla_nest_start(msg, NL80211_BAND_ATTR_FREQS);
 		if (!nl_freqs)

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

* Re: [RFC v3] cfg80211/mac80211: 802.11ac changes
  2012-06-21 16:51 [RFC v3] cfg80211/mac80211: 802.11ac changes Mahesh Palivela
@ 2012-06-21 18:14 ` Johannes Berg
  2012-06-21 18:34   ` Arend van Spriel
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2012-06-21 18:14 UTC (permalink / raw)
  To: Mahesh Palivela; +Cc: linville, linux-wireless

On Thu, 2012-06-21 at 16:51 +0000, Mahesh Palivela wrote:

> +/* 802.11ac VHT Capabilities */
> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002

I have a feeling there should be a value for 3895, since this isn't
really a bitfield only (it doesn't make sense to set both of these, in
fact 3 is reserved)

> +#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ              0x00000004
> +#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ     0x00000008

same here, you might otherwise be tempted to set both?


> +       u8 vht_supported_mcs_set[VHT_MCS_SUPPORTED_SET_SIZE];

might make sense to break that down further into RX/TX etc?

johannes


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

* Re: [RFC v3] cfg80211/mac80211: 802.11ac changes
  2012-06-21 18:14 ` Johannes Berg
@ 2012-06-21 18:34   ` Arend van Spriel
  2012-06-21 18:39     ` Johannes Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Arend van Spriel @ 2012-06-21 18:34 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Mahesh Palivela, linville, linux-wireless

On 06/21/2012 08:14 PM, Johannes Berg wrote:
> On Thu, 2012-06-21 at 16:51 +0000, Mahesh Palivela wrote:
> 
>> +/* 802.11ac VHT Capabilities */
>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002
> 
> I have a feeling there should be a value for 3895, since this isn't
> really a bitfield only (it doesn't make sense to set both of these, in
> fact 3 is reserved)

These are matching the values specified for the VHP Capability Info IE.
3895 is specified as 0. Value 3 is reserved because it is not to be
regarded as a bit field.

Gr. AvS


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

* Re: [RFC v3] cfg80211/mac80211: 802.11ac changes
  2012-06-21 18:34   ` Arend van Spriel
@ 2012-06-21 18:39     ` Johannes Berg
  2012-06-21 19:02       ` Arend van Spriel
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2012-06-21 18:39 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: Mahesh Palivela, linville, linux-wireless

On Thu, 2012-06-21 at 20:34 +0200, Arend van Spriel wrote:
> On 06/21/2012 08:14 PM, Johannes Berg wrote:
> > On Thu, 2012-06-21 at 16:51 +0000, Mahesh Palivela wrote:
> > 
> >> +/* 802.11ac VHT Capabilities */
> >> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
> >> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002
> > 
> > I have a feeling there should be a value for 3895, since this isn't
> > really a bitfield only (it doesn't make sense to set both of these, in
> > fact 3 is reserved)
> 
> These are matching the values specified for the VHP Capability Info IE.
> 3895 is specified as 0. Value 3 is reserved because it is not to be
> regarded as a bit field.

Right, but I think it'd make more sense to actually have the 3895 value
as a constant here so you're not tempted to think that you could set
both bits? anyway ... I hope whoever adds VHT to their driver knows what
they're doing so it doesn't matter much :)

johannes


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

* Re: [RFC v3] cfg80211/mac80211: 802.11ac changes
  2012-06-21 18:39     ` Johannes Berg
@ 2012-06-21 19:02       ` Arend van Spriel
  2012-06-22  3:06         ` Mahesh Palivela
  0 siblings, 1 reply; 9+ messages in thread
From: Arend van Spriel @ 2012-06-21 19:02 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Mahesh Palivela, linville, linux-wireless

On 06/21/2012 08:39 PM, Johannes Berg wrote:
> On Thu, 2012-06-21 at 20:34 +0200, Arend van Spriel wrote:
>> On 06/21/2012 08:14 PM, Johannes Berg wrote:
>>> On Thu, 2012-06-21 at 16:51 +0000, Mahesh Palivela wrote:
>>>
>>>> +/* 802.11ac VHT Capabilities */
>>>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
>>>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002
>>>
>>> I have a feeling there should be a value for 3895, since this isn't
>>> really a bitfield only (it doesn't make sense to set both of these, in
>>> fact 3 is reserved)
>>
>> These are matching the values specified for the VHP Capability Info IE.
>> 3895 is specified as 0. Value 3 is reserved because it is not to be
>> regarded as a bit field.
> 
> Right, but I think it'd make more sense to actually have the 3895 value
> as a constant here so you're not tempted to think that you could set

Understood. I though you were suggesting

+/* 802.11ac VHT Capabilities */
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895   1
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991   2
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454  3

for internal use. I agree adding 0 value for 3895 clarifies that it is
not a bitfield.

> both bits? anyway ... I hope whoever adds VHT to their driver knows what
> they're doing so it doesn't matter much :)

I hope so too :-p

> johannes
> 
> 


Gr. AvS


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

* RE: [RFC v3] cfg80211/mac80211: 802.11ac changes
  2012-06-21 19:02       ` Arend van Spriel
@ 2012-06-22  3:06         ` Mahesh Palivela
  2012-06-22  6:33           ` Johannes Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Mahesh Palivela @ 2012-06-22  3:06 UTC (permalink / raw)
  To: Arend van Spriel, Johannes Berg; +Cc: linville, linux-wireless

________________________________________
From: Arend van Spriel [arend@broadcom.com]
Sent: Friday, June 22, 2012 12:32 AM
To: Johannes Berg
Cc: Mahesh Palivela; linville@tuxdriver.com; linux-wireless@vger.kernel.org
Subject: Re: [RFC v3] cfg80211/mac80211: 802.11ac changes

On 06/21/2012 08:39 PM, Johannes Berg wrote:
> On Thu, 2012-06-21 at 20:34 +0200, Arend van Spriel wrote:
>> On 06/21/2012 08:14 PM, Johannes Berg wrote:
>>> On Thu, 2012-06-21 at 16:51 +0000, Mahesh Palivela wrote:
>>>
>>>> +/* 802.11ac VHT Capabilities */
>>>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
>>>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002
>>>
>>> I have a feeling there should be a value for 3895, since this isn't
>>> really a bitfield only (it doesn't make sense to set both of these, in
>>> fact 3 is reserved)
>>
>> These are matching the values specified for the VHP Capability Info IE.
>> 3895 is specified as 0. Value 3 is reserved because it is not to be
>> regarded as a bit field.
>
> Right, but I think it'd make more sense to actually have the 3895 value
> as a constant here so you're not tempted to think that you could set

[MP] Should I declare another constant for this?
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895   0

Understood. I though you were suggesting

+/* 802.11ac VHT Capabilities */
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895   1
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991   2
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454  3

for internal use. I agree adding 0 value for 3895 clarifies that it is
not a bitfield.

> both bits? anyway ... I hope whoever adds VHT to their driver knows what
> they're doing so it doesn't matter much :)

I hope so too :-p

> johannes
>
>


Gr. AvS


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

* RE: [RFC v3] cfg80211/mac80211: 802.11ac changes
  2012-06-22  3:06         ` Mahesh Palivela
@ 2012-06-22  6:33           ` Johannes Berg
  2012-06-22  6:47             ` Mahesh Palivela
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2012-06-22  6:33 UTC (permalink / raw)
  To: Mahesh Palivela; +Cc: Arend van Spriel, linville, linux-wireless

On Fri, 2012-06-22 at 03:06 +0000, Mahesh Palivela wrote:
> ________________________________________
> From: Arend van Spriel [arend@broadcom.com]
> Sent: Friday, June 22, 2012 12:32 AM
> To: Johannes Berg
> Cc: Mahesh Palivela; linville@tuxdriver.com; linux-wireless@vger.kernel.org
> Subject: Re: [RFC v3] cfg80211/mac80211: 802.11ac changes
> 
> On 06/21/2012 08:39 PM, Johannes Berg wrote:
> > On Thu, 2012-06-21 at 20:34 +0200, Arend van Spriel wrote:
> >> On 06/21/2012 08:14 PM, Johannes Berg wrote:
> >>> On Thu, 2012-06-21 at 16:51 +0000, Mahesh Palivela wrote:
> >>>
> >>>> +/* 802.11ac VHT Capabilities */
> >>>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
> >>>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002
> >>>
> >>> I have a feeling there should be a value for 3895, since this isn't
> >>> really a bitfield only (it doesn't make sense to set both of these, in
> >>> fact 3 is reserved)
> >>
> >> These are matching the values specified for the VHP Capability Info IE.
> >> 3895 is specified as 0. Value 3 is reserved because it is not to be
> >> regarded as a bit field.
> >
> > Right, but I think it'd make more sense to actually have the 3895 value
> > as a constant here so you're not tempted to think that you could set
> 
> [MP] Should I declare another constant for this?
> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895   0

Yes I think that would be good

johannes


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

* RE: [RFC v3] cfg80211/mac80211: 802.11ac changes
  2012-06-22  6:33           ` Johannes Berg
@ 2012-06-22  6:47             ` Mahesh Palivela
  2012-06-22  6:54               ` Johannes Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Mahesh Palivela @ 2012-06-22  6:47 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Arend van Spriel, linville, linux-wireless

________________________________________
From: Johannes Berg [johannes@sipsolutions.net]
Sent: Friday, June 22, 2012 12:03 PM
To: Mahesh Palivela
Cc: Arend van Spriel; linville@tuxdriver.com; linux-wireless@vger.kernel.org
Subject: RE: [RFC v3] cfg80211/mac80211: 802.11ac changes

On Fri, 2012-06-22 at 03:06 +0000, Mahesh Palivela wrote:
> ________________________________________
> From: Arend van Spriel [arend@broadcom.com]
> Sent: Friday, June 22, 2012 12:32 AM
> To: Johannes Berg
> Cc: Mahesh Palivela; linville@tuxdriver.com; linux-wireless@vger.kernel.org
> Subject: Re: [RFC v3] cfg80211/mac80211: 802.11ac changes
>
> On 06/21/2012 08:39 PM, Johannes Berg wrote:
> > On Thu, 2012-06-21 at 20:34 +0200, Arend van Spriel wrote:
> >> On 06/21/2012 08:14 PM, Johannes Berg wrote:
> >>> On Thu, 2012-06-21 at 16:51 +0000, Mahesh Palivela wrote:
> >>>
> >>>> +/* 802.11ac VHT Capabilities */
> >>>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
> >>>> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002
> >>>
> >>> I have a feeling there should be a value for 3895, since this isn't
> >>> really a bitfield only (it doesn't make sense to set both of these, in
> >>> fact 3 is reserved)
> >>
> >> These are matching the values specified for the VHP Capability Info IE.
> >> 3895 is specified as 0. Value 3 is reserved because it is not to be
> >> regarded as a bit field.
> >
> > Right, but I think it'd make more sense to actually have the 3895 value
> > as a constant here so you're not tempted to think that you could set
>
> [MP] Should I declare another constant for this?
> +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895   0

Yes I think that would be good

johannes

But every VHT capability bitfields value zero has a meaning.
Max_MPDU_len field is 2 bits. 0 - 3895, 1 - 7991, 2 - 11454, 3 - reserved
Supp_ch_width field is 2 bits. 0 - 160 MHz not supp, 1 - 160 MHz supp, 2 - 160/80+80 supp.
My point is should we have constant defines for all of those?

Thanks,
Mahesh

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

* RE: [RFC v3] cfg80211/mac80211: 802.11ac changes
  2012-06-22  6:47             ` Mahesh Palivela
@ 2012-06-22  6:54               ` Johannes Berg
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2012-06-22  6:54 UTC (permalink / raw)
  To: Mahesh Palivela; +Cc: Arend van Spriel, linville, linux-wireless

On Fri, 2012-06-22 at 06:47 +0000, Mahesh Palivela wrote:

> > [MP] Should I declare another constant for this?
> > +#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895   0
> 
> Yes I think that would be good

> But every VHT capability bitfields value zero has a meaning.
> Max_MPDU_len field is 2 bits. 0 - 3895, 1 - 7991, 2 - 11454, 3 - reserved
> Supp_ch_width field is 2 bits. 0 - 160 MHz not supp, 1 - 160 MHz supp, 2 - 160/80+80 supp.
> My point is should we have constant defines for all of those?

Not all, some are truly boolean like IEEE80211_VHT_CAP_TXSTBC which you
can turn on and off. I just think that for the ones that aren't really
bool because they occupy more than one bit would be worthwhile to list
all option?

Oh also can you send as [PATCH] soon? :)

johannes


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

end of thread, other threads:[~2012-06-22  6:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-21 16:51 [RFC v3] cfg80211/mac80211: 802.11ac changes Mahesh Palivela
2012-06-21 18:14 ` Johannes Berg
2012-06-21 18:34   ` Arend van Spriel
2012-06-21 18:39     ` Johannes Berg
2012-06-21 19:02       ` Arend van Spriel
2012-06-22  3:06         ` Mahesh Palivela
2012-06-22  6:33           ` Johannes Berg
2012-06-22  6:47             ` Mahesh Palivela
2012-06-22  6:54               ` 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.