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