]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Send EML capabilities of an ML station to the driver
authorRamasamy Kaliappan <quic_rkaliapp@quicinc.com>
Mon, 25 Nov 2024 13:12:14 +0000 (18:42 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 27 Nov 2024 17:24:11 +0000 (19:24 +0200)
When EMLSR is enabled for an ML association, the EML capabilities
advertised by an ML station needs to be updated to the driver to enable
EMLSR operation and to transmit and receive initial Control frame and
Data frames.

Send EML capabilities advertised by an ML station during association to
the underlying driver via the NL80211_ATTR_EML_CAPABILITY attribute.

Signed-off-by: Ramasamy Kaliappan <quic_rkaliapp@quicinc.com>
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
src/ap/ap_drv_ops.c
src/ap/ap_drv_ops.h
src/ap/ieee802_11.c
src/ap/sta_info.c
src/drivers/driver.h
src/drivers/driver_nl80211.c

index f492a34cf6e200eb49159fcdd385e8f0606df80f..c41acd46358dce59feb2e6720af5908a91983989 100644 (file)
@@ -472,7 +472,8 @@ int hostapd_sta_add(struct hostapd_data *hapd,
                    size_t eht_capab_len,
                    const struct ieee80211_he_6ghz_band_cap *he_6ghz_capab,
                    u32 flags, u8 qosinfo, u8 vht_opmode, int supp_p2p_ps,
-                   int set, const u8 *link_addr, bool mld_link_sta)
+                   int set, const u8 *link_addr, bool mld_link_sta,
+                   u16 eml_cap)
 {
        struct hostapd_sta_add_params params;
 
@@ -512,6 +513,9 @@ int hostapd_sta_add(struct hostapd_data *hapd,
                params.mld_link_id = hapd->mld_link_id;
                params.mld_link_addr = link_addr;
                params.mld_link_sta = mld_link_sta;
+               /* Copy EML capabilities of ML STA */
+               if (link_addr)
+                       params.eml_cap = eml_cap;
        }
 #endif /* CONFIG_IEEE80211BE */
 
index 7b55253475a110d96f051bc50a6d216c3162d090..cbb8044c35ff374e648c3363b3ec2970eced7acc 100644 (file)
@@ -49,7 +49,8 @@ int hostapd_sta_add(struct hostapd_data *hapd,
                    size_t eht_capab_len,
                    const struct ieee80211_he_6ghz_band_cap *he_6ghz_capab,
                    u32 flags, u8 qosinfo, u8 vht_opmode, int supp_p2p_ps,
-                   int set, const u8 *link_addr, bool mld_link_sta);
+                   int set, const u8 *link_addr, bool mld_link_sta,
+                   u16 eml_cap);
 int hostapd_set_privacy(struct hostapd_data *hapd, int enabled);
 int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
                             size_t elem_len);
index 42150e9b50ef1cb3fa8f880d1508e00b5a6189d3..c0da03f4ca3b90aa8aa078dee847647cf1e44cc0 100644 (file)
@@ -4800,6 +4800,7 @@ static int add_associated_sta(struct hostapd_data *hapd,
        int set = 1;
        const u8 *mld_link_addr = NULL;
        bool mld_link_sta = false;
+       u16 eml_cap = 0;
 
 #ifdef CONFIG_IEEE80211BE
        if (ap_sta_is_mld(hapd, sta)) {
@@ -4810,6 +4811,7 @@ static int add_associated_sta(struct hostapd_data *hapd,
 
                if (hapd->mld_link_id != sta->mld_assoc_link_id)
                        set = 0;
+               eml_cap = sta->mld_info.common_info.eml_capa;
        }
 #endif /* CONFIG_IEEE80211BE */
 
@@ -4890,7 +4892,7 @@ static int add_associated_sta(struct hostapd_data *hapd,
                            sta->he_6ghz_capab,
                            sta->flags | WLAN_STA_ASSOC, sta->qosinfo,
                            sta->vht_opmode, sta->p2p_ie ? 1 : 0,
-                           set, mld_link_addr, mld_link_sta)) {
+                           set, mld_link_addr, mld_link_sta, eml_cap)) {
                hostapd_logger(hapd, sta->addr,
                               HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE,
                               "Could not %s STA to kernel driver",
index 534aa28c4084838de044172bc974990239622708..857d3de50fd07e5b4cdd19344f26d7b22e73ae9e 100644 (file)
@@ -1857,6 +1857,7 @@ int ap_sta_re_add(struct hostapd_data *hapd, struct sta_info *sta)
 {
        const u8 *mld_link_addr = NULL;
        bool mld_link_sta = false;
+       u16 eml_cap = 0;
 
        /*
         * If a station that is already associated to the AP, is trying to
@@ -1872,6 +1873,7 @@ int ap_sta_re_add(struct hostapd_data *hapd, struct sta_info *sta)
 
                mld_link_sta = sta->mld_assoc_link_id != mld_link_id;
                mld_link_addr = sta->mld_info.links[mld_link_id].peer_addr;
+               eml_cap = sta->mld_info.common_info.eml_capa;
 
                /*
                 * In case the AP is affiliated with an AP MLD, we need to
@@ -1890,7 +1892,7 @@ int ap_sta_re_add(struct hostapd_data *hapd, struct sta_info *sta)
                            sta->supported_rates_len,
                            0, NULL, NULL, NULL, 0, NULL, 0, NULL,
                            sta->flags, 0, 0, 0, 0,
-                           mld_link_addr, mld_link_sta)) {
+                           mld_link_addr, mld_link_sta, eml_cap)) {
                hostapd_logger(hapd, sta->addr,
                               HOSTAPD_MODULE_IEEE80211,
                               HOSTAPD_LEVEL_NOTICE,
index a612f8cd2631d3c691593097e99034ac1ee92c1a..b28046db38c32d8488e284dc7c63af90783955ab 100644 (file)
@@ -2591,6 +2591,7 @@ struct hostapd_sta_add_params {
        bool mld_link_sta;
        s8 mld_link_id;
        const u8 *mld_link_addr;
+       u16 eml_cap;
 };
 
 struct mac_address {
index b26d1c12156de7f5e9517f5f92d1abdd5445bac8..a8434fdbfe1131d8d4effe0c141c23686c1d2e9a 100644 (file)
@@ -5768,6 +5768,15 @@ static int wpa_driver_nl80211_sta_add(void *priv,
                                goto fail;
                }
 
+               /* Set EML capabilities of ML STA */
+               if (params->mld_link_addr && params->eml_cap) {
+                       wpa_printf(MSG_DEBUG, "  * eml_cap =%u",
+                                  params->eml_cap);
+                       if (nla_put_u16(msg, NL80211_ATTR_EML_CAPABILITY,
+                                       params->eml_cap))
+                               goto fail;
+               }
+
                if (is_ap_interface(drv->nlmode) &&
                    nla_put_u8(msg, NL80211_ATTR_STA_SUPPORT_P2P_PS,
                               params->support_p2p_ps ?