From 17810df3067ef29bcbf2128631a492cde49b6d14 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Mon, 18 Feb 2019 17:42:21 +0530 Subject: [PATCH] qcacmn: Add support for FT SAE and FT Suite-B Previously host driver only supports initial SAE and Suite-B authentication types and roaming to SAE AP is blocked. The 802.11 specification has introduced the Akm suite 00:0F:AC:9 for FT-SAE and 00:0F:AC:13 for FT Suite-B akm type. Add support for FT-SAE and FT-Suite-B. Extend the enum wlan_auth_type to include WLAN_AUTH_TYPE_FT_SAE, WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384. This enum wlan_auth_type is the new implementation for akm type in converged scan module corresponding to the legacy eCsrAuthType enum. Add changes in scan module filter to support FT-SAE and FT-Suite-B authentication suites be added to filter->auth_type. csr_scan_get_result() will translate the legacy eCsrAuthType to wlan_auth_type and push it to the filter->auth_type. Change-Id: I74d7b0be74d33ced5d3e528032aec6e057a75ff3 CRs-Fixed: 2400683 --- os_if/linux/qca_vendor.h | 4 ++++ .../cmn_defs/inc/wlan_cmn_ieee80211.h | 4 +++- umac/cmn_services/inc/wlan_cmn.h | 4 ++++ umac/scan/core/src/wlan_scan_filter.c | 22 +++++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/os_if/linux/qca_vendor.h b/os_if/linux/qca_vendor.h index c4517b9d8d9f..c98ccaee7b8a 100644 --- a/os_if/linux/qca_vendor.h +++ b/os_if/linux/qca_vendor.h @@ -646,6 +646,8 @@ enum qca_wlan_802_11_mode { * @QCA_WLAN_AUTH_TYPE_WAI_PSK wai psk key * @QCA_WLAN_AUTH_TYPE_CCKM_WPA: cckm wpa key * @QCA_WLAN_AUTH_TYPE_CCKM_RSN: cckm rsn key + * @QCA_WLAN_AUTH_TYPE_FT_SAE: FT sae akm + * @QCA_WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384: FT suite B SHA384 */ enum qca_wlan_auth_type { QCA_WLAN_AUTH_TYPE_INVALID, @@ -665,6 +667,8 @@ enum qca_wlan_auth_type { QCA_WLAN_AUTH_TYPE_CCKM_WPA, QCA_WLAN_AUTH_TYPE_CCKM_RSN, QCA_WLAN_AUTH_TYPE_AUTOSWITCH, + QCA_WLAN_AUTH_TYPE_FT_SAE, + QCA_WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384, }; /** diff --git a/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h b/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h index 2cbd5948ab65..b2feb8675542 100644 --- a/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h +++ b/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019 The Linux Foundation. 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 @@ -417,8 +417,10 @@ enum extn_element_ie { #define WLAN_AKM_SHA256_IEEE8021X 0x05 #define WLAN_AKM_SHA256_PSK 0x06 #define WLAN_AKM_SAE 0x08 +#define WLAN_AKM_FT_SAE 0x09 #define WLAN_AKM_SUITEB_EAP_SHA256 0x0B #define WLAN_AKM_SUITEB_EAP_SHA384 0x0C +#define WLAN_AKM_FT_SUITEB_EAP_SHA384 0x0D #define WLAN_AKM_FILS_SHA256 0x0E #define WLAN_AKM_FILS_SHA384 0x0F #define WLAN_AKM_FILS_FT_SHA256 0x10 diff --git a/umac/cmn_services/inc/wlan_cmn.h b/umac/cmn_services/inc/wlan_cmn.h index f0a6d832ea25..95b170167122 100644 --- a/umac/cmn_services/inc/wlan_cmn.h +++ b/umac/cmn_services/inc/wlan_cmn.h @@ -523,6 +523,8 @@ enum wlan_pmf_cap { * @WLAN_AUTH_TYPE_OWE: OWE * @WLAN_AUTH_TYPE_SUITEB_EAP_SHA256: EAP SHA256 * @WLAN_AUTH_TYPE_SUITEB_EAP_SHA384: EAP SHA384 + * @WLAN_AUTH_TYPE_FT_SAE: FT SAE + * @WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384: FT suiteb SHA384 * @WLAN_AUTH_TYPE_ANY: To match any auth type * @WLAN_NUM_OF_SUPPORT_AUTH_TYPE: Max no of Auth type */ @@ -553,6 +555,8 @@ enum wlan_auth_type { WLAN_AUTH_TYPE_SUITEB_EAP_SHA256, WLAN_AUTH_TYPE_SUITEB_EAP_SHA384, WLAN_AUTH_TYPE_OSEN, + WLAN_AUTH_TYPE_FT_SAE, + WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384, WLAN_AUTH_TYPE_ANY, WLAN_NUM_OF_SUPPORT_AUTH_TYPE = WLAN_AUTH_TYPE_ANY, }; diff --git a/umac/scan/core/src/wlan_scan_filter.c b/umac/scan/core/src/wlan_scan_filter.c index a32d2c200df0..a9853821cfa6 100644 --- a/umac/scan/core/src/wlan_scan_filter.c +++ b/umac/scan/core/src/wlan_scan_filter.c @@ -618,6 +618,28 @@ static bool scm_is_rsn_security(struct scan_filter *filter, break; } } + + if (scm_is_cipher_match(rsn.akm_suites, rsn.akm_suite_count, + WLAN_RSN_SEL(WLAN_AKM_FT_SAE))) { + if (match_any_akm || (WLAN_AUTH_TYPE_FT_SAE == + filter->auth_type[i])) { + neg_auth = WLAN_AUTH_TYPE_FT_SAE; + match = true; + break; + } + } + + if (scm_is_cipher_match(rsn.akm_suites, rsn.akm_suite_count, + WLAN_RSN_SEL( + WLAN_AKM_FT_SUITEB_EAP_SHA384))) { + if (match_any_akm || + (WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384 == + filter->auth_type[i])) { + neg_auth = WLAN_AUTH_TYPE_FT_SUITEB_EAP_SHA384; + match = true; + break; + } + } } if (!match) {