Przeglądaj źródła

qcacld-3.0: Add support for AKM25

Add support for FT-SAE-EXT-KEY AKM.

Change-Id: Ia013a81f67d204fed486ab130b3480654703f59c
CRs-Fixed: 3406625
Surya Prakash Sivaraj 2 lat temu
rodzic
commit
83299d06fc

+ 8 - 4
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -1561,6 +1561,10 @@ static uint32_t cm_get_rsn_wmi_auth_type(int32_t akm)
 		return WMI_AUTH_RSNA_FILS_SHA384;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FILS_SHA256))
 		return WMI_AUTH_RSNA_FILS_SHA256;
+	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY))
+		return WMI_AUTH_FT_RSNA_SAE_SHA384;
+	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY))
+		return WMI_AUTH_WPA3_SAE_SHA384;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE))
 		return WMI_AUTH_FT_RSNA_SAE;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE))
@@ -1587,8 +1591,6 @@ static uint32_t cm_get_rsn_wmi_auth_type(int32_t akm)
 		return WMI_AUTH_RSNA_SUITE_B_8021X_SHA384;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_IEEE8021X_SHA384))
 		return WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384;
-	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY))
-		return WMI_AUTH_WPA3_SAE_SHA384;
 	else
 		return WMI_AUTH_NONE;
 }
@@ -3501,7 +3503,8 @@ cm_akm_roam_allowed(struct wlan_objmgr_psoc *psoc,
 		return QDF_STATUS_E_NOSUPPORT;
 	}
 
-	if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY) &&
+	if ((QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY) ||
+	     QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY)) &&
 	    !CM_IS_FW_SAE_EXT_ROAM_SUPPORTED(fw_akm_bitmap)) {
 		mlme_info("Roaming not supported for SAE EXT akm");
 		return QDF_STATUS_E_NOSUPPORT;
@@ -5403,7 +5406,8 @@ bool cm_is_auth_type_11r(struct wlan_mlme_psoc_ext_obj *mlme_obj,
 		   QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_IEEE8021X) ||
 		   QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_PSK) ||
 		   QDF_HAS_PARAM(akm,
-				 WLAN_CRYPTO_KEY_MGMT_FT_IEEE8021X_SHA384)) {
+				 WLAN_CRYPTO_KEY_MGMT_FT_IEEE8021X_SHA384) ||
+		   QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY)) {
 		return true;
 	}
 

+ 4 - 1
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -395,6 +395,8 @@ static const uint8_t *cm_diag_get_akm_str(enum mgmt_auth_type auth_type,
 		return "FILS-SHA384";
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FILS_SHA256))
 		return "FILS-SHA256";
+	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY))
+		return "FT-SAE-EXT-KEY";
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE))
 		return "FT-SAE";
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY))
@@ -1479,7 +1481,8 @@ static void cm_process_connect_complete(struct wlan_objmgr_psoc *psoc,
 				     sizeof(struct wlan_frame_hdr));
 	}
 	akm = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT);
-	if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE)) {
+	if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE) ||
+	    QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY)) {
 		mlme_debug("Update the MDID in PMK cache for FT-SAE case");
 		cm_update_pmk_cache_ft(psoc, vdev_id, NULL);
 	}

+ 1 - 0
components/wmi/src/wmi_unified_roam_tlv.c

