nl80211: Set NL80211_WPA_VERSION_2 vs. _3 based on AKM

Signed-off-by: Chung-Hsien Hsu <chung-hsien.hsu@infineon.com>
Signed-off-by: Daisuke Mizobuchi <mizo@atmark-techno.com>
This commit is contained in:
Chung-Hsien Hsu 2023-07-19 14:22:27 +09:00 committed by Jouni Malinen
parent c3b8452e0e
commit 6cc78b3945

View file

@ -6755,8 +6755,12 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
if (params->wpa_proto & WPA_PROTO_WPA) if (params->wpa_proto & WPA_PROTO_WPA)
ver |= NL80211_WPA_VERSION_1; ver |= NL80211_WPA_VERSION_1;
if (params->wpa_proto & WPA_PROTO_RSN) if (params->wpa_proto & WPA_PROTO_RSN) {
ver |= NL80211_WPA_VERSION_2; if (wpa_key_mgmt_sae(params->key_mgmt_suite))
ver |= NL80211_WPA_VERSION_3;
else
ver |= NL80211_WPA_VERSION_2;
}
wpa_printf(MSG_DEBUG, " * WPA Versions 0x%x", ver); wpa_printf(MSG_DEBUG, " * WPA Versions 0x%x", ver);
if (nla_put_u32(msg, NL80211_ATTR_WPA_VERSIONS, ver)) if (nla_put_u32(msg, NL80211_ATTR_WPA_VERSIONS, ver))