diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 0ea6838ae5..1971888f22 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -1923,6 +1923,7 @@ static int wlan_hdd_send_ll_stats_req(struct hdd_adapter *adapter, if (ret) { hdd_err("Target response timed out request id %d request bitmap 0x%x", priv->request_id, priv->request_bitmap); + sme_radio_tx_mem_free(); qdf_spin_lock(&priv->ll_stats_lock); priv->request_bitmap = 0; qdf_spin_unlock(&priv->ll_stats_lock); diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index f8d725beba..b048b259bd 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1636,6 +1636,13 @@ QDF_STATUS sme_ll_stats_get_req(mac_handle_t mac_handle, tSirLLStatsGetReq *get_stats_req, void *context); +/** + * sme_radio_tx_mem_free() - SME API to free the ll_stats memory + * + * Return: None + */ +void sme_radio_tx_mem_free(void); + /** * sme_set_link_layer_stats_ind_cb() - * SME API to trigger the stats are available after get request diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 5a471df727..47f00d3112 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -10229,6 +10229,19 @@ QDF_STATUS sme_set_wisa_params(mac_handle_t mac_handle, #ifdef WLAN_FEATURE_LINK_LAYER_STATS +void sme_radio_tx_mem_free(void) +{ + tp_wma_handle wma_handle; + + wma_handle = cds_get_context(QDF_MODULE_ID_WMA); + + if (!wma_handle) { + sme_err("Invalid wma handle"); + return; + } + wma_unified_radio_tx_mem_free(wma_handle); +} + /* * sme_ll_stats_clear_req() - * SME API to clear Link Layer Statistics