From 924a257d282b4beed1b79e2159a0971dac137ddf Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Tue, 27 Jul 2021 01:05:32 +0530 Subject: [PATCH] qcacld-3.0: Add additional debugs in PMKSA caching path Add additional debugs in pmksa caching path. Change-Id: I5e412c60c3455c1a40d6f742fb6536b9ac621748 CRs-Fixed: 2978751 --- components/wmi/src/wmi_unified_roam_tlv.c | 5 +++++ core/sme/src/csr/csr_api_roam.c | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/components/wmi/src/wmi_unified_roam_tlv.c b/components/wmi/src/wmi_unified_roam_tlv.c index 4bfc3838efb3..e3bba1efcdda 100644 --- a/components/wmi/src/wmi_unified_roam_tlv.c +++ b/components/wmi/src/wmi_unified_roam_tlv.c @@ -2161,6 +2161,11 @@ wmi_fill_rso_tlvs(wmi_unified_t wmi_handle, uint8_t *buf, roam_offload_11r->psk_msk_len, roam_offload_11r->psk_msk_ext_len, roam_offload_11r->mdid); + if (roam_offload_11r->psk_msk_len) + QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_WMI, + QDF_TRACE_LEVEL_DEBUG, + roam_offload_11r->psk_msk, + WLAN_MAX_PMK_DUMP_BYTES); } else { WMITLV_SET_HDR(buf, WMITLV_TAG_ARRAY_STRUC, sizeof(wmi_roam_11i_offload_tlv_param)); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 66cb0a785da3..94ce68c8cd61 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -14104,24 +14104,26 @@ void csr_update_pmk_cache_ft(struct mac_context *mac, uint32_t vdev_id, pmksa.mdid.mdie_present = 1; pmksa.mdid.mobility_domain = session->connectedProfile.mdid.mobility_domain; - sme_debug("copied the MDID from session to PMKSA"); + sme_debug("Session MDID:0x%x copied to PMKSA", + pmksa.mdid.mobility_domain); qdf_copy_macaddr(&pmksa.bssid, &session->connectedProfile.bssid); status = wlan_crypto_update_pmk_cache_ft(vdev, &pmksa); - if (status == QDF_STATUS_SUCCESS) - sme_debug("Updated the crypto cache table"); + if (QDF_IS_STATUS_ERROR(status)) + sme_debug("Failed to update the crypto table"); } else if (scan_res && scan_res->BssDescriptor.mdiePresent) { pmksa.mdid.mdie_present = 1; pmksa.mdid.mobility_domain = (scan_res->BssDescriptor.mdie[0] | (scan_res->BssDescriptor.mdie[1] << 8)); - sme_debug("copied the MDID from scan_res to PMKSA"); + sme_debug("Scan_res MDID:0x%x copied to PMKSA", + pmksa.mdid.mobility_domain); qdf_copy_macaddr(&pmksa.bssid, &pmk_cache->BSSID); status = wlan_crypto_update_pmk_cache_ft(vdev, &pmksa); - if (status == QDF_STATUS_SUCCESS) - sme_debug("Updated the crypto cache table"); + if (QDF_IS_STATUS_ERROR(status)) + sme_debug("Failed to update the crypto table"); } wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);