diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 0ad8a20dcfc7..d12b89f25ce4 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -88,12 +88,10 @@ typedef enum { /* WAPI */ eCSR_ENCRYPT_TYPE_WPI, #endif /* FEATURE_WLAN_WAPI */ -#ifdef FEATURE_WLAN_ESE eCSR_ENCRYPT_TYPE_KRK, #ifdef WLAN_FEATURE_ROAM_OFFLOAD eCSR_ENCRYPT_TYPE_BTK, #endif -#endif /* FEATURE_WLAN_ESE */ #ifdef WLAN_FEATURE_11W /* 11w BIP */ eCSR_ENCRYPT_TYPE_AES_CMAC, diff --git a/core/sme/inc/csr_support.h b/core/sme/inc/csr_support.h index 7fd901b2a9c5..bb7925932f63 100644 --- a/core/sme/inc/csr_support.h +++ b/core/sme/inc/csr_support.h @@ -369,8 +369,15 @@ QDF_STATUS csr_validate_mcc_beacon_interval(tpAniSirGlobal pMac, uint8_t channel bool csr_is_profile11r(tCsrRoamProfile *pProfile); bool csr_is_auth_type11r(eCsrAuthType AuthType, uint8_t mdiePresent); #ifdef FEATURE_WLAN_ESE -bool csr_is_auth_type_ese(eCsrAuthType AuthType); bool csr_is_profile_ese(tCsrRoamProfile *pProfile); #endif +/** + * csr_is_auth_type_ese() - Checks whether Auth type is ESE or not + * @AuthType: Authentication type + * + * Return: true, if auth type is ese, false otherwise + */ +bool csr_is_auth_type_ese(eCsrAuthType AuthType); + #endif diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index d5d99b79354e..2f6a1ab68f4b 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -10522,6 +10522,13 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, struct csr_roam_session *session, } qdf_mem_copy(session->eseCckmInfo.btk, set_key->Key, SIR_BTK_KEY_LEN); + /* + * KRK and BTK are updated by upper layer back to back. Send + * updated KRK and BTK together to FW here. + */ + csr_roam_offload_scan(mac_ctx, session->sessionId, + ROAM_SCAN_OFFLOAD_UPDATE_CFG, + REASON_ROAM_PSK_PMK_CHANGED); break; #endif #endif /* FEATURE_WLAN_ESE */ @@ -14031,6 +14038,13 @@ QDF_STATUS csr_roam_set_psk_pmk(tpAniSirGlobal pMac, uint32_t sessionId, } qdf_mem_copy(pSession->psk_pmk, pPSK_PMK, sizeof(pSession->psk_pmk)); pSession->pmk_len = pmk_len; + + if (csr_is_auth_type_ese(pMac->roam.roamSession[sessionId]. + connectedProfile.AuthType)) { + sme_debug("PMK update is not required for ESE"); + return QDF_STATUS_SUCCESS; + } + csr_roam_offload_scan(pMac, sessionId, ROAM_SCAN_OFFLOAD_UPDATE_CFG, REASON_ROAM_PSK_PMK_CHANGED); diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 60c0f8db547c..d086c801b07c 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -2872,10 +2872,6 @@ bool csr_is_profile11r(tCsrRoamProfile *pProfile) pProfile->MDID.mdiePresent); } - -#ifdef FEATURE_WLAN_ESE - -/* Function to return true if the authtype is ESE */ bool csr_is_auth_type_ese(eCsrAuthType AuthType) { switch (AuthType) { @@ -2888,6 +2884,8 @@ bool csr_is_auth_type_ese(eCsrAuthType AuthType) return false; } +#ifdef FEATURE_WLAN_ESE + /* Function to return true if the profile is ESE */ bool csr_is_profile_ese(tCsrRoamProfile *pProfile) {