qcacmn: Define cdp api interface for dp_mon_stats

Add new CDP API interface to get monitor pdev rx stats.

Change-Id: Ifbe25c4b804135541e0fb938cc99bc2713dfb344
CRs-Fixed: 3084586
Šī revīzija ir iekļauta:
Subrat Mishra
2021-11-15 15:13:44 +05:30
revīziju iesūtīja Madan Koyyalamudi
vecāks 0a5f55fb4a
revīzija 95a5d8be88
6 mainīti faili ar 87 papildinājumiem un 6 dzēšanām

Parādīt failu

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
@@ -757,6 +757,15 @@ cdp_get_scan_spcl_vap_stats(ol_txrx_soc_handle soc,
}
#endif
/**
* cdp_get_peer_delay_stats() - Call to get per peer delay stats
* @soc: soc handle
* @vdev_id: id of dp_vdev handle
* @peer_mac: peer mac address
* @delay_stats: user allocated buffer for peer delay stats
*
* return: status Success/Failure
*/
static inline QDF_STATUS
cdp_get_peer_delay_stats(ol_txrx_soc_handle soc,
uint8_t vdev_id,
@@ -779,6 +788,16 @@ cdp_get_peer_delay_stats(ol_txrx_soc_handle soc,
delay_stats);
}
/**
* cdp_get_peer_jitter_stats() - Call to get per peer jitter stats
* @soc: soc handle
* @pdev_id: id of dp_pdev handle
* @vdev_id: id of dp_vdev handle
* @peer_mac: peer mac address
* @tid_stats: user allocated buffer for tid_stats
*
* return: status Success/Failure
*/
static inline QDF_STATUS
cdp_get_peer_jitter_stats(ol_txrx_soc_handle soc,
uint8_t pdev_id,
@@ -802,4 +821,29 @@ cdp_get_peer_jitter_stats(ol_txrx_soc_handle soc,
peer_mac,
tid_stats);
}
/**
* cdp_mon_pdev_get_rx_stats() - Call to get monitor pdev rx stats
* @soc: soc handle
* @pdev_id: id of dp_pdev handle
* @stats: user allocated buffer for dp pdev mon stats
*
* return: status Success/Failure
*/
static inline QDF_STATUS
cdp_mon_pdev_get_rx_stats(ol_txrx_soc_handle soc, uint8_t pdev_id,
struct cdp_pdev_mon_stats *stats)
{
if (!soc || !soc->ops) {
dp_cdp_debug("Invalid Instance");
QDF_BUG(0);
return QDF_STATUS_E_FAILURE;
}
if (!soc->ops->mon_ops ||
!soc->ops->mon_ops->get_mon_pdev_rx_stats)
return QDF_STATUS_E_FAILURE;
return soc->ops->mon_ops->get_mon_pdev_rx_stats(soc, pdev_id, stats);
}
#endif /* _CDP_TXRX_HOST_STATS_H_ */

Parādīt failu

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
@@ -895,6 +895,11 @@ struct cdp_mon_ops {
(*config_full_mon_mode)(struct cdp_soc_t *soc, uint8_t val);
QDF_STATUS (*soc_config_full_mon_mode)(struct cdp_pdev *cdp_pdev,
uint8_t val);
/* Get monitor mode pdev stats */
QDF_STATUS
(*get_mon_pdev_rx_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
struct cdp_pdev_mon_stats *stats);
};
struct cdp_host_stats_ops {

Parādīt failu

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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 above
@@ -1039,6 +1039,7 @@ struct cdp_mon_ops dp_ops_mon_1_0 = {
.txrx_deliver_tx_mgmt = dp_deliver_tx_mgmt,
.config_full_mon_mode = dp_config_full_mon_mode,
.soc_config_full_mon_mode = dp_soc_config_full_mon_mode,
.get_mon_pdev_rx_stats = dp_pdev_get_rx_mon_stats,
};
#ifdef QCA_MONITOR_OPS_PER_SOC_SUPPORT

Parādīt failu

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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 above
@@ -1042,6 +1042,7 @@ struct cdp_mon_ops dp_ops_mon_2_0 = {
.txrx_deliver_tx_mgmt = dp_deliver_tx_mgmt,
.config_full_mon_mode = NULL,
.soc_config_full_mon_mode = NULL,
.get_mon_pdev_rx_stats = dp_pdev_get_rx_mon_stats,
};
#ifdef QCA_MONITOR_OPS_PER_SOC_SUPPORT

Parādīt failu

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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 above
@@ -660,6 +660,26 @@ void dp_htt_ppdu_stats_detach(struct dp_pdev *pdev)
qdf_mem_free(mon_pdev->ppdu_tlv_buf);
}
QDF_STATUS dp_pdev_get_rx_mon_stats(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
struct cdp_pdev_mon_stats *stats)
{
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
struct dp_pdev *pdev = dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id);
struct dp_mon_pdev *mon_pdev;
if (!pdev)
return QDF_STATUS_E_FAILURE;
mon_pdev = pdev->monitor_pdev;
if (!mon_pdev)
return QDF_STATUS_E_FAILURE;
qdf_mem_copy(stats, &mon_pdev->rx_mon_stats,
sizeof(struct cdp_pdev_mon_stats));
return QDF_STATUS_SUCCESS;
}
void
dp_print_pdev_rx_mon_stats(struct dp_pdev *pdev)
{

Parādīt failu

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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 above
@@ -3422,4 +3422,14 @@ void dp_mon_register_feature_ops(struct dp_soc *soc)
mon_ops->mon_register_feature_ops(soc);
}
/**
* dp_pdev_get_rx_mon_stats(): Get pdev Rx monitor stats
* @soc_hdl: soc handle
* @pdev_id: id of pdev handle
* @stats: User allocated stats buffer
*
* return: status success/failure
*/
QDF_STATUS dp_pdev_get_rx_mon_stats(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
struct cdp_pdev_mon_stats *stats);
#endif /* _DP_MON_H_ */