1 /*
2  * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 /**
19  * DOC: Declare ns offload feature API's
20  */
21 
22 #ifndef _WLAN_PMO_NS_H_
23 #define _WLAN_PMO_NS_H_
24 
25 #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD
26 
27 #include "wlan_pmo_common_public_struct.h"
28 #include "wlan_pmo_ns_public_struct.h"
29 
30 /**
31  * pmo_core_cache_ns_offload_req() - API to cache ns req in pmo vdev priv ctx
32  * @ns_req: ns offload request
33  *
34  * API to cache ns offload in pmo vdev priv ctx
35  *
36  * Return:QDF_STATUS_SUCCESS in case of success else return error
37  */
38 QDF_STATUS pmo_core_cache_ns_offload_req(struct pmo_ns_req *ns_req);
39 
40 /**
41  * pmo_core_ns_check_offload() - API to check if offload cache/send is required
42  * @psoc: objmgr psoc handle
43  * @trigger: trigger reason enable ns offload
44  * @vdev_id: vdev id
45  *
46  * Return:QDF_STATUS_SUCCESS in case of success else return error
47  */
48 QDF_STATUS pmo_core_ns_check_offload(struct wlan_objmgr_psoc *psoc,
49 				     enum pmo_offload_trigger trigger,
50 				     uint8_t vdev_id);
51 
52 /**
53  * pmo_core_flush_ns_offload_req() - API to flush ns req from pmo vdev priv ctx
54  * @vdev: vdev objmgr handle
55  *
56  * API to flush ns offload from pmo vdev priv ctx
57  *
58  * Return: QDF_STATUS_SUCCESS in case of success else return error
59  */
60 QDF_STATUS pmo_core_flush_ns_offload_req(struct wlan_objmgr_vdev *vdev);
61 
62 /**
63  * pmo_core_enable_ns_offload_in_fwr() -  API to enable ns offload in fwr
64  * @vdev: objmgr vdev
65  * @trigger: trigger reason enable ns offload
66  *
67  * API to enable ns offload in fwr from vdev priv ctx
68  *
69  * Return: QDF_STATUS_SUCCESS in case of success else return error
70  */
71 QDF_STATUS pmo_core_enable_ns_offload_in_fwr(struct wlan_objmgr_vdev *vdev,
72 		enum pmo_offload_trigger trigger);
73 
74 /**
75  * pmo_core_disable_ns_offload_in_fwr() - API to disable ns offload in fwr
76  * @vdev: objmgr vdev
77  * @trigger: trigger reason disable ns offload
78  *
79  *  API to disable arp offload in fwr
80  *
81  * Return: QDF_STATUS_SUCCESS in case of success else return error
82  */
83 QDF_STATUS pmo_core_disable_ns_offload_in_fwr(struct wlan_objmgr_vdev *vdev,
84 		enum pmo_offload_trigger trigger);
85 
86 /**
87  * pmo_core_get_ns_offload_params() - API to get ns offload params
88  * @vdev: objmgr vdev
89  * @params: output pointer to hold offload params
90  *
91  * Return: QDF_STATUS_SUCCESS in case of success else return error
92  */
93 QDF_STATUS
94 pmo_core_get_ns_offload_params(struct wlan_objmgr_vdev *vdev,
95 			       struct pmo_ns_offload_params *params);
96 
97 #endif /* WLAN_POWER_MANAGEMENT_OFFLOAD */
98 
99 #endif /* end  of _WLAN_PMO_NS_H_ */
100