1 /* 2 * Copyright (c) 2018 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /** 20 * DOC: target_if_cp_stats.h 21 * 22 * This header file provide declarations required for Rx and Tx events from 23 * firmware 24 */ 25 26 #ifndef __TARGET_IF_CP_STATS_H__ 27 #define __TARGET_IF_CP_STATS_H__ 28 29 #include <target_if.h> 30 #include <wlan_lmac_if_def.h> 31 #include <wlan_cp_stats_utils_api.h> 32 33 #ifdef QCA_SUPPORT_CP_STATS 34 35 /** 36 * target_if_cp_stats_get_rx_ops() - get rx ops 37 * @tx_ops: pointer to lmac tx ops 38 * 39 * Return: pointer to rx ops 40 */ 41 static inline struct wlan_lmac_if_cp_stats_rx_ops * 42 target_if_cp_stats_get_rx_ops(struct wlan_objmgr_psoc *psoc) 43 { 44 return &psoc->soc_cb.rx_ops.cp_stats_rx_ops; 45 } 46 47 /** 48 * target_if_cp_stats_get_tx_ops() - get tx ops 49 * @tx_ops: pointer to lmac tx ops 50 * 51 * Return: pointer to tx ops 52 */ 53 static inline struct wlan_lmac_if_cp_stats_tx_ops * 54 target_if_cp_stats_get_tx_ops(struct wlan_objmgr_psoc *psoc) 55 { 56 return &psoc->soc_cb.tx_ops.cp_stats_tx_ops; 57 } 58 59 /** 60 * target_if_cp_stats_register_tx_ops() - define cp_stats lmac tx ops functions 61 * @tx_ops: pointer to lmac tx ops 62 * 63 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 64 */ 65 QDF_STATUS 66 target_if_cp_stats_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops); 67 #else 68 static inline QDF_STATUS 69 target_if_cp_stats_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) 70 { 71 return QDF_STATUS_SUCCESS; 72 } 73 #endif /* QCA_SUPPORT_CP_STATS */ 74 75 #endif /* __TARGET_IF_CP_STATS_H__ */ 76