@@ -3810,6 +3810,7 @@ static bool wmi_is_ft_akm(int akm,
 	case WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384:
 	case WMI_AUTH_FT_RSNA_FILS_SHA256:
 	case WMI_AUTH_FT_RSNA_FILS_SHA384:
+	case WMI_AUTH_FT_RSNA_SAE_SHA384:
 		return true;
 	case WMI_AUTH_OPEN:
 		if (roam_req->rso_11r_info.mdid.mdie_present &&

+ 2 - 0
core/hdd/src/wlan_hdd_assoc.c

@@ -326,6 +326,8 @@ wlan_hdd_get_keymgmt_for_sae_akm(uint32_t akm)
 		return WLAN_AKM_SUITE_FT_OVER_SAE;
 	else if (akm == WLAN_AKM_SAE_EXT_KEY)
 		return WLAN_AKM_SUITE_SAE_EXT_KEY;
+	else if (akm == WLAN_AKM_FT_SAE_EXT_KEY)
+		return WLAN_AKM_SUITE_FT_SAE_EXT_KEY;
 	/**
 	 * Legacy FW doesn't support SAE-EXK-KEY or
 	 * Cross-SAE_AKM roaming. In such cases, send

+ 1 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -539,6 +539,7 @@ static const u32 hdd_sta_akm_suites[] = {
 	WAPI_PSK_AKM_SUITE,
 	WAPI_CERT_AKM_SUITE,
 	WLAN_AKM_SUITE_SAE_EXT_KEY,
+	WLAN_AKM_SUITE_FT_SAE_EXT_KEY,
 };
 
 /*akm suits supported by AP*/

+ 5 - 1
core/hdd/src/wlan_hdd_cfg80211.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -192,6 +192,10 @@ extern const struct nla_policy wlan_hdd_wisa_cmd_policy[
 #define WLAN_AKM_SUITE_SAE_EXT_KEY 0x000FAC18
 #endif
 
+#ifndef WLAN_AKM_SUITE_FT_SAE_EXT_KEY
+#define WLAN_AKM_SUITE_FT_SAE_EXT_KEY 0x000FAC19
+#endif
+
 #ifdef FEATURE_WLAN_TDLS
 #define WLAN_IS_TDLS_SETUP_ACTION(action) \
 	((TDLS_SETUP_REQUEST <= action) && \

+ 1 - 0
core/mac/inc/ani_system_defs.h

@@ -89,6 +89,7 @@ enum ani_akm_type {
 	ANI_AKM_TYPE_WPA,
 	ANI_AKM_TYPE_WPA_PSK,
 	ANI_AKM_TYPE_SAE_EXT_KEY,
+	ANI_AKM_TYPE_FT_SAE_EXT_KEY,
 	ANI_NUM_OF_SUPPORT_AKM_TYPE,
 	ANI_AKM_TYPE_UNKNOWN = 0xff,
 };

+ 3 - 1
core/mac/src/pe/lim/lim_process_mlm_req_messages.c

@@ -594,7 +594,9 @@ static inline
 uint32_t lim_get_sae_keymgmt_suite(uint32_t keymgmt)
 {
 	/* Select the best SAE AKM suite supported */
-	if (QDF_HAS_PARAM(keymgmt, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY))
+	if (QDF_HAS_PARAM(keymgmt, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY))
+		return WLAN_AKM_FT_SAE_EXT_KEY;
+	else if (QDF_HAS_PARAM(keymgmt, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY))
 		return WLAN_AKM_SAE_EXT_KEY;
 	else if (QDF_HAS_PARAM(keymgmt, WLAN_CRYPTO_KEY_MGMT_FT_SAE))
 		return WLAN_AKM_FT_SAE;

+ 4 - 1
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -524,7 +524,8 @@ static void lim_set_privacy(struct mac_context *mac_ctx,
 		mac_ctx->mlme_cfg->wep_params.auth_type = eSIR_SHARED_KEY;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE) ||
 	    QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE) ||
-	    QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY))
+	    QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY) ||
+	    QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY))
 		mac_ctx->mlme_cfg->wep_params.auth_type = eSIR_AUTH_TYPE_SAE;
 
 	if (QDF_HAS_PARAM(ucast_cipher, WLAN_CRYPTO_CIPHER_WEP) ||
@@ -3602,6 +3603,8 @@ lim_get_rsn_akm(uint32_t akm)
 		return ANI_AKM_TYPE_FILS_SHA384;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FILS_SHA256))
 		return ANI_AKM_TYPE_FILS_SHA256;
+	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY))
+		return ANI_AKM_TYPE_FT_SAE_EXT_KEY;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE))
 		return ANI_AKM_TYPE_FT_SAE;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE))

+ 1 - 0
core/sme/inc/csr_api.h

@@ -73,6 +73,7 @@ enum csr_akm_type {
 	eCSR_AUTH_TYPE_FT_SAE,
 	eCSR_AUTH_TYPE_FT_SUITEB_EAP_SHA384,
 	eCSR_AUTH_TYPE_SAE_EXT_KEY,
+	eCSR_AUTH_TYPE_FT_SAE_EXT_KEY,
 	eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
 	eCSR_AUTH_TYPE_FAILED = 0xff,
 	eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,

+ 4 - 2
core/sme/src/csr/csr_api_scan.c

@@ -617,6 +617,10 @@ static void csr_fill_rsn_auth_type(enum csr_akm_type *auth_type, uint32_t akm)
 		*auth_type = eCSR_AUTH_TYPE_FILS_SHA384;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FILS_SHA256))
 		*auth_type = eCSR_AUTH_TYPE_FILS_SHA256;
+	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY))
+		*auth_type = eCSR_AUTH_TYPE_FT_SAE_EXT_KEY;
+	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY))
+		*auth_type = eCSR_AUTH_TYPE_SAE_EXT_KEY;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_SAE))
 		*auth_type = eCSR_AUTH_TYPE_FT_SAE;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE))
@@ -647,8 +651,6 @@ static void csr_fill_rsn_auth_type(enum csr_akm_type *auth_type, uint32_t akm)
 		*auth_type = eCSR_AUTH_TYPE_SUITEB_EAP_SHA384;
 	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_FT_IEEE8021X_SHA384))
 		*auth_type = eCSR_AUTH_TYPE_FT_SUITEB_EAP_SHA384;
-	else if (QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE_EXT_KEY))
-		*auth_type = eCSR_AUTH_TYPE_SAE_EXT_KEY;
 	else
 		*auth_type = eCSR_AUTH_TYPE_NONE;
 }