[PATCH] Multi-AP: wpa_supplicant: added support for VLAN ID and Multi-AP profile parsing
Arnon Meydav
ameydav at maxlinear.com
Tue Nov 12 23:52:58 PST 2024
Hi,
Is there any feedback on this patch?
Upper layers (e.g. Easymesh agent in a repeater) may need to know the VLAN ID of the backhaul AP, hence we would like to add this information to WPA_EVENT_CONNECTED.
Best regards,
Arnon
-----Original Message-----
From: Jurijs Soloveckis <jsoloveckis at maxlinear.com>
Sent: Wednesday, 21 August 2024 10:35
To: hostap at lists.infradead.org
Cc: Arnon Meydav <ameydav at maxlinear.com>; Sergejs Hatinecs <shatinecs at maxlinear.com>
Subject: [PATCH] Multi-AP: wpa_supplicant: added support for VLAN ID and Multi-AP profile parsing
For Multi-AP traffic separation requirement, wpa_supplicant parses 802.1Q Multi-AP sub-element and reports:
- VLAN ID of the AP it connects to.
- Multi-AP profile of the AP it connects to.
Signed-off-by: Jurijs Soloveckis <jsoloveckis at maxlinear.com>
---
wpa_supplicant/config_ssid.h | 7 +++++++
wpa_supplicant/events.c | 12 ++++++++++++
wpa_supplicant/wpa_supplicant.c | 7 +++++--
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index d64c30508..48e4a1da0 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -1192,6 +1192,13 @@ struct wpa_ssid {
*/
int multi_ap_profile;
+ /**
+ * multi_ap_primary_vlanid - Multi-AP Primary VLAN ID (Multi-AP Specification v2.0)
+ * 0 = VLAN ID not set
+ * 1-4094 = VLAN ID
+ */
+ u16 multi_ap_primary_vlanid;
+
/**
* beacon_prot - Whether Beacon protection is enabled
*
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 724f2413f..d80b65add 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3093,6 +3093,7 @@ static void multi_ap_process_assoc_resp(struct wpa_supplicant *wpa_s,
{
struct ieee802_11_elems elems;
struct multi_ap_params multi_ap;
+ struct wpa_ssid *ssid = wpa_s->current_ssid;
u16 status;
wpa_s->multi_ap_ie = 0;
@@ -3112,6 +3113,17 @@ static void multi_ap_process_assoc_resp(struct wpa_supplicant *wpa_s,
wpa_s->multi_ap_fronthaul = !!(multi_ap.capability &
MULTI_AP_FRONTHAUL_BSS);
wpa_s->multi_ap_ie = 1;
+
+ if (!ssid)
+ return;
+
+ ssid->multi_ap_primary_vlanid = 0;
+
+ if (wpa_s->multi_ap_backhaul) {
+ ssid->multi_ap_profile = multi_ap.profile;
+ if (ssid->multi_ap_backhaul_sta)
+ ssid->multi_ap_primary_vlanid = multi_ap.vlanid;
+ }
}
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 81858327b..c29fb562c 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1114,11 +1114,14 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
#if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG)
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_CONNECTED "- Connection to "
- MACSTR " completed [id=%d id_str=%s%s]%s",
+ MACSTR " completed [id=%d id_str=%s%s]%s"
+ " multi_ap_profile=%d multi_ap_primary_vlanid=%d",
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" : "", mld_addr,
+ ssid ? ssid->multi_ap_profile : 0,
+ ssid ? ssid->multi_ap_primary_vlanid : 0);
#endif /* CONFIG_CTRL_IFACE || !CONFIG_NO_STDOUT_DEBUG */
wpas_clear_temp_disabled(wpa_s, ssid, 1);
wpa_s->consecutive_conn_failures = 0;
--
2.17.1
More information about the Hostap
mailing list