if (!iface || iface->conf->he_op.he_bss_color_disabled)
return -1;
+ settings->link_id = -1;
+#ifdef CONFIG_IEEE80211BE
+ 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);
* @counter_offset_beacon: Offset to the count field in Beacon frame tail
* @counter_offset_presp: Offset to the count field in Probe Response frame
* @ubpr: Unsolicited broadcast Probe Response frame data
+ * @link_id: If >= 0 indicates the link of the AP MLD to configure
*/
struct cca_settings {
u8 cca_count;
u16 counter_offset_presp;
struct unsol_bcast_probe_resp ubpr;
+
+ int link_id;
};
/* TDLS peer capabilities for send_tdls_mgmt() */
goto error;
}
+#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,