commit | f99885cc672a583a51144dbb24b9bcc14350a37c | [log] [tgz] |
---|---|---|
author | Sunil Ravi <sunilravi@google.com> | Tue Jan 16 21:30:05 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jan 17 02:28:12 2024 +0000 |
tree | 8d826f8f1539a0f0363a8e62c1aca0410b8ab014 | |
parent | 48ed5d523e63d5e9d001f6a4f5c7d9e1c9fcf261 [diff] |
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. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4e39193041e303d081d35fe9c2f676628c5d3cf0) Merged-In: I2459d4aeced2e6bbbf0f2c57aaf3150562159157 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))