linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] {nl,cfg}80211: Peer STA VHT caps
@ 2012-10-11  8:04 Mahesh Palivela
  2012-10-11  8:51 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Mahesh Palivela @ 2012-10-11  8:04 UTC (permalink / raw)
  To: johannes@sipsolutions.net; +Cc: linux-wireless@vger.kernel.org

From: Mahesh Palivela <maheshp@posedge.com>

To save STAs VHT caps in AP mode

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
---
Patch version 2 to take care of Jouni Malinen's comment (NL attrib at wrong place)
Patch version 3 to take care of Johannes comment (NL attrib kernel documentation)

 include/linux/nl80211.h |    6 ++++++
 include/net/cfg80211.h  |    2 ++
 net/mac80211/cfg.c      |    5 +++++
 net/wireless/nl80211.c  |    5 +++++
 4 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 179a0c2..71ab23b 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1276,6 +1276,9 @@ enum nl80211_commands {
  * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts
  *	with the Authentication transaction sequence number field.
  *
+ * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from
+ *	association request when used with NL80211_CMD_NEW_STATION)
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -1535,6 +1538,8 @@ enum nl80211_attrs {
 
 	NL80211_ATTR_SAE_DATA,
 
+	NL80211_ATTR_VHT_CAPABILITY,
+
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
@@ -1578,6 +1583,7 @@ enum nl80211_attrs {
 #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY	16
 #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY	24
 #define NL80211_HT_CAPABILITY_LEN		26
+#define NL80211_VHT_CAPABILITY_LEN		12
 
 #define NL80211_MAX_NR_CIPHER_SUITES		5
 #define NL80211_MAX_NR_AKM_SUITES		2
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 04df773..1f9ca03 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -498,6 +498,7 @@ enum station_parameters_apply_mask {
  * @plink_action: plink action to take
  * @plink_state: set the peer link state for a station
  * @ht_capa: HT capabilities of station
+ * @vht_capa: VHT capabilities of station
  * @uapsd_queues: bitmap of queues configured for uapsd. same format
  *	as the AC bitmap in the QoS info field
  * @max_sp: max Service Period. same format as the MAX_SP in the
@@ -517,6 +518,7 @@ struct station_parameters {
 	u8 plink_action;
 	u8 plink_state;
 	struct ieee80211_ht_cap *ht_capa;
+	struct ieee80211_vht_cap *vht_capa;
 	u8 uapsd_queues;
 	u8 max_sp;
 };
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 03216b0..ed27988 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1157,6 +1157,11 @@ static int sta_apply_parameters(struct ieee80211_local *local,
 						  params->ht_capa,
 						  &sta->sta.ht_cap);
 
+	if (params->vht_capa)
+		ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband,
+						    params->vht_capa,
+						    &sta->sta.vht_cap);
+
 	if (ieee80211_vif_is_mesh(&sdata->vif)) {
 #ifdef CONFIG_MAC80211_MESH
 		if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 746f649..8303a2a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -355,6 +355,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
 	[NL80211_ATTR_WDEV] = { .type = NLA_U64 },
 	[NL80211_ATTR_USER_REG_HINT_TYPE] = { .type = NLA_U32 },
 	[NL80211_ATTR_SAE_DATA] = { .type = NLA_BINARY, },
+	[NL80211_ATTR_VHT_CAPABILITY] = { .len = NL80211_VHT_CAPABILITY_LEN },
 };
 
 /* policy for the key attributes */
@@ -3223,6 +3224,10 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
 		params.ht_capa =
 			nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]);
 
+	if (info->attrs[NL80211_ATTR_VHT_CAPABILITY])
+		params.vht_capa =
+			nla_data(info->attrs[NL80211_ATTR_VHT_CAPABILITY]);
+
 	if (info->attrs[NL80211_ATTR_STA_PLINK_ACTION])
 		params.plink_action =
 		    nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_ACTION]);

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

* Re: [PATCH v3] {nl,cfg}80211: Peer STA VHT caps
  2012-10-11  8:04 [PATCH v3] {nl,cfg}80211: Peer STA VHT caps Mahesh Palivela
@ 2012-10-11  8:51 ` Johannes Berg
  2012-10-11  9:09   ` Mahesh Palivela
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2012-10-11  8:51 UTC (permalink / raw)
  To: Mahesh Palivela; +Cc: linux-wireless@vger.kernel.org

On Thu, 2012-10-11 at 08:04 +0000, Mahesh Palivela wrote:
> From: Mahesh Palivela <maheshp@posedge.com>
> 
> To save STAs VHT caps in AP mode

Applied, thanks.

Looks like we're getting close with VHT, what (besides a driver) are we
missing?

johannes


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

* Re: [PATCH v3] {nl,cfg}80211: Peer STA VHT caps
  2012-10-11  8:51 ` Johannes Berg
@ 2012-10-11  9:09   ` Mahesh Palivela
  0 siblings, 0 replies; 3+ messages in thread
From: Mahesh Palivela @ 2012-10-11  9:09 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org

On 10/11/2012 02:21 PM, Johannes Berg wrote:
> On Thu, 2012-10-11 at 08:04 +0000, Mahesh Palivela wrote:
>> From: Mahesh Palivela <maheshp@posedge.com>
>>
>> To save STAs VHT caps in AP mode
>
> Applied, thanks.
>
> Looks like we're getting close with VHT, what (besides a driver) are we
> missing?
>
> johannes
>

VHT regulatory and channel config are next items.
Extended CSA
Transmit power envelope
VHT rate handling
Beam forming
Quiet chan etc

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

end of thread, other threads:[~2012-10-11  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-11  8:04 [PATCH v3] {nl,cfg}80211: Peer STA VHT caps Mahesh Palivela
2012-10-11  8:51 ` Johannes Berg
2012-10-11  9:09   ` 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).