123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746 |
- /*
- * Copyright (c) 2016-2019 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
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
- /**
- * @file cdp_txrx_host_stats.h
- * @brief Define the host data path stats API functions
- * called by the host control SW and the OS interface module
- */
- #ifndef _CDP_TXRX_HOST_STATS_H_
- #define _CDP_TXRX_HOST_STATS_H_
- #include "cdp_txrx_handle.h"
- #include "cdp_txrx_extd_struct.h"
- /**
- * cdp_host_stats_get: cdp call to get host stats
- * @soc: SOC handle
- * @req: Requirement type
- *
- * return: 0 for Success, Failure returns error message
- */
- static inline int cdp_host_stats_get(ol_txrx_soc_handle soc,
- struct cdp_vdev *vdev,
- struct ol_txrx_stats_req *req)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_host_stats_get)
- return 0;
- return soc->ops->host_stats_ops->txrx_host_stats_get(vdev, req);
- }
- /**
- * cdp_host_stats_get_ratekbps: cdp call to get rate in kbps
- * @soc: SOC handle
- * @preamb: Preamble
- * @mcs: Modulation and Coding scheme index
- * @htflag: Flag to identify HT or VHT
- * @gintval: Gaurd Interval value
- *
- * return: 0 for Failure, Returns rate on Success
- */
- static inline int cdp_host_stats_get_ratekbps(ol_txrx_soc_handle soc,
- int preamb, int mcs,
- int htflag, int gintval)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_get_ratekbps)
- return 0;
- return soc->ops->host_stats_ops->txrx_get_ratekbps(preamb,
- mcs, htflag,
- gintval);
- }
- /**
- * cdp_host_stats_clr: cdp call to clear host stats
- * @vdev: vdev handle
- *
- * return: void
- */
- static inline void
- cdp_host_stats_clr(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_host_stats_clr)
- return;
- soc->ops->host_stats_ops->txrx_host_stats_clr(vdev);
- }
- static inline void
- cdp_host_ce_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_host_ce_stats)
- return;
- soc->ops->host_stats_ops->txrx_host_ce_stats(vdev);
- }
- static inline int cdp_stats_publish
- (ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
- struct cdp_stats_extd *buf)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_stats_publish)
- return 0;
- return soc->ops->host_stats_ops->txrx_stats_publish(pdev, buf);
- }
- /**
- * @brief Enable enhanced stats functionality.
- *
- * @param pdev - the physical device object
- * @return - void
- */
- static inline void
- cdp_enable_enhanced_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_enable_enhanced_stats)
- return;
- soc->ops->host_stats_ops->txrx_enable_enhanced_stats
- (pdev);
- }
- /**
- * @brief Disable enhanced stats functionality.
- *
- * @param pdev - the physical device object
- * @return - void
- */
- static inline void
- cdp_disable_enhanced_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_disable_enhanced_stats)
- return;
- soc->ops->host_stats_ops->txrx_disable_enhanced_stats
- (pdev);
- }
- /**
- * @brief Get the desired stats from the message.
- *
- * @param pdev - the physical device object
- * @param stats_base - stats buffer received from FW
- * @param type - stats type.
- * @return - pointer to requested stat identified by type
- */
- static inline uint32_t *cdp_get_stats_base
- (ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
- uint32_t *stats_base, uint32_t msg_len, uint8_t type)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_get_stats_base)
- return 0;
- return (uint32_t *)soc->ops->host_stats_ops->txrx_get_stats_base
- (pdev, stats_base, msg_len, type);
- }
- static inline void
- cdp_tx_print_tso_stats(ol_txrx_soc_handle soc,
- struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->tx_print_tso_stats)
- return;
- soc->ops->host_stats_ops->tx_print_tso_stats(vdev);
- }
- static inline void
- cdp_tx_rst_tso_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->tx_rst_tso_stats)
- return;
- soc->ops->host_stats_ops->tx_rst_tso_stats(vdev);
- }
- static inline void
- cdp_tx_print_sg_stats(ol_txrx_soc_handle soc,
- struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->tx_print_sg_stats)
- return;
- soc->ops->host_stats_ops->tx_print_sg_stats(vdev);
- }
- static inline void
- cdp_tx_rst_sg_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->tx_rst_sg_stats)
- return;
- soc->ops->host_stats_ops->tx_rst_sg_stats(vdev);
- }
- static inline void
- cdp_print_rx_cksum_stats(ol_txrx_soc_handle soc,
- struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->print_rx_cksum_stats)
- return;
- soc->ops->host_stats_ops->print_rx_cksum_stats(vdev);
- }
- static inline void
- cdp_rst_rx_cksum_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->rst_rx_cksum_stats)
- return;
- soc->ops->host_stats_ops->rst_rx_cksum_stats(vdev);
- }
- static inline A_STATUS
- cdp_host_me_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_host_me_stats)
- return 0;
- return soc->ops->host_stats_ops->txrx_host_me_stats(vdev);
- }
- /**
- * cdp_per_peer_stats(): function to print per peer REO Queue stats
- * @soc: soc handle
- * @pdev: physical device
- * @addr: peer address
- *
- * return: status
- */
- static inline void cdp_per_peer_stats(ol_txrx_soc_handle soc,
- struct cdp_pdev *pdev, char *addr)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_per_peer_stats)
- return;
- soc->ops->host_stats_ops->txrx_per_peer_stats(pdev, addr);
- }
- static inline int cdp_host_msdu_ttl_stats(ol_txrx_soc_handle soc,
- struct cdp_vdev *vdev,
- struct ol_txrx_stats_req *req)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_host_msdu_ttl_stats)
- return 0;
- return soc->ops->host_stats_ops->txrx_host_msdu_ttl_stats
- (vdev, req);
- }
- static inline void
- cdp_print_lro_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->print_lro_stats)
- return;
- soc->ops->host_stats_ops->print_lro_stats(vdev);
- }
- static inline void
- cdp_reset_lro_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->reset_lro_stats)
- return;
- soc->ops->host_stats_ops->reset_lro_stats(vdev);
- }
- static inline void cdp_get_dp_fw_peer_stats(ol_txrx_soc_handle soc,
- struct cdp_pdev *pdev, uint8_t *mac, uint32_t caps,
- uint32_t copy_stats)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->get_fw_peer_stats)
- return;
- soc->ops->host_stats_ops->get_fw_peer_stats
- (pdev, mac, caps, copy_stats);
- }
- static inline void cdp_get_dp_htt_stats(ol_txrx_soc_handle soc,
- struct cdp_pdev *pdev,
- void *data, uint32_t data_len)
- {
- if (soc && soc->ops && soc->ops->host_stats_ops &&
- soc->ops->host_stats_ops->get_htt_stats)
- return soc->ops->host_stats_ops->get_htt_stats
- (pdev, data, data_len);
- return;
- }
- /**
- * @brief Update pdev host stats received from firmware
- * (wmi_host_pdev_stats and wmi_host_pdev_ext_stats) into dp
- *
- * @param pdev - the physical device object
- * @param data - pdev stats
- * @return - void
- */
- static inline void
- cdp_update_pdev_host_stats(ol_txrx_soc_handle soc,
- struct cdp_pdev *pdev,
- void *data,
- uint16_t stats_id)
- {
- if (soc && soc->ops && soc->ops->host_stats_ops &&
- soc->ops->host_stats_ops->txrx_update_pdev_stats)
- return soc->ops->host_stats_ops->txrx_update_pdev_stats
- (pdev, data, stats_id);
- }
- /**
- * @brief Update vdev host stats
- *
- * @param soc - soc handle
- * @param vdev - the physical device object
- * @param data - pdev stats
- * @param stats_id - type of stats
- *
- * @return - void
- */
- static inline void
- cdp_update_vdev_host_stats(ol_txrx_soc_handle soc,
- struct cdp_vdev *vdev,
- void *data,
- uint16_t stats_id)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_update_vdev_stats)
- return;
- return soc->ops->host_stats_ops->txrx_update_vdev_stats(vdev, data,
- stats_id);
- }
- /**
- * @brief Call to get peer stats
- *
- * @param peer - dp peer object
- * @return - struct cdp_peer_stats
- */
- static inline struct cdp_peer_stats *
- cdp_host_get_peer_stats(ol_txrx_soc_handle soc, struct cdp_peer *peer)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return NULL;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_get_peer_stats)
- return NULL;
- return soc->ops->host_stats_ops->txrx_get_peer_stats(peer);
- }
- /**
- * @brief Call to reset ald stats
- *
- * @param peer - dp peer object
- * @return - void
- */
- static inline void
- cdp_host_reset_peer_ald_stats(ol_txrx_soc_handle soc,
- struct cdp_peer *peer)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_reset_peer_ald_stats)
- return;
- return soc->ops->host_stats_ops->txrx_reset_peer_ald_stats(peer);
- }
- /**
- * @brief Call to reset peer stats
- *
- * @param peer - dp peer object
- * @return - void
- */
- static inline void
- cdp_host_reset_peer_stats(ol_txrx_soc_handle soc,
- struct cdp_peer *peer)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_reset_peer_stats)
- return;
- return soc->ops->host_stats_ops->txrx_reset_peer_stats(peer);
- }
- /**
- * @brief Call to get vdev stats
- *
- * @param vdev - dp vdev object
- * @param buf - buffer
- * @return - int
- */
- static inline int
- cdp_host_get_vdev_stats(ol_txrx_soc_handle soc,
- struct cdp_vdev *vdev,
- struct cdp_vdev_stats *buf,
- bool is_aggregate)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_get_vdev_stats)
- return 0;
- return soc->ops->host_stats_ops->txrx_get_vdev_stats(vdev,
- buf,
- is_aggregate);
- }
- /**
- * @brief Call to update vdev stats received from firmware
- * (wmi_host_vdev_stats and wmi_host_vdev_extd_stats) into dp
- *
- * @param data - stats data to be updated
- * @param size - size of stats data
- * @param stats_id - stats id
- * @return - int
- */
- static inline int
- cdp_update_host_vdev_stats(ol_txrx_soc_handle soc,
- void *data,
- uint32_t size,
- uint32_t stats_id)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_process_wmi_host_vdev_stats)
- return 0;
- return soc->ops->host_stats_ops->txrx_process_wmi_host_vdev_stats
- (soc,
- data,
- size,
- stats_id);
- }
- /**
- * @brief Call to get vdev extd stats
- *
- * @param vdev - dp vdev object
- * @param buf - buffer
- * @return - int
- */
- static inline int
- cdp_get_vdev_extd_stats(ol_txrx_soc_handle soc,
- struct cdp_vdev *vdev,
- void *buf)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_get_vdev_extd_stats)
- return 0;
- return soc->ops->host_stats_ops->txrx_get_vdev_extd_stats(vdev, buf);
- }
- /**
- * @brief Call to get cdp_pdev_stats
- *
- * @param pdev - dp pdev object
- * @return - cdp_pdev_stats
- */
- static inline struct cdp_pdev_stats*
- cdp_host_get_pdev_stats(ol_txrx_soc_handle soc,
- struct cdp_pdev *pdev)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_get_pdev_stats)
- return 0;
- return soc->ops->host_stats_ops->txrx_get_pdev_stats(pdev);
- }
- /**
- * @brief Call to get radio stats
- *
- * @param pdev - dp pdev object
- * @param scn_stats_user - stats buffer
- * @return - int
- */
- static inline int
- cdp_host_get_radio_stats(ol_txrx_soc_handle soc,
- struct cdp_pdev *pdev,
- void *buf)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return 0;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->txrx_get_radio_stats)
- return 0;
- return soc->ops->host_stats_ops->txrx_get_radio_stats(pdev,
- buf);
- }
- /**
- * @brief confgure rate stats at soc
- *
- * @param soc - opaque soc handle
- * @param vap - capabilities
- * @return - void
- */
- static inline void
- cdp_soc_configure_rate_stats(ol_txrx_soc_handle soc, uint8_t val)
- {
- if (!soc || !soc->ops) {
- QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
- "%s: Invalid Instance", __func__);
- QDF_BUG(0);
- return;
- }
- if (!soc->ops->host_stats_ops ||
- !soc->ops->host_stats_ops->configure_rate_stats)
- return;
- return soc->ops->host_stats_ops->configure_rate_stats(soc, val);
- }
- /**
- * @brief Parse the stats header and get the payload from the message.
- *
- * @param pdev - the physical device object
- * @param msg_word - stats buffer received from FW
- * @param msg_len - length of the message
- * @param type - place holder for parsed message type
- * @param status - place holder for parsed message status
- * @return - pointer to received stat payload
- */
- #if defined(QCA_SUPPORT_SON) || defined(ENHANCED_STATS)
- uint32_t *ol_txrx_get_en_stats_base(struct cdp_pdev *pdev, uint32_t *msg_word,
- uint32_t msg_len, enum htt_cmn_t2h_en_stats_type *type, enum htt_cmn_t2h_en_stats_status *status);
- #endif
- #endif /* _CDP_TXRX_HOST_STATS_H_ */
|