{
struct probe_resp_params sta_info_params;
struct hostapd_data *link;
- unsigned int probed_mld_id, i, j;
params->mld_ap = NULL;
params->mld_info = os_zalloc(sizeof(*params->mld_info));
"MLD: Got ML probe request with AP MLD ID %d for links %04x",
mld_id, links);
- /*
- * We want to include the AP MLD ID in the response if it was
- * included in the request.
- */
- probed_mld_id = mld_id != -1 ? mld_id : hostapd_get_mld_id(hapd);
-
- for_each_mld_link(link, i, j, hapd->iface->interfaces,
- probed_mld_id) {
+ for_each_mld_link(link, hapd) {
struct mld_link_info *link_info;
size_t buflen;
u8 mld_link_id = link->mld_link_id;
bool hostapd_mld_is_first_bss(struct hostapd_data *hapd);
-#define for_each_mld_link(_link, _bss_idx, _iface_idx, _ifaces, _mld_id) \
- for (_iface_idx = 0; \
- _iface_idx < (_ifaces)->count; \
- _iface_idx++) \
- for (_bss_idx = 0; \
- _bss_idx < \
- (_ifaces)->iface[_iface_idx]->num_bss; \
- _bss_idx++) \
- for (_link = \
- (_ifaces)->iface[_iface_idx]->bss[_bss_idx]; \
- _link && _link->conf->mld_ap && \
- hostapd_get_mld_id(_link) == _mld_id; \
- _link = NULL)
+#define for_each_mld_link(partner, self) \
+ dl_list_for_each(partner, &self->mld->links, struct hostapd_data, link)
#else /* CONFIG_IEEE80211BE */
return true;
}
-#define for_each_mld_link(_link, _bss_idx, _iface_idx, _ifaces, _mld_id) \
+#define for_each_mld_link(partner, self) \
if (false)
#endif /* CONFIG_IEEE80211BE */
struct sta_info *sta)
{
struct hostapd_data *tmp_hapd;
- unsigned int i, j;
- for_each_mld_link(tmp_hapd, i, j, hapd->iface->interfaces,
- hostapd_get_mld_id(hapd)) {
+ for_each_mld_link(tmp_hapd, hapd) {
struct sta_info *tmp_sta;
if (hapd == tmp_hapd)