1 /* 2 * Copyright (c) 2017 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_wifi_pos.h 21 * This file declares the functions pertinent to wifi positioning component's 22 * target if layer. 23 */ 24 #ifndef _WIFI_POS_TGT_IF_H_ 25 #define _WIFI_POS_TGT_IF_H_ 26 27 #include "qdf_types.h" 28 #include "qdf_status.h" 29 struct oem_data_req; 30 struct oem_data_rsp; 31 struct wlan_objmgr_psoc; 32 struct wlan_soc_southbound_cb; 33 struct wlan_lmac_if_tx_ops; 34 struct wlan_lmac_if_rx_ops; 35 36 #ifdef WIFI_POS_CONVERGED 37 38 /** 39 * target_if_wifi_pos_get_txops: api to get tx ops 40 * @psoc: pointer to psoc object 41 * 42 * Return: tx ops 43 */ 44 struct wlan_lmac_if_wifi_pos_tx_ops *target_if_wifi_pos_get_txops( 45 struct wlan_objmgr_psoc *psoc); 46 47 /** 48 * target_if_wifi_pos_get_rxops: api to get rx ops 49 * @psoc: pointer to psoc object 50 * 51 * Return: rx ops 52 */ 53 struct wlan_lmac_if_wifi_pos_rx_ops *target_if_wifi_pos_get_rxops( 54 struct wlan_objmgr_psoc *psoc); 55 56 /** 57 * target_if_wifi_pos_register_events: function to register with wmi event 58 * @psoc: pointer to psoc object 59 * 60 * Return: status of operation 61 */ 62 QDF_STATUS target_if_wifi_pos_register_events(struct wlan_objmgr_psoc *psoc); 63 64 /** 65 * target_if_wifi_pos_deregister_events: function to deregister wmi event 66 * @psoc: pointer to psoc object 67 * 68 * Return: status of operation 69 */ 70 QDF_STATUS target_if_wifi_pos_deregister_events(struct wlan_objmgr_psoc *psoc); 71 72 73 /** 74 * target_if_wifi_pos_register_tx_ops: function to register with lmac tx ops 75 * @tx_ops: lmac tx ops struct object 76 * 77 * Return: none 78 */ 79 void target_if_wifi_pos_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops); 80 81 /** 82 * target_if_wifi_pos_register_rx_ops: function to register with lmac rx ops 83 * @rx_ops: lmac rx ops struct object 84 * 85 * Return: none 86 */ 87 void target_if_wifi_pos_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops); 88 89 #else 90 static inline struct wlan_lmac_if_wifi_pos_tx_ops *target_if_wifi_pos_get_txops( 91 struct wlan_objmgr_psoc *psoc) 92 { 93 return NULL; 94 } 95 96 97 static inline struct wlan_lmac_if_wifi_pos_rx_ops *target_if_wifi_pos_get_rxops( 98 struct wlan_objmgr_psoc *psoc) 99 { 100 return NULL; 101 } 102 103 static inline void target_if_wifi_pos_register_tx_ops( 104 struct wlan_lmac_if_tx_ops *tx_ops) 105 { 106 } 107 108 static inline void target_if_wifi_pos_register_rx_ops( 109 struct wlan_lmac_if_rx_ops *rx_ops) 110 { 111 } 112 #endif 113 114 #endif /* _WIFI_POS_TGT_IF_H_ */ 115