DPP2: Disconnect before starting reconfiguration

The offchannel operations (scan, Public Action frame TX/RX) have
significantly more latency when performed while connected, so disconnect
when requested to initiate DPP reconfiguration to avoid this. The old
network profile (i.e., likely the current connection) is going to be
replaced in practice and as such, there is no need to try continue that
association any further.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-08-13 17:05:49 +03:00 committed by Jouni Malinen
parent 2afc46a0a9
commit 3adc1c623e

View file

@ -3690,6 +3690,12 @@ int wpas_dpp_reconfig(struct wpa_supplicant *wpa_s, const char *cmd)
"DPP: Failed to generate E-id for reconfiguration");
return -1;
}
if (wpa_s->wpa_state >= WPA_AUTHENTICATING) {
wpa_printf(MSG_DEBUG, "DPP: Disconnect for reconfiguration");
wpa_s->own_disconnect_req = 1;
wpa_supplicant_deauthenticate(
wpa_s, WLAN_REASON_DEAUTH_LEAVING);
}
wpas_dpp_chirp_stop(wpa_s);
wpa_s->dpp_allowed_roles = DPP_CAPAB_ENROLLEE;
wpa_s->dpp_qr_mutual = 0;