@@ -4545,6 +4545,12 @@ int hostapd_fill_cca_settings(struct hostapd_data *hapd,
if (!iface || iface->conf->he_op.he_bss_color_disabled)
return -1;
+#ifdef CONFIG_IEEE80211BE
+ settings->link_id = -1;
+ if (hapd->conf->mld_ap)
+ settings->link_id = hapd->mld_link_id;
+#endif /* CONFIG_IEEE80211BE */
+
old_color = iface->conf->he_op.he_bss_color;
iface->conf->he_op.he_bss_color = hapd->cca_color;
ret = hostapd_build_beacon_data(hapd, &settings->beacon_after);
@@ -2752,6 +2752,7 @@ struct csa_settings {
* @beacon_after: Next Beacon/Probe Response/(Re)Association Response frame info
* @counter_offset_beacon: Offset to the count field in Beacon frame tail
* @counter_offset_presp: Offset to the count field in Probe Response frame
+ * @link_id: If >=0 indicates the link of the MLD to configure
*/
struct cca_settings {
u8 cca_count;
@@ -2762,6 +2763,10 @@ struct cca_settings {
u16 counter_offset_beacon;
u16 counter_offset_presp;
+
+#ifdef CONFIG_IEEE80211BE
+ int link_id;
+#endif /* CONFIG_IEEE80211BE */
};
/* TDLS peer capabilities for send_tdls_mgmt() */
@@ -11389,6 +11389,20 @@ static int nl80211_switch_color(void *priv, struct cca_settings *settings)
}
nla_nest_end(msg, beacon_cca);
+
+#ifdef CONFIG_IEEE80211BE
+ if (nl80211_link_valid(bss->valid_links, settings->link_id)) {
+ wpa_printf(MSG_DEBUG, "nl80211: Color change request on link_id=%d",
+ settings->link_id);
+
+ if (nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID,
+ settings->link_id)) {
+ nlmsg_free(msg);
+ return -1;
+ }
+ }
+#endif /* CONFIG_IEEE80211BE */
+
ret = send_and_recv_cmd(drv, msg);
if (ret) {
wpa_printf(MSG_DEBUG,
Add changes to send link id in the NL command if operating in MLO during color change. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> --- src/ap/hostapd.c | 6 ++++++ src/drivers/driver.h | 5 +++++ src/drivers/driver_nl80211.c | 14 ++++++++++++++ 3 files changed, 25 insertions(+)