mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 13:09:04 -04:00
qcacld-3.0: cdp: Convergence of cdp_mob_stats_ops
Currently the cdp apis are given pdev/vdev/peer handle as its arguments, which is directly accessed in those APIs. This can cause a race-condition in access of the respective handles if it has been deleted in parallel. Hence as a part of cdp convergence, pass only the pdev/vdev id or peer mac address, which will be used to get the respective handles, and hence avoiding the unwanted access of the handles if it has been deleted. Converged mob_stats_ops - clear_stats CRs-Fixed: 2539747 Change-Id: I5ee060b62d15380df4b8d15bb5709d700902aafd
This commit is contained in:
parent
84714471df
commit
4981a8f790
3 changed files with 11 additions and 5 deletions
|
|
@ -4533,17 +4533,18 @@ ol_txrx_display_stats(void *soc, uint16_t value,
|
|||
/**
|
||||
* ol_txrx_clear_stats() - Clear OL TXRX stats
|
||||
* @soc - ol soc handle
|
||||
* @pdev_id: pdev identifier
|
||||
* @value - Module id for which stats needs to be cleared
|
||||
*
|
||||
* Return: 0 - success/ non-zero failure
|
||||
*/
|
||||
static QDF_STATUS ol_txrx_clear_stats(struct cdp_soc *soc,
|
||||
uint8_t value)
|
||||
static QDF_STATUS ol_txrx_clear_stats(struct cdp_soc_t *soc_hdl,
|
||||
uint8_t pdev_id, uint8_t value)
|
||||
{
|
||||
ol_txrx_pdev_handle pdev;
|
||||
struct ol_txrx_soc_t *soc = cdp_soc_t_to_ol_txrx_soc_t(soc_hdl);
|
||||
ol_txrx_pdev_handle pdev = ol_txrx_get_pdev_from_pdev_id(soc, pdev_id);
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
if (!pdev) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: pdev is NULL", __func__);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#endif
|
||||
#include "wlan_hdd_power.h"
|
||||
#include "wlan_policy_mgr_ucfg.h"
|
||||
#include <ol_defines.h>
|
||||
#include <cdp_txrx_stats.h>
|
||||
#include "wlan_dfs_utils_api.h"
|
||||
#include <wlan_ipa_ucfg_api.h>
|
||||
|
|
@ -957,7 +958,8 @@ static __iw_softap_setparam(struct net_device *dev,
|
|||
break;
|
||||
default:
|
||||
if (soc)
|
||||
cdp_clear_stats(soc, set_value);
|
||||
cdp_clear_stats(soc, OL_TXRX_PDEV_ID,
|
||||
set_value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@
|
|||
#include "dbglog_host.h"
|
||||
#include "wma.h"
|
||||
|
||||
#include <ol_defines.h>
|
||||
|
||||
#include "wlan_hdd_power.h"
|
||||
#include "qwlan_version.h"
|
||||
#include "wlan_hdd_host_offload.h"
|
||||
|
|
@ -4811,6 +4813,7 @@ static int hdd_we_clear_stats(struct hdd_adapter *adapter, int option)
|
|||
break;
|
||||
default:
|
||||
status = cdp_clear_stats(cds_get_context(QDF_MODULE_ID_SOC),
|
||||
OL_TXRX_PDEV_ID,
|
||||
option);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
hdd_debug("Failed to dump stats for option: %d",
|
||||
|
|
|
|||
Loading…
Reference in a new issue