xref: /wlan-driver/qcacld-3.0/components/coap/dispatcher/src/wlan_coap_ucfg_api.c (revision 5113495b16420b49004c444715d2daae2066e7dc)
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 north bound interface definitions
19  */
20 
21 #include <wlan_coap_main.h>
22 #include <wlan_coap_ucfg_api.h>
23 
24 /**
25  * ucfg_coap_offload_reply_enable() - API to enable CoAP offload reply
26  * @vdev: pointer to vdev object
27  * @param: parameters of CoAP offload reply
28  *
29  * Return: status of operation
30  */
31 QDF_STATUS
ucfg_coap_offload_reply_enable(struct wlan_objmgr_vdev * vdev,struct coap_offload_reply_param * param)32 ucfg_coap_offload_reply_enable(struct wlan_objmgr_vdev *vdev,
33 			       struct coap_offload_reply_param *param)
34 {
35 	return wlan_coap_offload_reply_enable(vdev, param);
36 }
37 
38 /**
39  * ucfg_coap_offload_reply_disable() - API to disable CoAP offload reply
40  * @vdev: pointer to vdev object
41  * @req_id: request id
42  * @cbk: callback function to be called with the cache info
43  * @context: context to be used by the caller to associate the disable request
44  *
45  * Return: status of operation
46  */
47 QDF_STATUS
ucfg_coap_offload_reply_disable(struct wlan_objmgr_vdev * vdev,uint32_t req_id,coap_cache_get_callback cbk,void * context)48 ucfg_coap_offload_reply_disable(struct wlan_objmgr_vdev *vdev, uint32_t req_id,
49 				coap_cache_get_callback cbk, void *context)
50 {
51 	return wlan_coap_offload_reply_disable(vdev, req_id, cbk, context);
52 }
53 
54 /**
55  * ucfg_coap_offload_periodic_tx_enable() - API to enable CoAP offload
56  * periodic transmitting
57  * @vdev: pointer to vdev object
58  * @param: parameters for CoAP periodic transmit
59  *
60  * Return: status of operation
61  */
62 QDF_STATUS
ucfg_coap_offload_periodic_tx_enable(struct wlan_objmgr_vdev * vdev,struct coap_offload_periodic_tx_param * param)63 ucfg_coap_offload_periodic_tx_enable(struct wlan_objmgr_vdev *vdev,
64 			struct coap_offload_periodic_tx_param *param)
65 {
66 	return wlan_coap_offload_periodic_tx_enable(vdev, param);
67 }
68 
69 /**
70  * ucfg_coap_offload_periodic_tx_disable() - private API to disable CoAP
71  * offload periodic transmitting
72  * @vdev: pointer to vdev object
73  * @req_id: request id
74  *
75  * Return: status of operation
76  */
77 QDF_STATUS
ucfg_coap_offload_periodic_tx_disable(struct wlan_objmgr_vdev * vdev,uint32_t req_id)78 ucfg_coap_offload_periodic_tx_disable(struct wlan_objmgr_vdev *vdev,
79 				      uint32_t req_id)
80 {
81 	return wlan_coap_offload_periodic_tx_disable(vdev, req_id);
82 }
83 
84 /**
85  * ucfg_coap_offload_cache_get() - API to get CoAP offload cache
86  * @vdev: pointer to vdev object
87  * @req_id: request id
88  * @cbk: callback function to be called with the cache get result
89  * @context: context to be used by the caller to associate the get
90  * cache request with the response
91  *
92  * Return: status of operation
93  */
94 QDF_STATUS
ucfg_coap_offload_cache_get(struct wlan_objmgr_vdev * vdev,uint32_t req_id,coap_cache_get_callback cbk,void * context)95 ucfg_coap_offload_cache_get(struct wlan_objmgr_vdev *vdev, uint32_t req_id,
96 			    coap_cache_get_callback cbk, void *context)
97 {
98 	return wlan_coap_offload_cache_get(vdev, req_id, cbk, context);
99 }
100