mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Changes to support DPP AKM
Add changes to support and parse AKM required for DPP. Change-Id: Ie38a6b78e94d3cd918c02c7314bcb5696f53db24 CRs-Fixed: 2137519
This commit is contained in:
parent
86dc221bd6
commit
02cb9e02f1
6 changed files with 44 additions and 2 deletions
|
|
@ -122,6 +122,7 @@ uint8_t ccp_rsn_oui_0f[HDD_RSN_OUI_SIZE] = {0x00, 0x0F, 0xAC, 0x0F};
|
|||
uint8_t ccp_rsn_oui_10[HDD_RSN_OUI_SIZE] = {0x00, 0x0F, 0xAC, 0x10};
|
||||
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};
|
||||
|
||||
/* Offset where the EID-Len-IE, start. */
|
||||
#define FT_ASSOC_RSP_IES_OFFSET 6 /* Capability(2) + AID(2) + Status Code(2) */
|
||||
|
|
@ -4796,6 +4797,9 @@ eCsrAuthType hdd_translate_rsn_to_csr_auth_type(uint8_t auth_suite[4])
|
|||
auth_type = eCSR_AUTH_TYPE_RSN_8021X_SHA256;
|
||||
} else
|
||||
#endif
|
||||
if (memcmp(auth_suite, ccp_rsn_oui_12, 4) == 0) {
|
||||
auth_type = eCSR_AUTH_TYPE_DPP_RSN;
|
||||
} else
|
||||
{
|
||||
hdd_translate_fils_rsn_to_csr_auth(auth_suite, &auth_type);
|
||||
}
|
||||
|
|
@ -5216,8 +5220,10 @@ int hdd_set_csr_auth_type(struct hdd_adapter *adapter,
|
|||
eCSR_AUTH_TYPE_CCKM_RSN;
|
||||
} else
|
||||
#endif
|
||||
|
||||
if ((RSNAuthType == eCSR_AUTH_TYPE_FT_RSN) &&
|
||||
if (RSNAuthType == eCSR_AUTH_TYPE_DPP_RSN) {
|
||||
roam_profile->AuthType.authType[0] =
|
||||
eCSR_AUTH_TYPE_DPP_RSN;
|
||||
} else if ((RSNAuthType == eCSR_AUTH_TYPE_FT_RSN) &&
|
||||
((pWextState->
|
||||
authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
|
||||
== IW_AUTH_KEY_MGMT_802_1X)) {
|
||||
|
|
|
|||
|
|
@ -16329,6 +16329,7 @@ static int wlan_hdd_set_akm_suite(struct hdd_adapter *adapter, u32 key_mgmt)
|
|||
case WLAN_AKM_SUITE_PSK:
|
||||
case WLAN_AKM_SUITE_PSK_SHA256:
|
||||
case WLAN_AKM_SUITE_FT_PSK:
|
||||
case WLAN_AKM_SUITE_DPP_RSN:
|
||||
hdd_debug("setting key mgmt type to PSK");
|
||||
pWextState->authKeyMgmt |= IW_AUTH_KEY_MGMT_PSK;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -110,6 +110,9 @@ struct hdd_context;
|
|||
#ifndef WLAN_AKM_SUITE_FT_FILS_SHA384
|
||||
#define WLAN_AKM_SUITE_FT_FILS_SHA384 0x000FAC11
|
||||
#endif
|
||||
#ifndef WLAN_AKM_SUITE_DPP_RSN
|
||||
#define WLAN_AKM_SUITE_DPP_RSN 0x506f9a02
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
#define WLAN_IS_TDLS_SETUP_ACTION(action) \
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ typedef enum {
|
|||
eCSR_AUTH_TYPE_FILS_SHA384,
|
||||
eCSR_AUTH_TYPE_FT_FILS_SHA256,
|
||||
eCSR_AUTH_TYPE_FT_FILS_SHA384,
|
||||
eCSR_AUTH_TYPE_DPP_RSN,
|
||||
eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
|
||||
eCSR_AUTH_TYPE_FAILED = 0xff,
|
||||
eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
|
||||
|
|
|
|||
|
|
@ -5031,6 +5031,8 @@ static enum wlan_auth_type csr_covert_auth_type_new(eCsrAuthType auth)
|
|||
return WLAN_AUTH_TYPE_FT_FILS_SHA256;
|
||||
case eCSR_AUTH_TYPE_FT_FILS_SHA384:
|
||||
return WLAN_AUTH_TYPE_FT_FILS_SHA384;
|
||||
case eCSR_AUTH_TYPE_DPP_RSN:
|
||||
return WLAN_AUTH_TYPE_DPP_RSN;
|
||||
case eCSR_NUM_OF_SUPPORT_AUTH_TYPE:
|
||||
default:
|
||||
return WLAN_AUTH_TYPE_OPEN_SYSTEM;
|
||||
|
|
@ -5080,6 +5082,8 @@ static eCsrAuthType csr_covert_auth_type_old(enum wlan_auth_type auth)
|
|||
return eCSR_AUTH_TYPE_FT_FILS_SHA256;
|
||||
case WLAN_AUTH_TYPE_FT_FILS_SHA384:
|
||||
return eCSR_AUTH_TYPE_FT_FILS_SHA384;
|
||||
case WLAN_AUTH_TYPE_DPP_RSN:
|
||||
return eCSR_AUTH_TYPE_DPP_RSN;
|
||||
case WLAN_NUM_OF_SUPPORT_AUTH_TYPE:
|
||||
default:
|
||||
return eCSR_AUTH_TYPE_OPEN_SYSTEM;
|
||||
|
|
|
|||
|
|
@ -113,6 +113,9 @@ uint8_t csr_rsn_oui[][CSR_RSN_OUI_SIZE] = {
|
|||
{0x00, 0x0F, 0xAC, 0x08},
|
||||
/* AES GCMP-256 */
|
||||
{0x00, 0x0F, 0xAC, 0x09},
|
||||
#define ENUM_DPP_RSN 15
|
||||
/* DPP RSN */
|
||||
{0x50, 0x6F, 0x9A, 0x02},
|
||||
/* define new oui here, update #define CSR_OUI_***_INDEX */
|
||||
};
|
||||
|
||||
|
|
@ -2418,6 +2421,7 @@ bool csr_is_profile_rsn(tCsrRoamProfile *pProfile)
|
|||
case eCSR_AUTH_TYPE_FILS_SHA384:
|
||||
case eCSR_AUTH_TYPE_FT_FILS_SHA256:
|
||||
case eCSR_AUTH_TYPE_FT_FILS_SHA384:
|
||||
case eCSR_AUTH_TYPE_DPP_RSN:
|
||||
fRSNProfile = true;
|
||||
break;
|
||||
|
||||
|
|
@ -3183,6 +3187,23 @@ static bool csr_is_auth_fils_ft_sha384(tpAniSirGlobal mac,
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* csr_is_auth_dpp_rsn() - check whether oui is dpp rsn
|
||||
* @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 dpp rsn, false otherwise
|
||||
*/
|
||||
static bool csr_is_auth_dpp_rsn(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_DPP_RSN], oui);
|
||||
}
|
||||
|
||||
static bool csr_is_auth_wpa(tpAniSirGlobal pMac,
|
||||
uint8_t AllSuites[][CSR_WPA_OUI_SIZE],
|
||||
uint8_t cAllSuites, uint8_t Oui[])
|
||||
|
|
@ -3387,6 +3408,12 @@ static bool csr_get_rsn_information(tHalHandle hal, tCsrAuthList *auth_type,
|
|||
csr_is_fils_auth(mac_ctx, authsuites, c_auth_suites,
|
||||
authentication, auth_type, i, &neg_authtype);
|
||||
/* Changed the AKM suites according to order of preference */
|
||||
if ((neg_authtype == eCSR_AUTH_TYPE_UNKNOWN) &&
|
||||
csr_is_auth_dpp_rsn(mac_ctx, authsuites,
|
||||
c_auth_suites, authentication)) {
|
||||
if (eCSR_AUTH_TYPE_DPP_RSN == auth_type->authType[i])
|
||||
neg_authtype = eCSR_AUTH_TYPE_DPP_RSN;
|
||||
}
|
||||
if ((neg_authtype == eCSR_AUTH_TYPE_UNKNOWN) &&
|
||||
csr_is_ft_auth_rsn(mac_ctx, authsuites,
|
||||
c_auth_suites, authentication)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue