xref: /wlan-driver/qcacld-3.0/components/pmo/core/inc/wlan_pmo_lphb.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2017-2018 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 low power heart beat offload feature API's
20  */
21 
22 #ifndef _WLAN_PMO_LPHB_H_
23 #define _WLAN_PMO_LPHB_H_
24 
25 #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD
26 
27 #include "wlan_pmo_lphb_public_struct.h"
28 
29 /**
30  * pmo_core_lphb_config_req() - API to configure lphb request
31  * @psoc: objmgr psoc handle
32  * @lphb_req: low power heart beat configuration request
33  * @lphb_cb_ctx: low power heart beat context
34  * @callback: osif callback which need to be called when host get lphb event
35  *
36  * API to configure lphb request
37  *
38  * Return: QDF_STATUS_SUCCESS in case of success else return error
39  */
40 QDF_STATUS pmo_core_lphb_config_req(struct wlan_objmgr_psoc *psoc,
41 		struct pmo_lphb_req *lphb_req, void *lphb_cb_ctx,
42 		pmo_lphb_callback callback);
43 
44 /**
45  * pmo_core_apply_lphb(): apply cached LPHB settings
46  * @psoc: objmgr psoc handle
47  *
48  * LPHB cache, if any item was enabled, should be
49  * applied.
50  */
51 void pmo_core_apply_lphb(struct wlan_objmgr_psoc *psoc);
52 
53 #endif /* WLAN_POWER_MANAGEMENT_OFFLOAD */
54 
55 #endif /* end  of _WLAN_PMO_LPHB_H_ */
56