[PATCH 09/50] AP: Allow starting multiple interfaces within single MLD

Rameshkumar Sundaram (QUIC) quic_ramess at quicinc.com
Fri Feb 17 02:10:18 PST 2023


> -----Original Message-----
> From: Hostap <hostap-bounces at lists.infradead.org> On Behalf Of Andrei
> Otcheretianski
> Sent: Thursday, February 16, 2023 4:38 AM
> To: hostap at lists.infradead.org
> Cc: Andrei Otcheretianski <andrei.otcheretianski at intel.com>; Ilan Peer
> <ilan.peer at intel.com>
> Subject: [PATCH 09/50] AP: Allow starting multiple interfaces within single
> MLD
> 
> Add support for including multiple hostapd interfaces in the same AP MLD,
> i.e., all using the same underlying driver network interface.
> 
> To do so, when a new hostapd interface is added, if there is already another
> interface using the same underlying network interface, associate the new
> interface with the same private data object, instead of creating a new one.
> 
> As some of the BSS's are non first BSS's, meaning that they reuse the drv_priv
> of the initial BSS, make sure not to double free it.
> 
> Currently multiple BSS entries are not supported so always use bss[0] for
> MLD.
> 
> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
> Signed-off-by: Ilan Peer <ilan.peer at intel.com>
> ---
>  hostapd/main.c      | 84
> +++++++++++++++++++++++++++++++++++++++++++++
>  src/ap/ap_drv_ops.h | 12 +++++++
>  src/ap/hostapd.c    | 39 +++++++++++++++++----
>  src/ap/hostapd.h    |  2 ++
>  4 files changed, 131 insertions(+), 6 deletions(-)
> 
> diff --git a/hostapd/main.c b/hostapd/main.c index ce2df81c4a..228ee44b1b
> 100644
> --- a/hostapd/main.c
> +++ b/hostapd/main.c
> @@ -164,6 +164,59 @@ static int hostapd_driver_init(struct hostapd_iface
> *iface)
>  		return -1;
>  	}
> 
> +#ifdef CONFIG_IEEE80211BE
> +		if (conf->mld_ap) {
> +			for (i = 0; i < iface->interfaces->count; i++) {
> +				struct hostapd_iface *h = iface->interfaces-
> >iface[i];
> +				struct hostapd_data *h_hapd = h->bss[0];
> +				struct hostapd_bss_config *hconf = h_hapd-
> >conf;
> +
> +				if (h == iface) {
> +					wpa_printf(MSG_ERROR, "Skip own
> iface");
> +					continue;
> +				}
> +
> +				if (!hconf->mld_ap || hconf->mld_id != conf-
> >mld_id) {
How about hconf->iface ? Should we check if its same across links of the MLD ?
> +					wpa_printf(MSG_ERROR,
> +						   "Skip non matching
> mld_id");
> +					continue;
> +				}
> +
> +				wpa_printf(MSG_DEBUG, "Found matching
> MLD iface");
> +				if (!h_hapd->drv_priv) {
> +					wpa_printf(MSG_ERROR,
> +						   "Matching MLD BSS not
> initialized yet");
> +					continue;
> +				}
> +
> +				hapd->drv_priv = h_hapd->drv_priv;
Having i802_bss common for all the links and belonging to only one drv, might have issue for cases of Multi vap/mbssid,
For ex.
1. get_bss_ifindex() will fail in cases where the ML bss (i802_bss) is not part of that drv but channel switch happens on that link.
2.In if_add, the hapd->iface->bss[0]->drv_priv(i802_bss)->drv might be pointing to first link's drv,  in some case of  multi vap MLD, like two 2+5 MLD, new bss (ML/Non-ML) might be pointing to first link BSS.
So far drv was tied to a link (hapd->iface), now well be having same drv for all links (all bss across links).
> +				/*



More information about the Hostap mailing list