1 /*
2  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /*
18  * DOC: contains CoAP south bound interface definitions
19  */
20 
21 #ifndef _WLAN_COAP_TGT_API_H_
22 #define _WLAN_COAP_TGT_API_H_
23 
24 #ifdef WLAN_FEATURE_COAP
25 #include <qdf_types.h>
26 #include <wlan_objmgr_psoc_obj.h>
27 #include <wlan_objmgr_vdev_obj.h>
28 
29 /**
30  * tgt_coap_attach(): attach CoAP component
31  * @psoc: pointer to psoc
32  *
33  * This API will register CoAP related WMI event handlers.
34  *
35  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
36  */
37 QDF_STATUS tgt_coap_attach(struct wlan_objmgr_psoc *psoc);
38 
39 /**
40  * tgt_coap_detach(): detach CoAP component
41  * @psoc: pointer to psoc
42  *
43  * This API will unregister CoAP related WMI event handlers.
44  *
45  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
46  */
47 QDF_STATUS tgt_coap_detach(struct wlan_objmgr_psoc *psoc);
48 
49 /**
50  * tgt_send_coap_offload_reply_enable() - enable CoAP offload reply
51  * @vdev: pointer to vdev object
52  * @param: parameters for CoAP offload reply
53  *
54  * Return: status of operation
55  */
56 QDF_STATUS
57 tgt_send_coap_offload_reply_enable(struct wlan_objmgr_vdev *vdev,
58 				   struct coap_offload_reply_param *param);
59 
60 /**
61  * tgt_send_coap_offload_reply_disable() - disable CoAP offload reply
62  * @vdev: pointer to vdev object
63  * @req_id: request id
64  *
65  * Return: status of operation
66  */
67 QDF_STATUS
68 tgt_send_coap_offload_reply_disable(struct wlan_objmgr_vdev *vdev,
69 				    uint32_t req_id);
70 
71 /**
72  * tgt_send_coap_offload_periodic_tx_enable() - enable CoAP offload
73  * periodic transmitting
74  * @vdev: pointer to vdev object
75  * @param: parameters for CoAP periodic transmitting
76  *
77  * Return: status of operation
78  */
79 QDF_STATUS
80 tgt_send_coap_offload_periodic_tx_enable(struct wlan_objmgr_vdev *vdev,
81 			struct coap_offload_periodic_tx_param *param);
82 
83 /**
84  * tgt_send_coap_offload_periodic_tx_disable() - disable CoAP offload
85  * periodic transmitting
86  * @vdev: pointer to vdev object
87  * @req_id: request id
88  *
89  * Return: status of operation
90  */
91 QDF_STATUS
92 tgt_send_coap_offload_periodic_tx_disable(struct wlan_objmgr_vdev *vdev,
93 					  uint32_t req_id);
94 
95 /**
96  * tgt_send_coap_offload_cache_get() - get cached CoAP messages
97  * @vdev: pointer to vdev object
98  * @req_id: request id
99  *
100  * Return: status of operation
101  */
102 QDF_STATUS
103 tgt_send_coap_offload_cache_get(struct wlan_objmgr_vdev *vdev,
104 				uint32_t req_id);
105 #endif
106 #endif
107