From: Rameshkumar Sundaram Date: Mon, 5 May 2025 17:37:06 +0000 (-0700) Subject: MBSSID: Add link id for transmitting interface in an AP MLD X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ec6feb2ce9f8cd64a5b9fd863f2111063d43b9e;p=thirdparty%2Fhostap.git MBSSID: Add link id for transmitting interface in an AP MLD 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 Signed-off-by: Muna Sinada Signed-off-by: Aloka Dixit --- diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 13a482d60..c17211677 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -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: diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 48092ea9a..37003ac4f 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -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 */ diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index ea33b1e45..2f8ed7428 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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))