]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: MLO: Retrieve EML and MLD capabilities from driver
authorBenjamin Berg <benjamin.berg@intel.com>
Mon, 22 May 2023 19:33:31 +0000 (22:33 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 6 Jun 2023 17:11:06 +0000 (20:11 +0300)
Add a new driver API get_mld_capab() and and use it to fetch MLD and EML
capabilities.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
hostapd/main.c
src/ap/ap_drv_ops.c
src/ap/ap_drv_ops.h
src/ap/hostapd.h
src/drivers/driver.h

index ce2df81c4a8690bd18f55762f59f11e76ba1f798..fc5b51a1720fbd2c30766f9943e2dffb02ca5354 100644 (file)
@@ -235,6 +235,8 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
                 */
                hostapd_get_ext_capa(iface);
 
+               hostapd_get_mld_capa(iface);
+
                triggs = wpa_get_wowlan_triggers(conf->wowlan_triggers, &capa);
                if (triggs && hapd->driver->set_wowlan) {
                        if (hapd->driver->set_wowlan(hapd->drv_priv, triggs))
index 844896e8bb212285025caeb49f47ee1276ff88f0..46c989a85f4b1cf7b922fde30246c7127ab175d6 100644 (file)
@@ -941,6 +941,19 @@ void hostapd_get_ext_capa(struct hostapd_iface *iface)
 }
 
 
+void hostapd_get_mld_capa(struct hostapd_iface *iface)
+{
+       struct hostapd_data *hapd = iface->bss[0];
+
+       if (!hapd->driver || !hapd->driver->get_mld_capab)
+               return;
+
+       hapd->driver->get_mld_capab(hapd->drv_priv, WPA_IF_AP_BSS,
+                                   &iface->mld_eml_capa,
+                                   &iface->mld_mld_capa);
+}
+
+
 /**
  * hostapd_drv_do_acs - Start automatic channel selection
  * @hapd: BSS data for the device initiating ACS
index 023cbf1f89c9f52de642a3a5c5ebc7c645de44dd..866440027befc45d156531c6dce97b17912d5f7f 100644 (file)
@@ -155,6 +155,7 @@ int hostapd_drv_set_qos_map(struct hostapd_data *hapd, const u8 *qos_map_set,
                            u8 qos_map_set_len);
 
 void hostapd_get_ext_capa(struct hostapd_iface *iface);
+void hostapd_get_mld_capa(struct hostapd_iface *iface);
 
 void hostapd_get_hw_mode_any_channels(struct hostapd_data *hapd,
                                      struct hostapd_hw_modes *mode,
index 0dd043da878fd701e1c1a4ddb657d528c4c962f0..bcb78aff3f1a3cc03cf90a3a1c1976ccab740a3f 100644 (file)
@@ -542,6 +542,8 @@ struct hostapd_iface {
        const u8 *extended_capa, *extended_capa_mask;
        unsigned int extended_capa_len;
 
+       u16 mld_eml_capa, mld_mld_capa;
+
        unsigned int drv_max_acl_mac_addrs;
 
        struct hostapd_hw_modes *hw_features;
index 12371a7d81d5f79ec6ef1104d17fe893fd10dc12..529826b169eb06ea52bffce738cba6aa8d76ccac 100644 (file)
@@ -4854,6 +4854,17 @@ struct wpa_driver_ops {
                             const u8 **ext_capab, const u8 **ext_capab_mask,
                             unsigned int *ext_capab_len);
 
+       /**
+        * get_mld_capab - Get MLD capabilities for the specified interface
+        * @priv: Private driver interface data
+        * @type: Interface type for which to get MLD capabilities
+        * @eml_capa: EML capabilities
+        * @mld_capa_and_ops: MLD Capabilities and Operations
+        * Returns: 0 on success or -1 on failure
+        */
+       int (*get_mld_capab)(void *priv, enum wpa_driver_if_type type,
+                            u16 *eml_capa, u16 *mld_capa_and_ops);
+
        /**
         * p2p_lo_start - Start offloading P2P listen to device
         * @priv: Private driver interface data