xref: /wlan-driver/qca-wifi-host-cmn/wmi/inc/wmi_unified_p2p_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022 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  * DOC: Implement API's specific to P2P component.
21  */
22 
23 #ifndef _WMI_UNIFIED_P2P_API_H_
24 #define _WMI_UNIFIED_P2P_API_H_
25 
26 #include <wlan_p2p_public_struct.h>
27 
28 /**
29  * wmi_unified_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
30  * @wmi_handle: wmi handle
31  * @oppps: p2p opp power save parameters
32  *
33  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
34  */
35 QDF_STATUS wmi_unified_set_p2pgo_oppps_req(wmi_unified_t wmi_handle,
36 					   struct p2p_ps_params *oppps);
37 
38 /**
39  * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
40  * @wmi_handle: wmi handle
41  * @noa: p2p power save parameters
42  *
43  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
44  */
45 QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(wmi_unified_t wmi_handle,
46 					     struct p2p_ps_params *noa);
47 
48 /**
49  * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event
50  * @wmi_handle: wmi handle
51  * @evt_buf: pointer to event buffer
52  * @param: Pointer to hold p2p noa param
53  *
54  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
55  */
56 QDF_STATUS wmi_extract_p2p_noa_ev_param(wmi_unified_t wmi_handle,
57 					void *evt_buf,
58 					struct p2p_noa_info *param);
59 
60 /**
61  * wmi_extract_mac_addr_rx_filter_evt_param() - extract mac addr rx filter evt
62  * @wmi_handle: wmi handle
63  * @evt_buf: pointer to event buffer
64  * @param: Pointer to extracted evt info
65  *
66  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
67  */
68 QDF_STATUS
69 wmi_extract_mac_addr_rx_filter_evt_param(wmi_unified_t wmi_handle,
70 					 void *evt_buf,
71 					 struct p2p_set_mac_filter_evt *param);
72 
73 #ifdef FEATURE_P2P_LISTEN_OFFLOAD
74 /**
75  * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw
76  * @wmi_handle: wmi handle
77  * @param: p2p listen offload start parameters
78  *
79  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
80  */
81 QDF_STATUS wmi_unified_p2p_lo_start_cmd(wmi_unified_t wmi_handle,
82 					struct p2p_lo_start *param);
83 
84 /**
85  * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw
86  * @wmi_handle: wmi handle
87  * @vdev_id: vdev id
88  *
89  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
90  */
91 QDF_STATUS wmi_unified_p2p_lo_stop_cmd(wmi_unified_t wmi_handle,
92 				       uint8_t vdev_id);
93 
94 /**
95  * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event
96  * @wmi_handle: wmi handle
97  * @evt_buf: pointer to event buffer
98  * @param: Pointer to hold listen offload stop param
99  *
100  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
101  */
102 QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(wmi_unified_t wmi_handle,
103 					    void *evt_buf,
104 					    struct p2p_lo_event *param);
105 #endif /* FEATURE_P2P_LISTEN_OFFLOAD */
106 
107 #endif /* _WMI_UNIFIED_P2P_API_H_ */
108