From 7f67effb98ab7ffae964321d9b1d5d66b67d0f21 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Thu, 28 May 2020 14:53:02 +0530 Subject: [PATCH] qcacld-3.0: Fix connection failure with SAP in WPA3 mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case if the EXTERNAL_AUTH_SUPPORT is present natively in kernel, then the backport flag CFG80211_EXTERNAL_AUTH_SUPPORT will not be present. Currently host checks for defined(CFG80211_EXTERNAL_AUTH_SUPPORT) flag to register ops for external_auth. This results in external auth fail in the above case. In the driver all instances of “defined(CFG80211_EXTERNAL_AUTH_SUPPORT)” should be paired with || (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)) where 4.17.0 is the kernel version where the external auth support gets added to the upstream kernel. Change-Id: I67b687b37ab60b581e97ea81243c0d30bbb17acd CRs-Fixed: 2692697 --- core/hdd/src/wlan_hdd_assoc.c | 3 ++- core/hdd/src/wlan_hdd_cfg80211.c | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 46ed09885082..a5d197cebd5b 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -193,7 +193,8 @@ static const int beacon_filter_table[] = { #endif #if defined(WLAN_FEATURE_SAE) && \ - defined(CFG80211_EXTERNAL_AUTH_SUPPORT) + (defined(CFG80211_EXTERNAL_AUTH_SUPPORT) || \ + LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)) /** * wlan_hdd_sae_callback() - Sends SAE info to supplicant * @adapter: pointer adapter context diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 50adf998738c..00d4eeecea20 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -14596,7 +14596,8 @@ static void wlan_hdd_cfg80211_set_wiphy_oce_scan_flags(struct wiphy *wiphy) #endif #if defined(WLAN_FEATURE_SAE) && \ - defined(CFG80211_EXTERNAL_AUTH_SUPPORT) + (defined(CFG80211_EXTERNAL_AUTH_SUPPORT) || \ + LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)) /** * wlan_hdd_cfg80211_set_wiphy_sae_feature() - Indicates support of SAE feature * @wiphy: Pointer to wiphy @@ -22277,7 +22278,8 @@ wlan_hdd_cfg80211_update_connect_params(struct wiphy *wiphy, #endif #if defined(WLAN_FEATURE_SAE) && \ - defined(CFG80211_EXTERNAL_AUTH_SUPPORT) + (defined(CFG80211_EXTERNAL_AUTH_SUPPORT) || \ + LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)) #if defined(CFG80211_EXTERNAL_AUTH_AP_SUPPORT) /** * wlan_hdd_extauth_cache_pmkid() - Extract and cache pmkid @@ -22884,7 +22886,8 @@ static struct cfg80211_ops wlan_hdd_cfg80211_ops = { .update_connect_params = wlan_hdd_cfg80211_update_connect_params, #endif #if defined(WLAN_FEATURE_SAE) && \ - defined(CFG80211_EXTERNAL_AUTH_SUPPORT) + (defined(CFG80211_EXTERNAL_AUTH_SUPPORT) || \ + LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)) .external_auth = wlan_hdd_cfg80211_external_auth, #endif #if defined(WLAN_FEATURE_NAN) && \