qcacmn: 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: 2539824
Change-Id: Id424b939c8ef77bd9fae55eaa4c08023efc32093
This commit is contained in:
Rakesh Pillai
2019-07-09 14:37:28 +05:30
committed by nshrivas
parent 5396b88e32
commit 2b88f071f9
3 changed files with 10 additions and 11 deletions

View File

@@ -26,7 +26,7 @@
#include <cdp_txrx_ops.h>
static inline QDF_STATUS
cdp_clear_stats(ol_txrx_soc_handle soc, uint8_t bitmap)
cdp_clear_stats(ol_txrx_soc_handle soc, uint8_t pdev_id, uint8_t bitmap)
{
if (!soc || !soc->ops) {
@@ -40,8 +40,7 @@ cdp_clear_stats(ol_txrx_soc_handle soc, uint8_t bitmap)
!soc->ops->mob_stats_ops->clear_stats)
return QDF_STATUS_E_INVAL;
return soc->ops->mob_stats_ops->clear_stats((struct cdp_soc *)soc,
bitmap);
return soc->ops->mob_stats_ops->clear_stats(soc, pdev_id, bitmap);
}
static inline int