On Sun, Jun 18, 2023 at 05:15:04PM +0300, Andrei Otcheretianski wrote: > Add mld_addr configuration option to set MLD address. > The already existing bssid configuration option can be used to > control the MLD link addresses. > diff --git a/hostapd/config_file.c b/hostapd/config_file.c > @@ -4776,6 +4776,12 @@ static int hostapd_config_fill(struct hostapd_config *conf, > bss->mld_ap = !!atoi(pos); > } else if (os_strcmp(buf, "mld_id") == 0) { > bss->mld_id = atoi(pos); > + } else if (os_strcmp(buf, "mld_addr") == 0) { > + if (hwaddr_aton(pos, bss->mld_addr)) { > + wpa_printf(MSG_ERROR, > + "Line %d: invalid mld_addr", line); > + return 1; > + } > #endif /* CONFIG_IEEE80211BE */ It would be good to document new hostapd configuration parameters in hostapd/hostapd.conf. > diff --git a/hostapd/main.c b/hostapd/main.c > /* Initialize the driver interface */ > - if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5])) > + if (is_zero_ether_addr(b)) > b = NULL; How is this related to the other changes in the patch or the commit message? This feels like something completely independent that should be in its own commit. > @@ -241,7 +241,13 @@ static int hostapd_driver_init(struct hostapd_iface *iface) > +#ifndef CONFIG_IEEE80211BE > params.bssid = b; > +#else > + if (!is_zero_ether_addr(hapd->conf->mld_addr) && > + hapd->conf->mld_ap) > + params.bssid = hapd->conf->mld_addr; > +#endif /* !CONFIG_IEEE80211BE */ Is this really correct for builds that define CONFIG_IEEE80211BE but do not enable MLO? Why would params.bssid not be set in those cases? Wouldn't this break capability of configuring the BSSID for non-MLO AP? > @@ -278,6 +284,10 @@ static int hostapd_driver_init(struct hostapd_iface *iface) > random_mac_addr_keep_oui(hapd->own_addr); > hapd->mld_next_link_id = 0; > hapd->mld_link_id = hapd->mld_next_link_id++; > + if (!b) > + random_mac_addr_keep_oui(hapd->own_addr); > + else > + os_memcpy(hapd->own_addr, b, ETH_ALEN); What is this trying to do and how is this related to the other changes? random_mac_addr_keep_oui() would be called twice if b == NULL and that does not sound correct. Why would hostapd_driver_init() modify hapd->own_addr? -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap