FT: Add FT auth algorithm to connect params when roaming

Add WPA FT auth to connect params in case of a re-connection to ESS
supporting FT when FT was used in the first connect.

Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
This commit is contained in:
Ahmad Masri 2018-04-16 13:30:42 +03:00 committed by Jouni Malinen
parent 3dc3afe298
commit 86c998d37a
2 changed files with 13 additions and 1 deletions

View file

@ -5505,6 +5505,8 @@ static int wpa_driver_nl80211_try_connect(
algs++;
if (params->auth_alg & WPA_AUTH_ALG_FILS)
algs++;
if (params->auth_alg & WPA_AUTH_ALG_FT)
algs++;
if (algs > 1) {
wpa_printf(MSG_DEBUG, " * Leave out Auth Type for automatic "
"selection");

View file

@ -2725,16 +2725,26 @@ static u8 * wpas_populate_assoc_ies(
const u8 *mdie = wpa_bss_get_ie(bss, WLAN_EID_MOBILITY_DOMAIN);
if (mdie && mdie[1] >= MOBILITY_DOMAIN_ID_LEN) {
size_t len = 0;
const u8 *md = mdie + 2;
const u8 *wpa_md = wpa_sm_get_ft_md(wpa_s->wpa);
if (os_memcmp(md, wpa_md,
MOBILITY_DOMAIN_ID_LEN) == 0) {
/* Add mobility domain IE */
wpa_ie_len += wpa_ft_add_mdie(
len = wpa_ft_add_mdie(
wpa_s->wpa, wpa_ie + wpa_ie_len,
max_wpa_ie_len - wpa_ie_len, mdie);
wpa_ie_len += len;
}
#ifdef CONFIG_SME
if (len > 0 && wpa_s->sme.ft_used &&
wpa_sm_has_ptk(wpa_s->wpa)) {
wpa_dbg(wpa_s, MSG_DEBUG,
"SME: Trying to use FT over-the-air");
algs |= WPA_AUTH_ALG_FT;
}
#endif /* CONFIG_SME */
}
}
#endif /* CONFIG_IEEE80211R */