* [PATCH] cfg80211/mac80211: 802.11ac changes
@ 2012-06-22 7:27 Mahesh Palivela
2012-06-22 7:35 ` Arend van Spriel
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Mahesh Palivela @ 2012-06-22 7:27 UTC (permalink / raw)
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
11ac changes to push VHT cap through NL layer.
ieee structs, constants for 11ac.
VHT cap IE in ProbeReq.
Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Cc: Johannes Berg <johannes@sipsolutions.com>
---
include/linux/ieee80211.h | 70 ++++++++++++++++++++++++++++++++++++++++++++
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, 135 insertions(+), 1 deletions(-)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index ce9af89..bb04656 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1072,6 +1072,73 @@ 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_3895 0x00000000
+#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 +1399,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] 12+ messages in thread
* Re: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-22 7:27 [PATCH] cfg80211/mac80211: 802.11ac changes Mahesh Palivela
@ 2012-06-22 7:35 ` Arend van Spriel
2012-06-22 7:37 ` Johannes Berg
2012-06-22 8:17 ` Johannes Berg
2012-06-28 11:07 ` Johannes Berg
2 siblings, 1 reply; 12+ messages in thread
From: Arend van Spriel @ 2012-06-22 7:35 UTC (permalink / raw)
To: Mahesh Palivela
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
johannes@sipsolutions.net
On 06/22/2012 09:27 AM, Mahesh Palivela wrote:
> 11ac changes to push VHT cap through NL layer.
> ieee structs, constants for 11ac.
> VHT cap IE in ProbeReq.
>
> Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
> Cc: Johannes Berg <johannes@sipsolutions.com>
Not looked at the patch, but I assumed mac80211/cfg80211 patches should
be submitted to Johannes or is the mac80211 repository not in use yet.
Gr. AvS
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-22 7:35 ` Arend van Spriel
@ 2012-06-22 7:37 ` Johannes Berg
0 siblings, 0 replies; 12+ messages in thread
From: Johannes Berg @ 2012-06-22 7:37 UTC (permalink / raw)
To: Arend van Spriel
Cc: Mahesh Palivela, linville@tuxdriver.com,
linux-wireless@vger.kernel.org
On Fri, 2012-06-22 at 09:35 +0200, Arend van Spriel wrote:
> On 06/22/2012 09:27 AM, Mahesh Palivela wrote:
> > 11ac changes to push VHT cap through NL layer.
> > ieee structs, constants for 11ac.
> > VHT cap IE in ProbeReq.
> >
> > Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
> > Cc: Johannes Berg <johannes@sipsolutions.com>
>
> Not looked at the patch, but I assumed mac80211/cfg80211 patches should
> be submitted to Johannes or is the mac80211 repository not in use yet.
They should be but I'll pick them up from the mailing list too if
needed. No need to Cc John though :)
And this will go to mac80211-next, obviously.
johannes
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-22 7:27 [PATCH] cfg80211/mac80211: 802.11ac changes Mahesh Palivela
2012-06-22 7:35 ` Arend van Spriel
@ 2012-06-22 8:17 ` Johannes Berg
2012-06-22 10:11 ` Mahesh Palivela
2012-06-28 10:52 ` Mahesh Palivela
2012-06-28 11:07 ` Johannes Berg
2 siblings, 2 replies; 12+ messages in thread
From: Johannes Berg @ 2012-06-22 8:17 UTC (permalink / raw)
To: Mahesh Palivela; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
On Fri, 2012-06-22 at 07:27 +0000, Mahesh Palivela wrote:
> 11ac changes to push VHT cap through NL layer.
> ieee structs, constants for 11ac.
> VHT cap IE in ProbeReq.
Thanks. I will probably rewrite this commit log though ...
Since this is clearly not everything that's needed, what are your plans
for doing the other needed things?
* assoc handling
* VHT BSS selector
* VHT station capability handling
etc?
johannes
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-22 8:17 ` Johannes Berg
@ 2012-06-22 10:11 ` Mahesh Palivela
2012-06-22 10:41 ` Johannes Berg
2012-06-28 10:52 ` Mahesh Palivela
1 sibling, 1 reply; 12+ messages in thread
From: Mahesh Palivela @ 2012-06-22 10:11 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
________________________________________
From: Johannes Berg [johannes@sipsolutions.net]
Sent: Friday, June 22, 2012 1:47 PM
To: Mahesh Palivela
Cc: linville@tuxdriver.com; linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211/mac80211: 802.11ac changes
On Fri, 2012-06-22 at 07:27 +0000, Mahesh Palivela wrote:
> 11ac changes to push VHT cap through NL layer.
> ieee structs, constants for 11ac.
> VHT cap IE in ProbeReq.
Thanks. I will probably rewrite this commit log though ...
Since this is clearly not everything that's needed, what are your plans
for doing the other needed things?
* assoc handling
* VHT BSS selector
* VHT station capability handling
etc?
johannes
I am working on them Johannes. Assoc is the next item....
Thanks,
Mahesh
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-22 10:11 ` Mahesh Palivela
@ 2012-06-22 10:41 ` Johannes Berg
0 siblings, 0 replies; 12+ messages in thread
From: Johannes Berg @ 2012-06-22 10:41 UTC (permalink / raw)
To: Mahesh Palivela; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
On Fri, 2012-06-22 at 10:11 +0000, Mahesh Palivela wrote:
> Since this is clearly not everything that's needed, what are your plans
> for doing the other needed things?
> I am working on them Johannes. Assoc is the next item....
Cool. I was just curious :-)
johannes
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-22 8:17 ` Johannes Berg
2012-06-22 10:11 ` Mahesh Palivela
@ 2012-06-28 10:52 ` Mahesh Palivela
2012-06-28 11:01 ` Johannes Berg
1 sibling, 1 reply; 12+ messages in thread
From: Mahesh Palivela @ 2012-06-28 10:52 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
________________________________________
From: Johannes Berg [johannes@sipsolutions.net]
Sent: Friday, June 22, 2012 1:47 PM
To: Mahesh Palivela
Cc: linville@tuxdriver.com; linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211/mac80211: 802.11ac changes
On Fri, 2012-06-22 at 07:27 +0000, Mahesh Palivela wrote:
> 11ac changes to push VHT cap through NL layer.
> ieee structs, constants for 11ac.
> VHT cap IE in ProbeReq.
Thanks. I will probably rewrite this commit log though ...
Since this is clearly not everything that's needed, what are your plans
for doing the other needed things?
* assoc handling
* VHT BSS selector
* VHT station capability handling
etc?
johannes
Johannes, Is this patch commited? mac80211-next? wireless-testing-next?
Let me know.
Thanks,
Mahesh
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-28 10:52 ` Mahesh Palivela
@ 2012-06-28 11:01 ` Johannes Berg
0 siblings, 0 replies; 12+ messages in thread
From: Johannes Berg @ 2012-06-28 11:01 UTC (permalink / raw)
To: Mahesh Palivela; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
On Thu, 2012-06-28 at 10:52 +0000, Mahesh Palivela wrote:
> Johannes, Is this patch commited? mac80211-next? wireless-testing-next?
> Let me know.
Ah, I lost it when I was trying to double-check all the definitions.
I'll apply it now.
johannes
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-22 7:27 [PATCH] cfg80211/mac80211: 802.11ac changes Mahesh Palivela
2012-06-22 7:35 ` Arend van Spriel
2012-06-22 8:17 ` Johannes Berg
@ 2012-06-28 11:07 ` Johannes Berg
2012-06-28 12:39 ` Mahesh Palivela
2 siblings, 1 reply; 12+ messages in thread
From: Johannes Berg @ 2012-06-28 11:07 UTC (permalink / raw)
To: Mahesh Palivela; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Ok I applied some of the changes (see mac80211-next tree), but not the
mac80211 pieces. Please fix:
> + if (supp_vht)
> + local->scan_ies_len += 2 + sizeof(struct ieee80211_vht_capabilities);
too long line
>
> + if (sband->vht_cap.vht_supported)
> + pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap,
> + sband->vht_cap.cap);
indentation
> 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)
indentation here & in ieee80211_i.h
> + __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);
> +
endian issues
johannes
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-28 11:07 ` Johannes Berg
@ 2012-06-28 12:39 ` Mahesh Palivela
2012-06-28 12:53 ` Arend van Spriel
0 siblings, 1 reply; 12+ messages in thread
From: Mahesh Palivela @ 2012-06-28 12:39 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
________________________________________
From: Johannes Berg [johannes@sipsolutions.net]
Sent: Thursday, June 28, 2012 4:37 PM
To: Mahesh Palivela
Cc: linville@tuxdriver.com; linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211/mac80211: 802.11ac changes
Ok I applied some of the changes (see mac80211-next tree), but not the
mac80211 pieces. Please fix:
> + if (supp_vht)
> + local->scan_ies_len += 2 + sizeof(struct ieee80211_vht_capabilities);
too long line
[MP] But within column 80. shall I break from sizeof?
>
> + if (sband->vht_cap.vht_supported)
> + pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap,
> + sband->vht_cap.cap);
indentation
[MP] sorry. I didn't get. Is it sband-> line to be moved left? But previous build_ht_cap() has similar indentation
> 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)
indentation here & in ieee80211_i.h
[MP] ditto. please explain
> + __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);
> +
endian issues
[MP] I see mistake tmp = cpu_to_le16(cap) to be changed to tmp = cpu_to_le32(cap). MCS set is fine right?
johannes
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-28 12:39 ` Mahesh Palivela
@ 2012-06-28 12:53 ` Arend van Spriel
2012-06-28 12:56 ` Mahesh Palivela
0 siblings, 1 reply; 12+ messages in thread
From: Arend van Spriel @ 2012-06-28 12:53 UTC (permalink / raw)
To: Mahesh Palivela
Cc: Johannes Berg, linville@tuxdriver.com,
linux-wireless@vger.kernel.org
On 06/28/2012 02:39 PM, Mahesh Palivela wrote:
> ________________________________________
> From: Johannes Berg [johannes@sipsolutions.net]
> Sent: Thursday, June 28, 2012 4:37 PM
> To: Mahesh Palivela
> Cc: linville@tuxdriver.com; linux-wireless@vger.kernel.org
> Subject: Re: [PATCH] cfg80211/mac80211: 802.11ac changes
>
>>
>> + if (sband->vht_cap.vht_supported)
>> + pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap,
>> + sband->vht_cap.cap);
>
> indentation
>
> [MP] sorry. I didn't get. Is it sband-> line to be moved left? But previous build_ht_cap() has similar indentation
>
'sband->' should start at same column as 'pos' in the above line. Must
be tabs followed by right amount of spaces (being less than 8).
>> 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)
>
> indentation here & in ieee80211_i.h
>
> [MP] ditto. please explain
>
'u32' should start at same column as 'u8 *pos' in the above line.
Gr. AvS
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] cfg80211/mac80211: 802.11ac changes
2012-06-28 12:53 ` Arend van Spriel
@ 2012-06-28 12:56 ` Mahesh Palivela
0 siblings, 0 replies; 12+ messages in thread
From: Mahesh Palivela @ 2012-06-28 12:56 UTC (permalink / raw)
To: Arend van Spriel
Cc: Johannes Berg, linville@tuxdriver.com,
linux-wireless@vger.kernel.org
________________________________________
From: Arend van Spriel [arend@broadcom.com]
Sent: Thursday, June 28, 2012 6:23 PM
To: Mahesh Palivela
Cc: Johannes Berg; linville@tuxdriver.com; linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211/mac80211: 802.11ac changes
On 06/28/2012 02:39 PM, Mahesh Palivela wrote:
> ________________________________________
> From: Johannes Berg [johannes@sipsolutions.net]
> Sent: Thursday, June 28, 2012 4:37 PM
> To: Mahesh Palivela
> Cc: linville@tuxdriver.com; linux-wireless@vger.kernel.org
> Subject: Re: [PATCH] cfg80211/mac80211: 802.11ac changes
>
>>
>> + if (sband->vht_cap.vht_supported)
>> + pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap,
>> + sband->vht_cap.cap);
>
> indentation
>
> [MP] sorry. I didn't get. Is it sband-> line to be moved left? But previous build_ht_cap() has similar indentation
>
'sband->' should start at same column as 'pos' in the above line. Must
be tabs followed by right amount of spaces (being less than 8).
>> 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)
>
> indentation here & in ieee80211_i.h
>
> [MP] ditto. please explain
>
'u32' should start at same column as 'u8 *pos' in the above line.
Gr. AvS
Thank you Arend. I will make those changes.
Mahesh
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-06-28 12:56 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22 7:27 [PATCH] cfg80211/mac80211: 802.11ac changes Mahesh Palivela
2012-06-22 7:35 ` Arend van Spriel
2012-06-22 7:37 ` Johannes Berg
2012-06-22 8:17 ` Johannes Berg
2012-06-22 10:11 ` Mahesh Palivela
2012-06-22 10:41 ` Johannes Berg
2012-06-28 10:52 ` Mahesh Palivela
2012-06-28 11:01 ` Johannes Berg
2012-06-28 11:07 ` Johannes Berg
2012-06-28 12:39 ` Mahesh Palivela
2012-06-28 12:53 ` Arend van Spriel
2012-06-28 12:56 ` Mahesh Palivela
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).