qcacld-3.0: Fix to update KRK/BTK for ESE connection

Currently driver updates KRK/BTK only during RSO start.
Supplicant can update these KRK/BTK during timeout. But
driver currently does not update KRK/BTK dynamically.
This can lead to MIC failure in firmware and cause
roaming failure. Update KRK/BTK as and when they are
received using RSO update to fix this issue.

Change-Id: Ib3ee656e63920d0162dea56eef7f052c585bb5a4
CRs-Fixed: 2149232
This commit is contained in:
Padma, Santhosh Kumar 2017-11-22 16:20:28 +05:30 • committed by snandini
commit 2d1f77c9a0
4 changed files with 24 additions and 7 deletions

View file

@ -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,

View file

@ -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

View file

@ -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);

View file

@ -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)
{