1 /* 2 * Copyright (c) 2019 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 return &psoc->soc_cb.tx_ops.mops; 52 } 53 54 /** 55 * target_if_vdev_mgr_vdev_mlme_register_tx_ops() - define mlme lmac 56 * tx ops functions 57 * @tx_ops: pointer to lmac tx ops 58 * 59 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 60 */ 61 QDF_STATUS 62 target_if_vdev_mgr_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops); 63 64 /** 65 * target_if_vdev_mgr_assert_mgmt() - vdev assert mgmt api 66 * @PSOC: pointer to objmgr psoc 67 * @vdev_id: vdev id 68 * 69 * Return: NA 70 */ 71 #ifdef VDEV_ASSERT_MANAGEMENT 72 static inline void target_if_vdev_mgr_assert_mgmt( 73 struct wlan_objmgr_psoc *psoc, 74 uint8_t vdev_id) 75 { 76 } 77 #else 78 static inline void target_if_vdev_mgr_assert_mgmt( 79 struct wlan_objmgr_psoc *psoc, 80 uint8_t vdev_id) 81 82 { 83 QDF_ASSERT(0); 84 } 85 #endif 86 87 /** 88 * target_if_vdev_mgr_rsp_timer_stop() - API to stop response timer for 89 * vdev manager operations 90 * @psoc: pointer to psoc object 91 * @vdev_rsp: vdev response timer 92 * @clear_bit: enum of wlan_vdev_mgr_tgt_if_rsp_bit 93 * 94 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 95 */ 96 QDF_STATUS target_if_vdev_mgr_rsp_timer_stop( 97 struct wlan_objmgr_psoc *psoc, 98 struct vdev_response_timer *vdev_rsp, 99 enum wlan_vdev_mgr_tgt_if_rsp_bit clear_bit); 100 101 #endif /* __TARGET_IF_VDEV_MGR_TX_OPS_H__ */ 102