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:
@@ -1165,13 +1165,13 @@ struct cdp_peer_ops {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct cdp_ocb_ops - mcl ocb ops
|
* struct cdp_mob_stats_ops - mcl mob stats ops
|
||||||
* @clear_stats:
|
* @clear_stats: handler to clear ol txrx stats
|
||||||
* @stats:
|
* @stats: handler to update ol txrx stats
|
||||||
*/
|
*/
|
||||||
struct cdp_mob_stats_ops {
|
struct cdp_mob_stats_ops {
|
||||||
QDF_STATUS
|
QDF_STATUS(*clear_stats)(struct cdp_soc_t *soc_hdl,
|
||||||
(*clear_stats)(struct cdp_soc *soc, uint8_t bitmap);
|
uint8_t pdev_id, uint8_t bitmap);
|
||||||
int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len);
|
int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#include <cdp_txrx_ops.h>
|
#include <cdp_txrx_ops.h>
|
||||||
|
|
||||||
static inline QDF_STATUS
|
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) {
|
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)
|
!soc->ops->mob_stats_ops->clear_stats)
|
||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
return soc->ops->mob_stats_ops->clear_stats((struct cdp_soc *)soc,
|
return soc->ops->mob_stats_ops->clear_stats(soc, pdev_id, bitmap);
|
||||||
bitmap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
|
@@ -8414,10 +8414,10 @@ static QDF_STATUS dp_txrx_dump_stats(void *psoc, uint16_t value,
|
|||||||
* Return: 0 - Success, non-zero - failure
|
* Return: 0 - Success, non-zero - failure
|
||||||
*/
|
*/
|
||||||
static
|
static
|
||||||
QDF_STATUS dp_txrx_clear_dump_stats(struct cdp_soc *psoc, uint8_t value)
|
QDF_STATUS dp_txrx_clear_dump_stats(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||||
|
uint8_t value)
|
||||||
{
|
{
|
||||||
struct dp_soc *soc =
|
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||||
(struct dp_soc *)psoc;
|
|
||||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
if (!soc) {
|
if (!soc) {
|
||||||
|
Reference in New Issue
Block a user