Patchwork hostap: VHT cap NL layer

login
register
mail settings
Submitter Mahesh Palivela
Date July 3, 2012, 7:38 a.m.
Message ID <952C5D5D0470AE4FB7D8A75C6ADC71CA0D7332@mbx022-e1-nj-10.exch022.domain.local>
Download mbox | patch
Permalink /patch/168720/
State Accepted
Commit 990933fb1dfb7f28524e695ea4ec5c1f5250d2b2
Headers show

Comments

Mahesh Palivela - July 3, 2012, 7:38 a.m.
To Save hw vendors VHT capabilities coming through NL layer(part of 11ac changes). Corresponding kernel side NL changes are already in wireless-testing git repository.

Signed-hostap: Mahesh Palivela <maheshp@posedge.com>
---
 src/drivers/driver_nl80211.c |   12 ++++++++++++
 src/drivers/nl80211_copy.h   |    6 ++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
Jouni Malinen - July 4, 2012, 6:44 p.m.
On Tue, Jul 03, 2012 at 07:38:41AM +0000, Mahesh Palivela wrote:
> To Save hw vendors VHT capabilities coming through NL layer(part of 11ac changes). Corresponding kernel side NL changes are already in wireless-testing git repository.

Thanks, applied.

>  src/drivers/nl80211_copy.h   |    6 ++++++

Please note that I'm syncing this file with separate commits to
wireless-testing.git, so no need to include it in patches for
hostap.git.
Mahesh Palivela - July 5, 2012, 2:50 a.m.

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 92a7de0..63d8280 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4757,6 +4757,18 @@  static int phy_info_handler(struct nl_msg *msg, void *arg)
 			os_memcpy(mode->mcs_set, mcs, 16);
 		}
 
+		if (tb_band[NL80211_BAND_ATTR_VHT_CAPA]) {
+			mode->vht_capab = nla_get_u32(
+				tb_band[NL80211_BAND_ATTR_VHT_CAPA]);
+		}
+
+		if (tb_band[NL80211_BAND_ATTR_VHT_MCS_SET] &&
+		    nla_len(tb_band[NL80211_BAND_ATTR_VHT_MCS_SET])) {
+			u8 *mcs;
+			mcs = nla_data(tb_band[NL80211_BAND_ATTR_VHT_MCS_SET]);
+			os_memcpy(mode->vht_mcs_set, mcs, 8);
+		}
+
 		nla_for_each_nested(nl_freq, tb_band[NL80211_BAND_ATTR_FREQS], rem_freq) {
 			nla_parse(tb_freq, NL80211_FREQUENCY_ATTR_MAX, nla_data(nl_freq),
 				  nla_len(nl_freq), freq_policy);
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h index 1335084..b75c01e 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -1786,6 +1786,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: 8-byte attribute containing the MCS set as
+ *	defined in 802.11ac
+ * @NL80211_BAND_ATTR_VHT_CAPA: VHT capabilities, as in the VHT 
+ capabilities IE
  * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined
  * @__NL80211_BAND_ATTR_AFTER_LAST: internal use
  */
@@ -1799,6 +1802,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