]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MBSSID: Add link id for transmitting interface in an AP MLD
authorRameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Mon, 5 May 2025 17:37:06 +0000 (10:37 -0700)
committerJouni Malinen <j@w1.fi>
Tue, 6 May 2025 12:48:26 +0000 (15:48 +0300)
Transmitting interface of an MBSSID group can be part of an MLD, hence
interface index is not enough to identify the correct link. Store and
pass the link ID of the transmitted interface to the kernel when
configuring a new non-transmitting profile for an AP MLD.

Signed-off-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com>
src/ap/beacon.c
src/drivers/driver.h
src/drivers/driver_nl80211.c

index 13a482d601209c7d8540df653c190619a7a2d2dc..c172116773fec9df84914dad5720fc424822c747 100644 (file)
@@ -634,6 +634,12 @@ ieee802_11_build_ap_params_mbssid(struct hostapd_data *hapd,
        if (iface->conf->mbssid == ENHANCED_MBSSID_ENABLED)
                params->ema = true;
 
+       params->mbssid_tx_iface_linkid = -1;
+#ifdef CONFIG_IEEE80211BE
+       if (tx_bss->conf->mld_ap)
+               params->mbssid_tx_iface_linkid = tx_bss->mld_link_id;
+#endif /* CONFIG_IEEE80211BE */
+
        return 0;
 
 fail:
index 48092ea9afd6bb54d4bc5f9e1e82e30b0307c89b..37003ac4ff577f6cd371a671514dc38605addb1b 100644 (file)
@@ -1804,6 +1804,12 @@ struct wpa_driver_ap_params {
         */
        const char *mbssid_tx_iface;
 
+       /**
+        * mbssid_tx_iface_linkid - Link ID of the transmitting interface if
+        * it is part of an MLD. Otherwise, -1.
+        */
+       int mbssid_tx_iface_linkid;
+
        /**
         * mbssid_index - The index of this BSS in the MBSSID set
         */
index ea33b1e453e337ded4139efb55e2fb09487206cd..2f8ed7428c0609973573712aabf9d02fc0f7978e 100644 (file)
@@ -4940,6 +4940,10 @@ static int nl80211_mbssid(struct nl_msg *msg,
                    nla_put_u32(msg, NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX,
                                ifidx))
                        return -1;
+               if (params->mbssid_tx_iface_linkid >= 0 &&
+                   nla_put_u8(msg, NL80211_MBSSID_CONFIG_ATTR_TX_LINK_ID,
+                              params->mbssid_tx_iface_linkid))
+                       return -1;
        }
 
        if (params->ema && nla_put_flag(msg, NL80211_MBSSID_CONFIG_ATTR_EMA))