From: Jouni Malinen Date: Wed, 26 Oct 2016 21:41:59 +0000 (+0300) Subject: mac80211: Allow AUTH_DATA to be used for FILS X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ec63612c3c8da200d040dd4846d646a747722df;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mac80211: Allow AUTH_DATA to be used for FILS The special SAE case should be limited only for SAE since the more generic AUTH_DATA can now be used with other authentication algorithms as well. Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 32fd29581d4d..00db34b204db 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4491,9 +4491,12 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, auth_data->bss = req->bss; if (req->auth_data_len >= 4) { - __le16 *pos = (__le16 *) req->auth_data; - auth_data->sae_trans = le16_to_cpu(pos[0]); - auth_data->sae_status = le16_to_cpu(pos[1]); + if (req->auth_type == NL80211_AUTHTYPE_SAE) { + __le16 *pos = (__le16 *) req->auth_data; + + auth_data->sae_trans = le16_to_cpu(pos[0]); + auth_data->sae_status = le16_to_cpu(pos[1]); + } memcpy(auth_data->data, req->auth_data + 4, req->auth_data_len - 4); auth_data->data_len += req->auth_data_len - 4;