Multi-AP: WPS support for different Multi-AP profiles

Update EAP-WSC parameters to include Multi-AP profile info to pass the
profile information through the provisioning steps. This is needed for
provisioning the STA configuration when different profiles are used.

Signed-off-by: Manoj Sekar <quic_sekar@quicinc.com>
This commit is contained in:
Manoj Sekar 2024-02-26 18:29:13 +05:30 committed by Jouni Malinen
parent 69d0862989
commit 024d4bca13
5 changed files with 27 additions and 5 deletions

View file

@ -255,8 +255,18 @@ static void * eap_wsc_init(struct eap_sm *sm)
cfg.new_ap_settings = &new_ap_settings; cfg.new_ap_settings = &new_ap_settings;
} }
if (os_strstr(phase1, "multi_ap=1")) pos = os_strstr(phase1, "multi_ap=");
cfg.multi_ap_backhaul_sta = 1; if (pos) {
u16 id = atoi(pos + 9);
if (id != 0) {
cfg.multi_ap_backhaul_sta = 1;
cfg.multi_ap_profile = id;
} else {
wpa_printf(MSG_DEBUG,
"EAP-WSC: Invalid multi_ap setting");
}
}
data->wps = wps_init(&cfg); data->wps = wps_init(&cfg);
if (data->wps == NULL) { if (data->wps == NULL) {

View file

@ -146,6 +146,7 @@ struct wps_data * wps_init(const struct wps_config *cfg)
} }
data->multi_ap_backhaul_sta = cfg->multi_ap_backhaul_sta; data->multi_ap_backhaul_sta = cfg->multi_ap_backhaul_sta;
data->multi_ap_profile = cfg->multi_ap_profile;
return data; return data;
} }

View file

@ -195,6 +195,11 @@ struct wps_config {
* enrollee * enrollee
*/ */
int multi_ap_backhaul_sta; int multi_ap_backhaul_sta;
/*
* multi_ap_profile - Get the Multi-AP Profile
*/
int multi_ap_profile;
}; };
struct wps_data * wps_init(const struct wps_config *cfg); struct wps_data * wps_init(const struct wps_config *cfg);

View file

@ -127,6 +127,7 @@ struct wps_data {
struct wps_nfc_pw_token *nfc_pw_token; struct wps_nfc_pw_token *nfc_pw_token;
int multi_ap_backhaul_sta; int multi_ap_backhaul_sta;
int multi_ap_profile;
}; };

View file

@ -1208,14 +1208,19 @@ int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
} }
} }
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
os_snprintf(phase1, sizeof(phase1), "pbc=1%s", if (multi_ap_backhaul_sta)
multi_ap_backhaul_sta ? " multi_ap=1" : ""); os_snprintf(phase1, sizeof(phase1), "pbc=1 multi_ap=%d",
multi_ap_backhaul_sta);
else
os_snprintf(phase1, sizeof(phase1), "pbc=1");
if (wpa_config_set_quoted(ssid, "phase1", phase1) < 0) if (wpa_config_set_quoted(ssid, "phase1", phase1) < 0)
return -1; return -1;
if (wpa_s->wps_fragment_size) if (wpa_s->wps_fragment_size)
ssid->eap.fragment_size = wpa_s->wps_fragment_size; ssid->eap.fragment_size = wpa_s->wps_fragment_size;
if (multi_ap_backhaul_sta) if (multi_ap_backhaul_sta) {
ssid->multi_ap_backhaul_sta = 1; ssid->multi_ap_backhaul_sta = 1;
ssid->multi_ap_profile = multi_ap_backhaul_sta;
}
wpa_s->supp_pbc_active = true; wpa_s->supp_pbc_active = true;
wpa_s->wps_overlap = false; wpa_s->wps_overlap = false;
wpa_supplicant_wps_event(wpa_s, WPS_EV_PBC_ACTIVE, NULL); wpa_supplicant_wps_event(wpa_s, WPS_EV_PBC_ACTIVE, NULL);