From 4bf1c934a4cb980717535739e30be702cec8bc83 Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Mon, 17 Jun 2019 15:21:44 +0530 Subject: [PATCH] qcacld-3.0: Set negotiated auth type to OPEN for SAE-pmk cache case wpa_supplicant sends connect request with open auth and pmkid when PMK caching is enabled and if it has PMK/PMKID cached. Set rsn_auth_type to SAE when connect request has AKM as SAE auth_type as open. Set negotiated auth type to OPEN in SAE with pmk cache case as open authentication going to happen. Similar fix is applicable for FT-SAE. Handle the same. Change-Id: I9ccc419bd439702041840b0194bb0622d7856255 CRs-Fixed: 2467813 --- core/hdd/src/wlan_hdd_assoc.c | 8 ++++++-- core/sme/src/csr/csr_util.c | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index dddc09c743..8fbd4c6043 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -5611,9 +5611,9 @@ int hdd_set_csr_auth_type(struct hdd_adapter *adapter, roam_profile = hdd_roam_profile(adapter); roam_profile->AuthType.numEntries = 1; - hdd_debug("auth_type = %d rsn_auth_type %d wpa_versions %d", + hdd_debug("auth_type = %d rsn_auth_type %d wpa_versions %d key_mgmt : 0x%x", sta_ctx->conn_info.auth_type, rsn_auth_type, - sta_ctx->wpa_versions); + sta_ctx->wpa_versions, key_mgmt); switch (sta_ctx->conn_info.auth_type) { case eCSR_AUTH_TYPE_OPEN_SYSTEM: @@ -5711,6 +5711,10 @@ int hdd_set_csr_auth_type(struct hdd_adapter *adapter, /* OWE case */ roam_profile->AuthType.authType[0] = eCSR_AUTH_TYPE_OWE; + } else if (rsn_auth_type == eCSR_AUTH_TYPE_SAE) { + /* SAE with open authentication case */ + roam_profile->AuthType.authType[0] = + eCSR_AUTH_TYPE_SAE; } else if ((rsn_auth_type == eCSR_AUTH_TYPE_SUITEB_EAP_SHA256) && ((key_mgmt & HDD_AUTH_KEY_MGMT_802_1X) diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 824cf80672..125723ccac 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -3213,6 +3213,8 @@ csr_check_sae_auth(struct mac_context *mac_ctx, authentication)) { if (eCSR_AUTH_TYPE_FT_SAE == auth_type->authType[index]) *neg_authtype = eCSR_AUTH_TYPE_FT_SAE; + if (eCSR_AUTH_TYPE_OPEN_SYSTEM == auth_type->authType[index]) + *neg_authtype = eCSR_AUTH_TYPE_OPEN_SYSTEM; } if ((*neg_authtype == eCSR_AUTH_TYPE_UNKNOWN) && @@ -3220,6 +3222,8 @@ csr_check_sae_auth(struct mac_context *mac_ctx, c_auth_suites, authentication)) { if (eCSR_AUTH_TYPE_SAE == auth_type->authType[index]) *neg_authtype = eCSR_AUTH_TYPE_SAE; + if (eCSR_AUTH_TYPE_OPEN_SYSTEM == auth_type->authType[index]) + *neg_authtype = eCSR_AUTH_TYPE_OPEN_SYSTEM; } sme_debug("negotiated auth type is %d", *neg_authtype); }