]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fetch HE 6 GHz capability from the driver
authorRajkumar Manoharan <rmanohar@codeaurora.org>
Tue, 2 Jun 2020 06:14:24 +0000 (23:14 -0700)
committerJouni Malinen <j@w1.fi>
Wed, 10 Jun 2020 18:14:56 +0000 (21:14 +0300)
Read mode specific HE 6 GHz capability from phy info. This is needed
for futher user config validation and IE construction.

Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
src/drivers/driver.h
src/drivers/driver_nl80211_capa.c

index 350c1cb57d55e835ce45a50929d6438b95ac7e33..0ecda49dd1df2ab824206d17bcc1c81fa043c847 100644 (file)
@@ -197,6 +197,7 @@ struct he_capabilities {
        u8 mac_cap[HE_MAX_MAC_CAPAB_SIZE];
        u8 mcs[HE_MAX_MCS_CAPAB_SIZE];
        u8 ppet[HE_MAX_PPET_CAPAB_SIZE];
+       u16 he_6ghz_capa;
 };
 
 #define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0)
index 3e8dcef2abc694da73bad1ae0cb62f1502394841..b9eb6e220d63b29f210f3662a500bbc8767b50f9 100644 (file)
@@ -1790,6 +1790,13 @@ static void phy_info_iftype_copy(struct he_capabilities *he_capab,
                          nla_data(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE]),
                          len);
        }
+
+       if (tb[NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA]) {
+               u16 capa;
+
+               capa = nla_get_u16(tb[NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA]);
+               he_capab->he_6ghz_capa = le_to_host16(capa);
+       }
 }