1 /* 2 * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: offload lmac interface APIs for P2P 22 */ 23 24 #ifndef _TARGET_IF_P2P_H_ 25 #define _TARGET_IF_P2P_H_ 26 27 #include <qdf_types.h> 28 29 struct wlan_objmgr_psoc; 30 struct p2p_ps_config; 31 struct p2p_lo_start; 32 33 #ifdef FEATURE_P2P_LISTEN_OFFLOAD 34 35 /** 36 * target_if_p2p_register_lo_event_handler() - Register lo event handler 37 * @psoc: soc object 38 * @arg: additional argument 39 * 40 * Target interface API to register P2P listen offload event handler. 41 * 42 * Return: QDF_STATUS_SUCCESS - in case of success 43 */ 44 QDF_STATUS target_if_p2p_register_lo_event_handler( 45 struct wlan_objmgr_psoc *psoc, void *arg); 46 47 /** 48 * target_if_p2p_unregister_lo_event_handler() - Unregister lo event handler 49 * @psoc: soc object 50 * @arg: additional argument 51 * 52 * Target interface API to unregister P2P listen offload event handler. 53 * 54 * Return: QDF_STATUS_SUCCESS - in case of success 55 */ 56 QDF_STATUS target_if_p2p_unregister_lo_event_handler( 57 struct wlan_objmgr_psoc *psoc, void *arg); 58 59 /** 60 * target_if_p2p_lo_start() - Start listen offload 61 * @psoc: soc object 62 * @lo_start: lo start information 63 * 64 * Target interface API to start listen offload. 65 * 66 * Return: QDF_STATUS_SUCCESS - in case of success 67 */ 68 QDF_STATUS target_if_p2p_lo_start(struct wlan_objmgr_psoc *psoc, 69 struct p2p_lo_start *lo_start); 70 71 /** 72 * target_if_p2p_lo_stop() - Stop listen offload 73 * @psoc: soc object 74 * @vdev_id: vdev id 75 * 76 * Target interface API to stop listen offload. 77 * 78 * Return: QDF_STATUS_SUCCESS - in case of success 79 */ 80 QDF_STATUS target_if_p2p_lo_stop(struct wlan_objmgr_psoc *psoc, 81 uint32_t vdev_id); 82 #endif 83 84 /** 85 * target_if_p2p_register_tx_ops() - Register P2P component TX OPS 86 * @tx_ops: lmac if transmit ops 87 * 88 * Return: None 89 */ 90 void target_if_p2p_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops); 91 92 /** 93 * target_if_p2p_register_noa_event_handler() - Register noa event handler 94 * @psoc: soc object 95 * @arg: additional argument 96 * 97 * Target interface API to register P2P noa event handler. 98 * 99 * Return: QDF_STATUS_SUCCESS - in case of success 100 */ 101 QDF_STATUS target_if_p2p_register_noa_event_handler( 102 struct wlan_objmgr_psoc *psoc, void *arg); 103 104 /** 105 * target_if_p2p_unregister_noa_event_handler() - Unregister noa event handler 106 * @psoc: soc object 107 * @arg: additional argument 108 * 109 * Target interface API to unregister P2P listen offload event handler. 110 * 111 * Return: QDF_STATUS_SUCCESS - in case of success 112 */ 113 QDF_STATUS target_if_p2p_unregister_noa_event_handler( 114 struct wlan_objmgr_psoc *psoc, void *arg); 115 116 /** 117 * target_if_p2p_set_ps() - Set power save 118 * @psoc: soc object 119 * @ps_config: powersave configuration 120 * 121 * Target interface API to set power save. 122 * 123 * Return: QDF_STATUS_SUCCESS - in case of success 124 */ 125 QDF_STATUS target_if_p2p_set_ps(struct wlan_objmgr_psoc *psoc, 126 struct p2p_ps_config *ps_config); 127 128 /** 129 * target_if_p2p_set_noa() - Disable / Enable NOA 130 * @psoc: soc object 131 * @vdev_id: vdev id 132 * @disable_noa: TRUE - Disable NoA, FALSE - Enable NoA 133 * 134 * Target interface API to Disable / Enable P2P NOA. 135 * 136 * Return: QDF_STATUS_SUCCESS - in case of success 137 */ 138 QDF_STATUS target_if_p2p_set_noa(struct wlan_objmgr_psoc *psoc, 139 uint32_t vdev_id, bool disable_noa); 140 141 #endif /* _TARGET_IF_P2P_H_ */ 142