]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Determine maximum number of supported AKMs
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>
Sun, 20 Feb 2022 01:51:56 +0000 (07:21 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 26 Aug 2022 14:27:45 +0000 (17:27 +0300)
Use the recently added attribute to determine whether the kernel
supports a larger number of AKM suites in various commands.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
src/drivers/driver.h
src/drivers/driver_nl80211_capa.c
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant_i.h

index dfb433773ba623905b037572e43ecbb61480f724..48b4bb4a17682fc1828e3151ef11dcacbce05b53 100644 (file)
@@ -2182,6 +2182,9 @@ struct wpa_driver_capa {
 
        /* Maximum number of supported CSA counters */
        u16 max_csa_counters;
+
+       /* Maximum number of supported AKM suites in commands */
+       unsigned int max_num_akms;
 };
 
 
index 7ede0d030af8754f0ae65cc55092128f957a83a1..f5b62705aa36eb5741c70e908d8513938f1a57e1 100644 (file)
@@ -1087,6 +1087,10 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
        if (tb[NL80211_ATTR_WIPHY_SELF_MANAGED_REG])
                capa->flags |= WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY;
 
+       if (tb[NL80211_ATTR_MAX_NUM_AKM_SUITES])
+               capa->max_num_akms =
+                       nla_get_u16(tb[NL80211_ATTR_MAX_NUM_AKM_SUITES]);
+
        return NL_SKIP;
 }
 
@@ -1165,6 +1169,9 @@ static int wpa_driver_nl80211_get_info(struct wpa_driver_nl80211_data *drv,
        if (info->update_ft_ies_supported)
                drv->capa.flags |= WPA_DRIVER_FLAGS_UPDATE_FT_IES;
 
+       if (!drv->capa.max_num_akms)
+               drv->capa.max_num_akms = NL80211_MAX_NR_AKM_SUITES;
+
        return 0;
 }
 
index 2dd3d8c7d5b9c4b85814931969a3b90103079175..096e2ad273003ecacde839de6df503b19fef90af 100644 (file)
@@ -6771,6 +6771,7 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
                wpa_s->num_multichan_concurrent =
                        capa.num_multichan_concurrent;
                wpa_s->wmm_ac_supported = capa.wmm_ac_supported;
+               wpa_s->max_num_akms = capa.max_num_akms;
 
                if (capa.mac_addr_rand_scan_supported)
                        wpa_s->mac_addr_rand_supported |= MAC_ADDR_RAND_SCAN;
index 4790410d50f7d92fac4b714c2863a6fe1a90d2e5..eb9855c23c82447e9b34e01ecbd9630e726ec124 100644 (file)
@@ -932,6 +932,7 @@ struct wpa_supplicant {
        unsigned int max_match_sets;
        unsigned int max_remain_on_chan;
        unsigned int max_stations;
+       unsigned int max_num_akms;
 
        int pending_mic_error_report;
        int pending_mic_error_pairwise;