1 /* 2 * Copyright (c) 2019-2020 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_vdev_mgmt_tx_ops.h 21 * 22 * This file provides declaration for APIs to send WMI commands 23 */ 24 25 #ifndef __TARGET_IF_VDEV_MGR_TX_OPS_H__ 26 #define __TARGET_IF_VDEV_MGR_TX_OPS_H__ 27 28 #include <wlan_vdev_mgr_tgt_if_tx_defs.h> 29 #include <wlan_objmgr_vdev_obj.h> 30 #include <wlan_objmgr_psoc_obj.h> 31 #include <wlan_lmac_if_def.h> 32 33 /** 34 * target_if_vdev_mgr_wmi_handle_get() - API to get wmi handle from vdev 35 * @vdev: pointer to vdev 36 * 37 * Return: pointer to wmi_unified handle or NULL 38 */ 39 struct wmi_unified *target_if_vdev_mgr_wmi_handle_get( 40 struct wlan_objmgr_vdev *vdev); 41 42 /** 43 * target_if_vdev_mgr_get_tx_ops() - get tx ops 44 * @psoc: pointer to psoc obj 45 * 46 * Return: pointer to tx ops 47 */ 48 static inline struct wlan_lmac_if_mlme_tx_ops * 49 target_if_vdev_mgr_get_tx_ops(struct wlan_objmgr_psoc *psoc) 50 { 51 struct wlan_lmac_if_tx_ops *tx_ops; 52 53 tx_ops = wlan_psoc_get_lmac_if_txops(psoc); 54 if (!tx_ops) { 55 mlme_err("tx_ops is NULL"); 56 return NULL; 57 } 58 59 return &tx_ops->mops; 60 } 61 62 /** 63 * target_if_vdev_mgr_vdev_mlme_register_tx_ops() - define mlme lmac 64 * tx ops functions 65 * @tx_ops: pointer to lmac tx ops 66 * 67 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 68 */ 69 QDF_STATUS 70 target_if_vdev_mgr_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops); 71 72 /** 73 * target_if_vdev_mgr_assert_mgmt() - vdev assert mgmt api 74 * @PSOC: pointer to objmgr psoc 75 * @vdev_id: vdev id 76 * 77 * Return: NA 78 */ 79 #ifdef VDEV_ASSERT_MANAGEMENT 80 static inline void target_if_vdev_mgr_assert_mgmt( 81 struct wlan_objmgr_psoc *psoc, 82 uint8_t vdev_id) 83 { 84 } 85 #else 86 static inline void target_if_vdev_mgr_assert_mgmt( 87 struct wlan_objmgr_psoc *psoc, 88 uint8_t vdev_id) 89 90 { 91 QDF_ASSERT(0); 92 } 93 #endif 94 95 /** 96 * target_if_vdev_mgr_rsp_timer_stop() - API to stop response timer for 97 * vdev manager operations 98 * @psoc: pointer to psoc object 99 * @vdev_rsp: vdev response timer 100 * @clear_bit: enum of wlan_vdev_mgr_tgt_if_rsp_bit 101 * 102 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 103 */ 104 QDF_STATUS target_if_vdev_mgr_rsp_timer_stop( 105 struct wlan_objmgr_psoc *psoc, 106 struct vdev_response_timer *vdev_rsp, 107 enum wlan_vdev_mgr_tgt_if_rsp_bit clear_bit); 108 109 #endif /* __TARGET_IF_VDEV_MGR_TX_OPS_H__ */ 110