]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Save VHT capabilities from the driver
authorMahesh Palivela <maheshp@posedge.com>
Wed, 4 Jul 2012 18:42:56 +0000 (21:42 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 4 Jul 2012 18:42:56 +0000 (21:42 +0300)
Save VHT capabilities coming through nl80211 within hostapd.

Signed-hostap: Mahesh Palivela <maheshp@posedge.com>

src/drivers/driver_nl80211.c

index 376f36382cb9032ea6d3f55401c4c6742438d2f9..0373f430c5f7bd45e9d50fdd807cc3587e1878f7 100644 (file)
@@ -4792,6 +4792,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);