PASN: Add wpa_pasn_reset() to eliminate need for struct wpa_supplicant
Split wpas_pasn_reset() so that the main reset steps can be used without an instance of struct wpa_supplicant. This is needed to allow PASN implementation to be used for additional purposes outside the context of wpa_supplicant. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
10e455c44a
commit
5535fbcfac
1 changed files with 13 additions and 7 deletions
|
@ -1127,19 +1127,13 @@ fail:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void wpas_pasn_reset(struct wpa_supplicant *wpa_s)
|
static void wpa_pasn_reset(struct wpas_pasn *pasn)
|
||||||
{
|
{
|
||||||
struct wpas_pasn *pasn = &wpa_s->pasn;
|
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "PASN: Reset");
|
wpa_printf(MSG_DEBUG, "PASN: Reset");
|
||||||
|
|
||||||
crypto_ecdh_deinit(pasn->ecdh);
|
crypto_ecdh_deinit(pasn->ecdh);
|
||||||
pasn->ecdh = NULL;
|
pasn->ecdh = NULL;
|
||||||
|
|
||||||
wpas_pasn_cancel_auth_work(wpa_s);
|
|
||||||
wpa_s->pasn_auth_work = NULL;
|
|
||||||
|
|
||||||
eloop_cancel_timeout(wpas_pasn_auth_work_timeout, wpa_s, NULL);
|
|
||||||
|
|
||||||
pasn->akmp = 0;
|
pasn->akmp = 0;
|
||||||
pasn->cipher = 0;
|
pasn->cipher = 0;
|
||||||
|
@ -1176,6 +1170,18 @@ static void wpas_pasn_reset(struct wpa_supplicant *wpa_s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void wpas_pasn_reset(struct wpa_supplicant *wpa_s)
|
||||||
|
{
|
||||||
|
struct wpas_pasn *pasn = &wpa_s->pasn;
|
||||||
|
|
||||||
|
wpas_pasn_cancel_auth_work(wpa_s);
|
||||||
|
wpa_s->pasn_auth_work = NULL;
|
||||||
|
eloop_cancel_timeout(wpas_pasn_auth_work_timeout, wpa_s, NULL);
|
||||||
|
|
||||||
|
wpa_pasn_reset(pasn);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int wpas_pasn_set_pmk(struct wpa_supplicant *wpa_s,
|
static int wpas_pasn_set_pmk(struct wpa_supplicant *wpa_s,
|
||||||
struct wpa_ie_data *rsn_data,
|
struct wpa_ie_data *rsn_data,
|
||||||
struct wpa_pasn_params_data *pasn_data,
|
struct wpa_pasn_params_data *pasn_data,
|
||||||
|
|
Loading…
Add table
Reference in a new issue