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.
Unified · Split
| @@ -4491,9 +4491,12 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, · 4490 unmodified lines | ||
| 4491 | 4491 | auth_data->bss = req->bss; |
| 4492 | 4492 | |
| 4493 | 4493 | if (req->auth_data_len >= 4) { |
| 4494 | − __le16 *pos = (__le16 *) req->auth_data; | |
| 4495 | − auth_data->sae_trans = le16_to_cpu(pos[0]); | |
| 4496 | − auth_data->sae_status = le16_to_cpu(pos[1]); | |
| 4494 | + if (req->auth_type == NL80211_AUTHTYPE_SAE) { | |
| 4495 | + __le16 *pos = (__le16 *) req->auth_data; | |
| 4496 | + | |
| 4497 | + auth_data->sae_trans = le16_to_cpu(pos[0]); | |
| 4498 | + auth_data->sae_status = le16_to_cpu(pos[1]); | |
| 4499 | + } | |
| 4497 | 4500 | memcpy(auth_data->data, req->auth_data + 4, |
| 4498 | 4501 | req->auth_data_len - 4); |
| 4499 | 4502 | auth_data->data_len += req->auth_data_len - 4; |