Merge "qcacld-3.0: Add support for OWE" into wlan-cld3.driver.lnx.2.0
This commit is contained in:

committato da
Gerrit - the friendly Code Review server

commit
cc66fdbbef
@@ -124,6 +124,9 @@ uint8_t ccp_rsn_oui_11[HDD_RSN_OUI_SIZE] = {0x00, 0x0F, 0xAC, 0x11};
|
||||
#endif
|
||||
uint8_t ccp_rsn_oui_12[HDD_RSN_OUI_SIZE] = {0x50, 0x6F, 0x9A, 0x02};
|
||||
|
||||
/* OWE https://tools.ietf.org/html/rfc8110 */
|
||||
uint8_t ccp_rsn_oui_18[HDD_RSN_OUI_SIZE] = {0x00, 0x0F, 0xAC, 0x12};
|
||||
|
||||
/* Offset where the EID-Len-IE, start. */
|
||||
#define FT_ASSOC_RSP_IES_OFFSET 6 /* Capability(2) + AID(2) + Status Code(2) */
|
||||
#define FT_ASSOC_REQ_IES_OFFSET 4 /* Capability(2) + LI(2) */
|
||||
@@ -4792,6 +4795,8 @@ eCsrAuthType hdd_translate_rsn_to_csr_auth_type(uint8_t auth_suite[4])
|
||||
auth_type = eCSR_AUTH_TYPE_RSN_PSK_SHA256;
|
||||
} else if (memcmp(auth_suite, ccp_rsn_oui08, 4) == 0) {
|
||||
auth_type = eCSR_AUTH_TYPE_RSN_8021X_SHA256;
|
||||
} else if (memcmp(auth_suite, ccp_rsn_oui_18, 4) == 0) {
|
||||
auth_type = eCSR_AUTH_TYPE_OWE;
|
||||
} else
|
||||
#endif
|
||||
if (memcmp(auth_suite, ccp_rsn_oui_12, 4) == 0) {
|
||||
@@ -5160,8 +5165,9 @@ int hdd_set_csr_auth_type(struct hdd_adapter *adapter,
|
||||
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
|
||||
roam_profile->AuthType.numEntries = 1;
|
||||
hdd_debug("sta_ctx->conn_info.authType = %d",
|
||||
sta_ctx->conn_info.authType);
|
||||
hdd_debug("authType = %d RSNAuthType %d wpa_versions %d",
|
||||
sta_ctx->conn_info.authType, RSNAuthType,
|
||||
sta_ctx->wpa_versions);
|
||||
|
||||
switch (sta_ctx->conn_info.authType) {
|
||||
case eCSR_AUTH_TYPE_OPEN_SYSTEM:
|
||||
@@ -5252,6 +5258,13 @@ int hdd_set_csr_auth_type(struct hdd_adapter *adapter,
|
||||
hdd_debug("updated profile authtype as %d",
|
||||
RSNAuthType);
|
||||
|
||||
} else if ((RSNAuthType == eCSR_AUTH_TYPE_OWE) &&
|
||||
((pWextState->
|
||||
authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
|
||||
== IW_AUTH_KEY_MGMT_802_1X)) {
|
||||
/* OWE case */
|
||||
roam_profile->AuthType.authType[0] =
|
||||
eCSR_AUTH_TYPE_OWE;
|
||||
} else if ((pWextState->
|
||||
authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
|
||||
== IW_AUTH_KEY_MGMT_802_1X) {
|
||||
|
@@ -16445,6 +16445,12 @@ static int wlan_hdd_set_akm_suite(struct hdd_adapter *adapter, u32 key_mgmt)
|
||||
eCSR_AUTH_TYPE_FT_FILS_SHA384;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case WLAN_AKM_SUITE_OWE:
|
||||
hdd_debug("setting key mgmt type to OWE");
|
||||
pWextState->authKeyMgmt |= IW_AUTH_KEY_MGMT_802_1X;
|
||||
break;
|
||||
|
||||
default:
|
||||
hdd_err("Unsupported key mgmt type: %d", key_mgmt);
|
||||
return -EINVAL;
|
||||
@@ -16936,6 +16942,15 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
||||
eLen + 2);
|
||||
if (status)
|
||||
return status;
|
||||
} else if (genie[0] ==
|
||||
SIR_DH_PARAMETER_ELEMENT_EXT_EID) {
|
||||
hdd_debug("Set DH EXT IE(len %d)",
|
||||
eLen + 2);
|
||||
status = wlan_hdd_add_assoc_ie(
|
||||
pWextState, genie - 2,
|
||||
eLen + 2);
|
||||
if (status)
|
||||
return status;
|
||||
} else {
|
||||
hdd_err("UNKNOWN EID: %X", genie[0]);
|
||||
}
|
||||
|
@@ -114,6 +114,8 @@ struct hdd_context;
|
||||
#define WLAN_AKM_SUITE_DPP_RSN 0x506f9a02
|
||||
#endif
|
||||
|
||||
#define WLAN_AKM_SUITE_OWE 0x000FAC12
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
#define WLAN_IS_TDLS_SETUP_ACTION(action) \
|
||||
((SIR_MAC_TDLS_SETUP_REQ <= action) && \
|
||||
|
@@ -75,6 +75,7 @@ typedef enum eAniAuthType {
|
||||
SIR_FILS_SK_WITHOUT_PFS = 4,
|
||||
SIR_FILS_SK_WITH_PFS = 5,
|
||||
SIR_FILS_PK_AUTH = 6,
|
||||
eSIR_AUTH_TYPE_OWE,
|
||||
eSIR_DONOT_USE_AUTH_TYPE = SIR_MAX_ENUM_SIZE
|
||||
} tAniAuthType;
|
||||
|
||||
|
@@ -451,6 +451,9 @@
|
||||
|
||||
#define SIR_MAC_OUI_VERSION_1 1
|
||||
|
||||
/* OWE DH Parameter element https://tools.ietf.org/html/rfc8110 */
|
||||
#define SIR_DH_PARAMETER_ELEMENT_EXT_EID 32
|
||||
|
||||
/* OUI and type definition for WPA IE in network byte order */
|
||||
#define SIR_MAC_WPA_OUI 0x01F25000
|
||||
#define SIR_MAC_WME_OUI 0x02F25000
|
||||
|
@@ -70,6 +70,7 @@ typedef enum {
|
||||
eCSR_AUTH_TYPE_FT_FILS_SHA256,
|
||||
eCSR_AUTH_TYPE_FT_FILS_SHA384,
|
||||
eCSR_AUTH_TYPE_DPP_RSN,
|
||||
eCSR_AUTH_TYPE_OWE,
|
||||
eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
|
||||
eCSR_AUTH_TYPE_FAILED = 0xff,
|
||||
eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
|
||||
|
@@ -4297,8 +4297,9 @@ QDF_STATUS csr_roam_prepare_bss_config(tpAniSirGlobal pMac,
|
||||
pBssConfig->uCfgDot11Mode = eCSR_CFG_DOT11_MODE_11A;
|
||||
}
|
||||
|
||||
sme_debug("phyMode=%d, uCfgDot11Mode=%d",
|
||||
pProfile->phyMode, pBssConfig->uCfgDot11Mode);
|
||||
sme_debug("phyMode=%d, uCfgDot11Mode=%d negotiatedAuthType %d",
|
||||
pProfile->phyMode, pBssConfig->uCfgDot11Mode,
|
||||
pProfile->negotiatedAuthType);
|
||||
|
||||
/* Qos */
|
||||
if ((pBssConfig->uCfgDot11Mode != eCSR_CFG_DOT11_MODE_11N) &&
|
||||
|
@@ -5028,6 +5028,8 @@ static enum wlan_auth_type csr_covert_auth_type_new(eCsrAuthType auth)
|
||||
return WLAN_AUTH_TYPE_FT_FILS_SHA384;
|
||||
case eCSR_AUTH_TYPE_DPP_RSN:
|
||||
return WLAN_AUTH_TYPE_DPP_RSN;
|
||||
case eCSR_AUTH_TYPE_OWE:
|
||||
return WLAN_AUTH_TYPE_OWE;
|
||||
case eCSR_NUM_OF_SUPPORT_AUTH_TYPE:
|
||||
default:
|
||||
return WLAN_AUTH_TYPE_OPEN_SYSTEM;
|
||||
@@ -5079,6 +5081,8 @@ static eCsrAuthType csr_covert_auth_type_old(enum wlan_auth_type auth)
|
||||
return eCSR_AUTH_TYPE_FT_FILS_SHA384;
|
||||
case WLAN_AUTH_TYPE_DPP_RSN:
|
||||
return eCSR_AUTH_TYPE_DPP_RSN;
|
||||
case WLAN_AUTH_TYPE_OWE:
|
||||
return eCSR_AUTH_TYPE_OWE;
|
||||
case WLAN_NUM_OF_SUPPORT_AUTH_TYPE:
|
||||
default:
|
||||
return eCSR_AUTH_TYPE_OPEN_SYSTEM;
|
||||
|
@@ -116,6 +116,9 @@ uint8_t csr_rsn_oui[][CSR_RSN_OUI_SIZE] = {
|
||||
#define ENUM_DPP_RSN 15
|
||||
/* DPP RSN */
|
||||
{0x50, 0x6F, 0x9A, 0x02},
|
||||
#define ENUM_OWE 16
|
||||
/* OWE https://tools.ietf.org/html/rfc8110 */
|
||||
{0x00, 0x0F, 0xAC, 0x12},
|
||||
/* define new oui here, update #define CSR_OUI_***_INDEX */
|
||||
};
|
||||
|
||||
@@ -2425,6 +2428,10 @@ bool csr_is_profile_rsn(tCsrRoamProfile *pProfile)
|
||||
fRSNProfile = true;
|
||||
break;
|
||||
|
||||
case eCSR_AUTH_TYPE_OWE:
|
||||
fRSNProfile = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
fRSNProfile = false;
|
||||
break;
|
||||
@@ -3202,6 +3209,23 @@ static bool csr_is_auth_dpp_rsn(tpAniSirGlobal mac,
|
||||
csr_rsn_oui[ENUM_DPP_RSN], oui);
|
||||
}
|
||||
|
||||
/*
|
||||
* csr_is_auth_wpa_owe() - check whether oui is OWE
|
||||
* @mac: Global MAC context
|
||||
* @all_suites: pointer to all supported akm suites
|
||||
* @suite_count: all supported akm suites count
|
||||
* @oui: Oui needs to be matched
|
||||
*
|
||||
* Return: True if OUI is SAE, false otherwise
|
||||
*/
|
||||
static bool csr_is_auth_wpa_owe(tpAniSirGlobal mac,
|
||||
uint8_t all_suites[][CSR_RSN_OUI_SIZE],
|
||||
uint8_t suite_count, uint8_t oui[])
|
||||
{
|
||||
return csr_is_oui_match
|
||||
(mac, all_suites, suite_count, csr_rsn_oui[ENUM_OWE], oui);
|
||||
}
|
||||
|
||||
static bool csr_is_auth_wpa(tpAniSirGlobal pMac,
|
||||
uint8_t AllSuites[][CSR_WPA_OUI_SIZE],
|
||||
uint8_t cAllSuites, uint8_t Oui[])
|
||||
@@ -3462,6 +3486,12 @@ static bool csr_get_rsn_information(tHalHandle hal, tCsrAuthList *auth_type,
|
||||
neg_authtype = eCSR_AUTH_TYPE_RSN_8021X_SHA256;
|
||||
}
|
||||
#endif
|
||||
if ((neg_authtype == eCSR_AUTH_TYPE_UNKNOWN) &&
|
||||
csr_is_auth_wpa_owe(mac_ctx, authsuites,
|
||||
c_auth_suites, authentication)) {
|
||||
if (eCSR_AUTH_TYPE_OWE == auth_type->authType[i])
|
||||
neg_authtype = eCSR_AUTH_TYPE_OWE;
|
||||
}
|
||||
|
||||
/*
|
||||
* The 1st auth type in the APs RSN IE, to match stations
|
||||
|
Fai riferimento in un nuovo problema
Block a user