[PATCH v2 08/20] BSS: Switch struct wpa_bss to use valid_links bitmask

Jouni Malinen j at w1.fi
Sat Mar 2 02:18:13 PST 2024


On Tue, Feb 20, 2024 at 02:18:15PM +0100, benjamin at sipsolutions.net wrote:
> This aligns both the supplicant and bss structures to use the same
> pattern of a valid_links bitmask plus per-link entries.

I can understand the other changes, but how is the following change
related to the rest of this patch and the commit message? And why should
that CTRL-EVENT-CONNECTED event message be changed from using the AP MLD
MAC address to the BSSID of the AP's affiliated link that was used for
association?

> diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
> @@ -1006,13 +1006,13 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
>  	if (state == WPA_COMPLETED && wpa_s->new_connection) {
>  		struct wpa_ssid *ssid = wpa_s->current_ssid;
>  		int fils_hlp_sent = 0;
> -		char mld_addr[50];
> +		char assoc_link[50];
>  
> -		mld_addr[0] = '\0';
> +		assoc_link[0] = '\0';
>  		if (wpa_s->valid_links)
> -			os_snprintf(mld_addr, sizeof(mld_addr),
> -				    " ap_mld_addr=" MACSTR,
> -				    MAC2STR(wpa_s->ap_mld_addr));
> +			os_snprintf(assoc_link, sizeof(assoc_link),
> +				    " assoc_link=" MACSTR,
> +				    MAC2STR(wpa_s->links[wpa_s->mlo_assoc_link_id].bssid));
>  
>  #ifdef CONFIG_SME
>  		if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
> @@ -1029,7 +1029,7 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
>  			MAC2STR(wpa_s->bssid),
>  			ssid ? ssid->id : -1,
>  			ssid && ssid->id_str ? ssid->id_str : "",
> -			fils_hlp_sent ? " FILS_HLP_SENT" : "", mld_addr);
> +			fils_hlp_sent ? " FILS_HLP_SENT" : "", assoc_link);
>  #endif /* CONFIG_CTRL_IFACE || !CONFIG_NO_STDOUT_DEBUG */
>  		wpas_clear_temp_disabled(wpa_s, ssid, 1);
>  		wpa_s->consecutive_conn_failures = 0;
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list