diff options
author | Jouni Malinen <j@w1.fi> | 2010-01-03 21:14:40 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-01-03 21:14:40 +0200 |
commit | abd9fafab6498c26f282b4b3cfcbe09ba0a6f837 (patch) | |
tree | 1abbbc681aadbe52804697edf88b8d2f0a55be96 /wpa_supplicant/sme.c | |
parent | 70f8cc8ec81e46f753ea3b659613d10ff10145a7 (diff) | |
download | external_wpa_supplicant_8_ti-abd9fafab6498c26f282b4b3cfcbe09ba0a6f837.zip external_wpa_supplicant_8_ti-abd9fafab6498c26f282b4b3cfcbe09ba0a6f837.tar.gz external_wpa_supplicant_8_ti-abd9fafab6498c26f282b4b3cfcbe09ba0a6f837.tar.bz2 |
Standardize on a single definition of auth_alg bitfield values
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r-- | wpa_supplicant/sme.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 8339ad5..24f94a5 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -68,27 +68,21 @@ void sme_authenticate(struct wpa_supplicant *wpa_s, os_memcpy(wpa_s->sme.ssid, params.ssid, params.ssid_len); wpa_s->sme.ssid_len = params.ssid_len; - params.auth_alg = AUTH_ALG_OPEN_SYSTEM; + params.auth_alg = WPA_AUTH_ALG_OPEN; #ifdef IEEE8021X_EAPOL if (ssid->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA) { if (ssid->leap) { if (ssid->non_leap == 0) - params.auth_alg = AUTH_ALG_LEAP; + params.auth_alg = WPA_AUTH_ALG_LEAP; else - params.auth_alg |= AUTH_ALG_LEAP; + params.auth_alg |= WPA_AUTH_ALG_LEAP; } } #endif /* IEEE8021X_EAPOL */ wpa_printf(MSG_DEBUG, "Automatic auth_alg selection: 0x%x", params.auth_alg); if (ssid->auth_alg) { - params.auth_alg = 0; - if (ssid->auth_alg & WPA_AUTH_ALG_OPEN) - params.auth_alg |= AUTH_ALG_OPEN_SYSTEM; - if (ssid->auth_alg & WPA_AUTH_ALG_SHARED) - params.auth_alg |= AUTH_ALG_SHARED_KEY; - if (ssid->auth_alg & WPA_AUTH_ALG_LEAP) - params.auth_alg |= AUTH_ALG_LEAP; + params.auth_alg = ssid->auth_alg; wpa_printf(MSG_DEBUG, "Overriding auth_alg selection: 0x%x", params.auth_alg); } @@ -191,7 +185,7 @@ void sme_authenticate(struct wpa_supplicant *wpa_s, os_memcmp(md, wpa_s->sme.mobility_domain, 2) == 0) { wpa_printf(MSG_DEBUG, "SME: Trying to use FT " "over-the-air"); - params.auth_alg = AUTH_ALG_FT; + params.auth_alg = WPA_AUTH_ALG_FT; params.ie = wpa_s->sme.ft_ies; params.ie_len = wpa_s->sme.ft_ies_len; } |