diff options
| author | Leela Venkata Kiran Kumar Reddy Chirala <kchirala@qca.qualcomm.com> | 2014-09-10 23:14:01 -0700 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2014-09-16 11:09:00 +0530 |
| commit | d80fcece5459aa8dbfaeaa8112686a8d304c5191 (patch) | |
| tree | 3cf48dcf53ec03354c71ef42a42d50ad5d386423 | |
| parent | 4dd459e4de0280b896b0a3d69df293a054c39445 (diff) | |
WLAN:Add missing support for SHA256 akm suites
In the current host driver support for wpa-psk-sha256 is present
this gerrit adds support for wpa-8021x-sha256
Change-Id: I5b277ca4a535af2c32fa4caba43b1d3a7bb65142
CRs-fixed: 722913
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 11 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 6 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wext.c | 1 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 2 | ||||
| -rw-r--r-- | CORE/SME/inc/csrApi.h | 1 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 13 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrUtil.c | 19 |
7 files changed, 50 insertions, 3 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index 94f1a3487452..c50ce5a9942d 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -98,6 +98,8 @@ v_U8_t ccpRSNOui06[ HDD_RSN_OUI_SIZE ] = { 0x00, 0x40, 0x96, 0x00 }; // CCKM #endif /* FEATURE_WLAN_ESE */ #ifdef WLAN_FEATURE_11W v_U8_t ccpRSNOui07[ HDD_RSN_OUI_SIZE ] = { 0x00, 0x0F, 0xAC, 0x06 }; // RSN-PSK-SHA256 +/* RSN-8021X-SHA256 */ +v_U8_t ccpRSNOui08[ HDD_RSN_OUI_SIZE ] = { 0x00, 0x0F, 0xAC, 0x05 }; #endif #if defined(WLAN_FEATURE_VOWIFI_11R) @@ -3424,6 +3426,10 @@ eCsrAuthType hdd_TranslateRSNToCsrAuthType( u_int8_t auth_suite[4]) { auth_type = eCSR_AUTH_TYPE_RSN_PSK_SHA256; } else + if (memcmp(auth_suite , ccpRSNOui08, 4) == 0) + { + auth_type = eCSR_AUTH_TYPE_RSN_8021X_SHA256; + } else #endif { auth_type = eCSR_AUTH_TYPE_UNKNOWN; @@ -3824,6 +3830,10 @@ int hdd_set_csr_auth_type ( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType) if (RSNAuthType == eCSR_AUTH_TYPE_RSN_PSK_SHA256) { pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_RSN_PSK_SHA256; } else + if (RSNAuthType == eCSR_AUTH_TYPE_RSN_8021X_SHA256) { + pRoamProfile->AuthType.authType[0] = + eCSR_AUTH_TYPE_RSN_8021X_SHA256; + } else #endif if( (pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X) @@ -4360,6 +4370,7 @@ int iw_get_auth(struct net_device *dev,struct iw_request_info *info, case eCSR_AUTH_TYPE_RSN_PSK: #ifdef WLAN_FEATURE_11W case eCSR_AUTH_TYPE_RSN_PSK_SHA256: + case eCSR_AUTH_TYPE_RSN_8021X_SHA256: #endif hddLog(LOG1,"%s called with RSN PSK auth type", __func__); wrqu->param.value = IW_AUTH_ALG_OPEN_SYSTEM; diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index fc5c58e84d18..8dee6a9d7057 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -9064,11 +9064,14 @@ static int wlan_hdd_set_akm_suite( hdd_adapter_t *pAdapter, { hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter); ENTER(); - + /* Should be in ieee802_11_defs.h */ +#define WLAN_AKM_SUITE_8021X_SHA256 0x000FAC05 +#define WLAN_AKM_SUITE_PSK_SHA256 0x000FAC06 /*set key mgmt type*/ switch(key_mgmt) { case WLAN_AKM_SUITE_PSK: + case WLAN_AKM_SUITE_PSK_SHA256: #ifdef WLAN_FEATURE_VOWIFI_11R case WLAN_AKM_SUITE_FT_PSK: #endif @@ -9077,6 +9080,7 @@ static int wlan_hdd_set_akm_suite( hdd_adapter_t *pAdapter, pWextState->authKeyMgmt |= IW_AUTH_KEY_MGMT_PSK; break; + case WLAN_AKM_SUITE_8021X_SHA256: case WLAN_AKM_SUITE_8021X: #ifdef WLAN_FEATURE_VOWIFI_11R case WLAN_AKM_SUITE_FT_8021X: diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index 113d4a822623..c6f2ecfd14d5 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -849,6 +849,7 @@ hdd_IsAuthTypeRSN( tHalHandle halHandle, eCsrAuthType authType) case eCSR_AUTH_TYPE_RSN_PSK: #ifdef WLAN_FEATURE_11W case eCSR_AUTH_TYPE_RSN_PSK_SHA256: + case eCSR_AUTH_TYPE_RSN_8021X_SHA256: #endif rsnType = eANI_BOOLEAN_TRUE; break; diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 5b9cc933f1da..bb460364611d 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -8004,6 +8004,8 @@ A_UINT32 eCsrAuthType_to_rsn_authmode (eCsrAuthType authtype, eCsrEncryptionType #ifdef WLAN_FEATURE_11W case eCSR_AUTH_TYPE_RSN_PSK_SHA256: return (WMI_AUTH_RSNA_PSK_SHA256); + case eCSR_AUTH_TYPE_RSN_8021X_SHA256: + return (WMI_AUTH_RSNA_8021X_SHA256); #endif case eCSR_AUTH_TYPE_NONE: case eCSR_AUTH_TYPE_AUTOSWITCH: diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h index a33a8456c0d0..710551db611b 100644 --- a/CORE/SME/inc/csrApi.h +++ b/CORE/SME/inc/csrApi.h @@ -68,6 +68,7 @@ typedef enum #endif /* FEATURE_WLAN_ESE */ #ifdef WLAN_FEATURE_11W eCSR_AUTH_TYPE_RSN_PSK_SHA256, + eCSR_AUTH_TYPE_RSN_8021X_SHA256, #endif eCSR_NUM_OF_SUPPORT_AUTH_TYPE, eCSR_AUTH_TYPE_FAILED = 0xff, diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index b926c887b24b..6a55d36186e2 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -125,6 +125,9 @@ int diagAuthTypeFromCSRType(eCsrAuthType authType) n = AUTH_WPA_PSK; break; case eCSR_AUTH_TYPE_RSN: +#ifdef WLAN_FEATURE_11W + case eCSR_AUTH_TYPE_RSN_8021X_SHA256: +#endif n = AUTH_WPA2_EAP; break; case eCSR_AUTH_TYPE_RSN_PSK: @@ -5156,7 +5159,8 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session #endif /* FEATURE_WLAN_WAPI */ #ifdef WLAN_FEATURE_11W || - (eCSR_AUTH_TYPE_RSN_PSK_SHA256 == authType) + (eCSR_AUTH_TYPE_RSN_PSK_SHA256 == authType) || + (eCSR_AUTH_TYPE_RSN_8021X_SHA256 == authType) #endif /* FEATURE_WLAN_WAPI */ ) { @@ -5175,6 +5179,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session #endif /* WLAN_FEATURE_VOWIFI_11R */ #if defined WLAN_FEATURE_11W (eCSR_AUTH_TYPE_RSN_PSK_SHA256 == authType) || + (eCSR_AUTH_TYPE_RSN_8021X_SHA256 == authType) || #endif (eCSR_AUTH_TYPE_RSN_PSK == authType)) { @@ -7735,6 +7740,8 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN) #ifdef WLAN_FEATURE_11W || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN_PSK_SHA256) + || (pProfile->negotiatedAuthType == + eCSR_AUTH_TYPE_RSN_8021X_SHA256) #endif || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN_PSK)))) && (pMac->roam.configParam.isEseIniFeatureEnabled)) @@ -13666,6 +13673,8 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN) #ifdef WLAN_FEATURE_11W || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN_PSK_SHA256) + || (pProfile->negotiatedAuthType == + eCSR_AUTH_TYPE_RSN_8021X_SHA256) #endif || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN_PSK)))) && (pMac->roam.configParam.isEseIniFeatureEnabled)) @@ -13702,6 +13711,8 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN) #ifdef WLAN_FEATURE_11W || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN_PSK_SHA256) + || (pProfile->negotiatedAuthType == + eCSR_AUTH_TYPE_RSN_8021X_SHA256) #endif || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN_PSK)))) && (pMac->roam.configParam.isEseIniFeatureEnabled)) diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c index 39206e0f6566..4072c08a0eb2 100644 --- a/CORE/SME/src/csr/csrUtil.c +++ b/CORE/SME/src/csr/csrUtil.c @@ -69,7 +69,9 @@ tANI_U8 csrRSNOui[][ CSR_RSN_OUI_SIZE ] = { { 0x00, 0x0F, 0xAC, 0x04 }, // AES-CCMP { 0x00, 0x0F, 0xAC, 0x05 }, // WEP-104 { 0x00, 0x40, 0x96, 0x00 }, // CCKM - { 0x00, 0x0F, 0xAC, 0x06 } // BIP (encryption type) or RSN-PSK-SHA256 (authentication type) + { 0x00, 0x0F, 0xAC, 0x06 }, // BIP (encryption type) or RSN-PSK-SHA256 (authentication type) + /* RSN-8021X-SHA256 (authentication type) */ + { 0x00, 0x0F, 0xAC, 0x05 } }; #ifdef FEATURE_WLAN_WAPI @@ -2125,6 +2127,7 @@ tANI_BOOLEAN csrIsProfileRSN( tCsrRoamProfile *pProfile ) #endif #ifdef WLAN_FEATURE_11W case eCSR_AUTH_TYPE_RSN_PSK_SHA256: + case eCSR_AUTH_TYPE_RSN_8021X_SHA256: #endif fRSNProfile = TRUE; break; @@ -2790,6 +2793,13 @@ static tANI_BOOLEAN csrIsAuthRSNPskSha256( tpAniSirGlobal pMac, tANI_U8 AllSuite { return csrIsOuiMatch( pMac, AllSuites, cAllSuites, csrRSNOui[07], Oui ); } +static tANI_BOOLEAN csrIsAuthRSN8021xSha256(tpAniSirGlobal pMac, + tANI_U8 AllSuites[][CSR_RSN_OUI_SIZE], + tANI_U8 cAllSuites, + tANI_U8 Oui[] ) +{ + return csrIsOuiMatch( pMac, AllSuites, cAllSuites, csrRSNOui[8], Oui ); +} #endif static tANI_BOOLEAN csrIsAuthWpa( tpAniSirGlobal pMac, tANI_U8 AllSuites[][CSR_WPA_OUI_SIZE], @@ -2941,6 +2951,13 @@ tANI_BOOLEAN csrGetRSNInformation( tHalHandle hHal, tCsrAuthList *pAuthType, eCs if (eCSR_AUTH_TYPE_RSN_PSK_SHA256 == pAuthType->authType[i]) negAuthType = eCSR_AUTH_TYPE_RSN_PSK_SHA256; } + if ((negAuthType == eCSR_AUTH_TYPE_UNKNOWN) && + csrIsAuthRSN8021xSha256(pMac, AuthSuites, + cAuthSuites, Authentication)) { + if (eCSR_AUTH_TYPE_RSN_8021X_SHA256 == + pAuthType->authType[i]) + negAuthType = eCSR_AUTH_TYPE_RSN_8021X_SHA256; + } #endif // The 1st auth type in the APs RSN IE, to match stations connecting |
