Multi-AP: Allow supported profile to be configured

Allow both hostapd and wpa_supplicant to be configured with the
supported Multi-AP profile. The configured value will be advertised in
the Multi-AP element.

Signed-off-by: Manoj Sekar <quic_sekar@quicinc.com>
This commit is contained in:
Manoj Sekar 2024-02-26 18:18:21 +05:30 committed by Jouni Malinen
parent c3e5286537
commit 420afbdbdf
11 changed files with 37 additions and 0 deletions

View file

@ -4802,6 +4802,16 @@ static int hostapd_config_fill(struct hostapd_config *conf,
}
bss->multi_ap = val;
} else if (os_strcmp(buf, "multi_ap_profile") == 0) {
int val = atoi(pos);
if (val < MULTI_AP_PROFILE_1 || val > MULTI_AP_PROFILE_MAX) {
wpa_printf(MSG_ERROR,
"Line %d: Invalid multi_ap_profile '%s'",
line, buf);
return -1;
}
bss->multi_ap_profile = val;
} else if (os_strcmp(buf, "rssi_reject_assoc_rssi") == 0) {
conf->rssi_reject_assoc_rssi = atoi(pos);
} else if (os_strcmp(buf, "rssi_reject_assoc_timeout") == 0) {

View file

@ -2565,6 +2565,12 @@ own_ip_addr=127.0.0.1
#multi_ap_backhaul_wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
#multi_ap_backhaul_wpa_passphrase=secret passphrase
# Multi-AP Profile
# Indicate the supported Multi-AP profile (default: 2)
# 1 = Supports Multi-AP profile 1 as defined in Wi-Fi EasyMesh specification
# 2 = Supports Multi-AP profile 2 as defined in Wi-Fi EasyMesh specification
#multi_ap_profile=2
# WPS UPnP interface
# If set, support for external Registrars is enabled.
#upnp_iface=br0

View file

@ -163,6 +163,8 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
/* Default to strict CRL checking. */
bss->check_crl_strict = 1;
bss->multi_ap_profile = MULTI_AP_PROFILE_2;
#ifdef CONFIG_TESTING_OPTIONS
bss->sae_commit_status = -1;
bss->test_assoc_comeback_type = -1;

View file

@ -800,6 +800,7 @@ struct hostapd_bss_config {
#define BACKHAUL_BSS 1
#define FRONTHAUL_BSS 2
int multi_ap; /* bitmap of BACKHAUL_BSS, FRONTHAUL_BSS */
int multi_ap_profile;
#ifdef CONFIG_AIRTIME_POLICY
unsigned int airtime_weight;

View file

@ -100,6 +100,8 @@ static u8 * hostapd_eid_multi_ap(struct hostapd_data *hapd, u8 *eid, size_t len)
if (hapd->conf->multi_ap & FRONTHAUL_BSS)
multi_ap.capability |= MULTI_AP_FRONTHAUL_BSS;
multi_ap.profile = hapd->conf->multi_ap_profile;
return eid + add_multi_ap_ie(eid, len, &multi_ap);
}

View file

@ -2747,6 +2747,8 @@ static const struct parse_data ssid_fields[] = {
{ INT_RANGE(owe_ptk_workaround, 0, 1) },
{ INT_RANGE(multi_ap_backhaul_sta, 0, 1) },
{ INT_RANGE(ft_eap_pmksa_caching, 0, 1) },
{ INT_RANGE(multi_ap_profile, MULTI_AP_PROFILE_1,
MULTI_AP_PROFILE_MAX) },
{ INT_RANGE(beacon_prot, 0, 1) },
{ INT_RANGE(transition_disable, 0, 255) },
{ INT_RANGE(sae_pk, 0, 2) },

View file

@ -850,6 +850,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
INT(owe_ptk_workaround);
INT(multi_ap_backhaul_sta);
INT(ft_eap_pmksa_caching);
INT(multi_ap_profile);
INT(beacon_prot);
INT(transition_disable);
INT(sae_pk);

View file

@ -1187,6 +1187,11 @@ struct wpa_ssid {
*/
int ft_eap_pmksa_caching;
/**
* multi_ap_profile - Supported Multi-AP profile
*/
int multi_ap_profile;
/**
* beacon_prot - Whether Beacon protection is enabled
*

View file

@ -2411,6 +2411,7 @@ mscs_fail:
struct multi_ap_params multi_ap = { 0 };
multi_ap.capability = MULTI_AP_BACKHAUL_STA;
multi_ap.profile = ssid->multi_ap_profile;
multi_ap_ie_len = add_multi_ap_ie(
wpa_s->sme.assoc_req_ie + wpa_s->sme.assoc_req_ie_len,

View file

@ -3812,6 +3812,7 @@ mscs_end:
struct multi_ap_params multi_ap = { 0 };
multi_ap.capability = MULTI_AP_BACKHAUL_STA;
multi_ap.profile = ssid->multi_ap_profile;
multi_ap_ie_len = add_multi_ap_ie(wpa_ie + wpa_ie_len,
max_wpa_ie_len - wpa_ie_len,

View file

@ -1709,6 +1709,12 @@ fast_reauth=1
# support Multi-AP, and sets 4-address mode if it does. Thus, the netdev can be
# added to a bridge to allow forwarding frames over this backhaul link.
# Multi-AP Profile
# Indicate the supported Multi-AP profile
# 1 = Supports Multi-AP profile 1 as defined in Wi-Fi EasyMesh specification
# 2 = Supports Multi-AP profile 2 as defined in Wi-Fi EasyMesh specification
#multi_ap_profile=2
##### Fast Session Transfer (FST) support #####################################
#
# The options in this section are only available when the build configuration