From: Chung-Hsien Hsu Date: Wed, 19 Jul 2023 05:22:27 +0000 (+0900) Subject: nl80211: Set NL80211_WPA_VERSION_2 vs. _3 based on AKM X-Git-Tag: hostap_2_11~833 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cc78b3945d3271a66120378de101f7821fb0f2f;p=thirdparty%2Fhostap.git nl80211: Set NL80211_WPA_VERSION_2 vs. _3 based on AKM Signed-off-by: Chung-Hsien Hsu Signed-off-by: Daisuke Mizobuchi --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index f399eafb7..58029c69b 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -6755,8 +6755,12 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv, if (params->wpa_proto & WPA_PROTO_WPA) ver |= NL80211_WPA_VERSION_1; - if (params->wpa_proto & WPA_PROTO_RSN) - ver |= NL80211_WPA_VERSION_2; + if (params->wpa_proto & WPA_PROTO_RSN) { + 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); if (nla_put_u32(msg, NL80211_ATTR_WPA_VERSIONS, ver))