qcacld-3.0: Free the memory for radio stats in case of timeout
Currently host driver does not free the memory for radio stats if there is a timeout which may lead to unexpected behavior. For example if there are multiple radio stats events from fw and if it receives only one event and does not receives next events in that case host allocates the memory for the channels received in the first event and does not free this memory in wma as it expects remaining events, since remaining events will not come host gets timeout in hdd and memory in wma is not freed. when host issues next command for the ll_stats it receives the response for this command and as memory is already allocated for channel stats for the previous event it combines this new response with the old response which results in unexpected response to the userspace. To address above issue, add mem free logic to free the memory for channel stats at wma. Change-Id: I6735f8c282c4205c11548aabe3c8e269e81e4e54 CRs-Fixed: 2813478
This commit is contained in:

committed by
snandini

parent
25b60aee58
commit
e21710a4f2
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user