xref: /wlan-dirver/qca-wifi-host-cmn/wmi/inc/wmi_unified_nan_api.h (revision 27d564647e9b50e713c60b0d7e5ea2a9b0a3ae74)
1 
2 /*
3  * Copyright (c) 2013-2018 The Linux Foundation. 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 NAN component.
21  */
22 
23 #ifndef _WMI_UNIFIED_NAN_API_H_
24 #define _WMI_UNIFIED_NAN_API_H_
25 
26 #include <nan_public_structs.h>
27 
28 /**
29  * wmi_unified_ndp_initiator_req_cmd_send - api to send initiator request to FW
30  * @wmi_hdl: wmi handle
31  * @req: pointer to request buffer
32  *
33  * Return: status of operation
34  */
35 QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
36 				struct nan_datapath_initiator_req *req);
37 
38 /**
39  * wmi_unified_ndp_responder_req_cmd_send - api to send responder request to FW
40  * @wmi_hdl: wmi handle
41  * @req: pointer to request buffer
42  *
43  * Return: status of operation
44  */
45 QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
46 				struct nan_datapath_responder_req *req);
47 
48 /**
49  * wmi_unified_ndp_end_req_cmd_send - api to send end request to FW
50  * @wmi_hdl: wmi handle
51  * @req: pointer to request buffer
52  *
53  * Return: status of operation
54  */
55 QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
56 					    struct nan_datapath_end_req *req);
57 
58 /**
59  * wmi_extract_ndp_initiator_rsp - api to extract initiator rsp from even buffer
60  * @wmi_hdl: wmi handle
61  * @data: event buffer
62  * @rsp: buffer to populate
63  *
64  * Return: status of operation
65  */
66 QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
67 			uint8_t *data, struct nan_datapath_initiator_rsp *rsp);
68 
69 /**
70  * wmi_extract_ndp_ind - api to extract ndp indication struct from even buffer
71  * @wmi_hdl: wmi handle
72  * @data: event buffer
73  * @ind: buffer to populate
74  *
75  * Return: status of operation
76  */
77 QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
78 			       struct nan_datapath_indication_event *ind);
79 
80 /**
81  * wmi_extract_ndp_confirm - api to extract ndp confim struct from even buffer
82  * @wmi_hdl: wmi handle
83  * @data: event buffer
84  * @ev: buffer to populate
85  *
86  * Return: status of operation
87  */
88 QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
89 				   struct nan_datapath_confirm_event *ev);
90 
91 /**
92  * wmi_extract_ndp_responder_rsp - api to extract responder rsp from even buffer
93  * @wmi_hdl: wmi handle
94  * @data: event buffer
95  * @rsp: buffer to populate
96  *
97  * Return: status of operation
98  */
99 QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
100 			uint8_t *data, struct nan_datapath_responder_rsp *rsp);
101 
102 /**
103  * wmi_extract_ndp_end_rsp - api to extract ndp end rsp from even buffer
104  * @wmi_hdl: wmi handle
105  * @data: event buffer
106  * @rsp: buffer to populate
107  *
108  * Return: status of operation
109  */
110 QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
111 				   struct nan_datapath_end_rsp_event *rsp);
112 
113 /**
114  * wmi_extract_ndp_end_ind - api to extract ndp end indication from even buffer
115  * @wmi_hdl: wmi handle
116  * @data: event buffer
117  * @ind: buffer to populate
118  *
119  * Return: status of operation
120  */
121 QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
122 			struct nan_datapath_end_indication_event **ind);
123 
124 /**
125  * wmi_extract_ndp_sch_update - api to extract ndp sch update from event buffer
126  * @wmi_hdl: wmi handle
127  * @data: event buffer
128  * @ind: buffer to populate
129  *
130  * Return: status of operation
131  */
132 QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
133 				struct nan_datapath_sch_update_event *ind);
134 
135 #endif /* _WMI_UNIFIED_NAN_API_H_ */
136