Set NL80211_WPA_VERSION_2 for all RSN connection
This is a revert of open source commit -
https://w1.fi/cgit/hostap/commit/?id=6cc78b3945d3271a66120378de101f7821fb0f2f
where for WPA3 connections, the WPA version was set to
NL80211_WPA_VERSION_2. This caused a connection failures on devices
where kernel nl80211 doesn't have the defenition of WPA version 3
for WPA3 authentication. Setting NL80211_WPA_VERSION_3 on such devices
returns invalid argument error for nl80211_connect command from
supplicant.
Bug: 320227488
Test: connect/disconnect to WPA2 and WPA3 APs.
Change-Id: I2459d4aeced2e6bbbf0f2c57aaf3150562159157
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index fede740..c906b33 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6889,14 +6889,8 @@
if (params->wpa_proto & WPA_PROTO_WPA)
ver |= NL80211_WPA_VERSION_1;
- if (params->wpa_proto & WPA_PROTO_RSN) {
-#if !defined(CONFIG_DRIVER_NL80211_BRCM) && !defined(CONFIG_DRIVER_NL80211_SYNA)
- if (wpa_key_mgmt_sae(params->key_mgmt_suite))
- ver |= NL80211_WPA_VERSION_3;
- else
-#endif
- ver |= NL80211_WPA_VERSION_2;
- }
+ if (params->wpa_proto & WPA_PROTO_RSN)
+ ver |= NL80211_WPA_VERSION_2;
wpa_printf(MSG_DEBUG, " * WPA Versions 0x%x", ver);
if (nla_put_u32(msg, NL80211_ATTR_WPA_VERSIONS, ver))