aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-12-31 09:05:42 (GMT)
committerJouni Malinen <j@w1.fi>2013-01-12 15:51:52 (GMT)
commitdd43026a193058c30ab752db075c118b856d1799 (patch)
tree915085be692c4aa0d80b9b0a868d7842c14142b8 /wpa_supplicant/sme.c
parent47b55a3ef59d9363bbd624e8b5aa714467111743 (diff)
downloadhostap-dd43026a193058c30ab752db075c118b856d1799.zip
hostap-dd43026a193058c30ab752db075c118b856d1799.tar.gz
hostap-dd43026a193058c30ab752db075c118b856d1799.tar.bz2
SAE: Rename state variables to match IEEE 802.11 standard
The enum values for struct sae_data::state now match the protocol instance states as defined in IEEE Std 802.11-2012, 11.3.8.2.2 Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 043a0a7..814beb7 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -344,7 +344,7 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
return;
params.sae_data = wpabuf_head(resp);
params.sae_data_len = wpabuf_len(resp);
- wpa_s->sme.sae.state = start ? SAE_COMMIT : SAE_CONFIRM;
+ wpa_s->sme.sae.state = start ? SAE_COMMITTED : SAE_CONFIRMED;
}
#endif /* CONFIG_SAE */
@@ -390,7 +390,7 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, struct wpa_ssid *ssid)
{
#ifdef CONFIG_SAE
- wpa_s->sme.sae.state = SAE_INIT;
+ wpa_s->sme.sae.state = SAE_NOTHING;
wpa_s->sme.sae.send_confirm = 0;
#endif /* CONFIG_SAE */
sme_send_authentication(wpa_s, bss, ssid, 1);
@@ -414,7 +414,7 @@ static int sme_sae_auth(struct wpa_supplicant *wpa_s, u16 auth_transaction,
if (wpa_s->current_bss == NULL ||
wpa_s->current_ssid == NULL)
return -1;
- if (wpa_s->sme.sae.state != SAE_COMMIT)
+ if (wpa_s->sme.sae.state != SAE_COMMITTED)
return -1;
if (sae_parse_commit(&wpa_s->sme.sae, data, len) !=
WLAN_STATUS_SUCCESS)
@@ -431,10 +431,11 @@ static int sme_sae_auth(struct wpa_supplicant *wpa_s, u16 auth_transaction,
return 0;
} else if (auth_transaction == 2) {
wpa_dbg(wpa_s, MSG_DEBUG, "SME SAE confirm");
- if (wpa_s->sme.sae.state != SAE_CONFIRM)
+ if (wpa_s->sme.sae.state != SAE_CONFIRMED)
return -1;
if (sae_check_confirm(&wpa_s->sme.sae, data, len) < 0)
return -1;
+ wpa_s->sme.sae.state = SAE_ACCEPTED;
return 1;
}