From f04daafe7647d87ff38586a4dc3e15c81a55ade1 Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Thu, 6 Sep 2018 19:15:16 +0530 Subject: [PATCH] qcacld-3.0: Reset 11i parameters in RSO command PMK caching and OKC is valid only in non CCKM roaming scenarios. If these parameters passed to FW in CCKM case then device may add the PMKID in reassoc request frames which is not expected. So reset 11i parameters in RSO command if the authentication type is CCKM. Change-Id: I32bdb288e7fa557f133b7f311f51d85d57ff659b CRs-Fixed: 2306038 --- core/sme/src/csr/csr_api_roam.c | 45 +++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 3adc1cb8d694..2de484d30949 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -18200,6 +18200,40 @@ QDF_STATUS csr_roam_set_key_mgmt_offload(tpAniSirGlobal mac_ctx, return QDF_STATUS_SUCCESS; } +/** + * csr_update_roam_scan_ese_params() - Update ESE related params in RSO request + * @req_buf: Roam Scan Offload Request buffer + * @session: Current Roam Session + * + * This API will set the KRK and BTK required in case of Auth Type is CCKM. + * It will also clear the PMK Len as CCKM PMK Caching is not supported + * + * Return: None + */ +#ifdef FEATURE_WLAN_ESE +static +void csr_update_roam_scan_ese_params(tSirRoamOffloadScanReq *req_buf, + struct csr_roam_session *session) +{ + if (csr_is_auth_type_ese(req_buf->ConnectedNetwork.authentication)) { + qdf_mem_copy(req_buf->KRK, session->eseCckmInfo.krk, + SIR_KRK_KEY_LEN); + qdf_mem_copy(req_buf->BTK, session->eseCckmInfo.btk, + SIR_BTK_KEY_LEN); + req_buf->pmkid_modes.fw_okc = 0; + req_buf->pmkid_modes.fw_pmksa_cache = 0; + req_buf->pmk_len = 0; + qdf_mem_zero(&req_buf->PSK_PMK[0], sizeof(req_buf->PSK_PMK)); + } +} +#else +static inline +void csr_update_roam_scan_ese_params(tSirRoamOffloadScanReq *req_buf, + struct csr_roam_session *session) +{ +} +#endif + /** * csr_update_roam_scan_offload_request() - updates req msg with roam offload * parameters @@ -18240,14 +18274,9 @@ csr_update_roam_scan_offload_request(tpAniSirGlobal mac_ctx, req_buf->ReassocFailureTimeout = DEFAULT_REASSOC_FAILURE_TIMEOUT; } -#ifdef FEATURE_WLAN_ESE - if (csr_is_auth_type_ese(req_buf->ConnectedNetwork.authentication)) { - qdf_mem_copy(req_buf->KRK, session->eseCckmInfo.krk, - SIR_KRK_KEY_LEN); - qdf_mem_copy(req_buf->BTK, session->eseCckmInfo.btk, - SIR_BTK_KEY_LEN); - } -#endif + + csr_update_roam_scan_ese_params(req_buf, session); + req_buf->AcUapsd.acbe_uapsd = SIR_UAPSD_GET(ACBE, session->uapsd_mask); req_buf->AcUapsd.acbk_uapsd = SIR_UAPSD_GET(ACBK, session->uapsd_mask); req_buf->AcUapsd.acvi_uapsd = SIR_UAPSD_GET(ACVI, session->uapsd_mask);