xref: /wlan-driver/qca-wifi-host-cmn/target_if/green_ap/inc/target_if_green_ap.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name /**
21*5113495bSYour Name  * DOC: offload lmac interface APIs for green ap
22*5113495bSYour Name  */
23*5113495bSYour Name #ifndef __TARGET_IF_GREEN_AP_H__
24*5113495bSYour Name #define __TARGET_IF_GREEN_AP_H__
25*5113495bSYour Name 
26*5113495bSYour Name #include <wlan_objmgr_cmn.h>
27*5113495bSYour Name #include <wlan_objmgr_pdev_obj.h>
28*5113495bSYour Name #include <qdf_status.h>
29*5113495bSYour Name #include <wlan_lmac_if_def.h>
30*5113495bSYour Name 
31*5113495bSYour Name struct wlan_green_ap_egap_params;
32*5113495bSYour Name 
33*5113495bSYour Name /**
34*5113495bSYour Name  * target_if_register_green_ap_tx_ops() - lmac handler to register
35*5113495bSYour Name  *   green ap tx_ops callback functions
36*5113495bSYour Name  * @tx_ops: wlan_lmac_if_tx_ops object
37*5113495bSYour Name  *
38*5113495bSYour Name  * Return: QDF_STATUS in case of success
39*5113495bSYour Name  */
40*5113495bSYour Name QDF_STATUS target_if_register_green_ap_tx_ops(
41*5113495bSYour Name 		struct wlan_lmac_if_tx_ops *tx_ops);
42*5113495bSYour Name 
43*5113495bSYour Name #if defined(WLAN_SUPPORT_GAP_LL_PS_MODE)
44*5113495bSYour Name /**
45*5113495bSYour Name  * target_if_green_ap_register_ll_ps_event_handler() - register green ap low
46*5113495bSYour Name  * latency power save mode event handler
47*5113495bSYour Name  * @pdev: objmgr pdev
48*5113495bSYour Name  *
49*5113495bSYour Name  * Return: QDF_STATUS in case of success
50*5113495bSYour Name  */
51*5113495bSYour Name 
52*5113495bSYour Name QDF_STATUS target_if_green_ap_register_ll_ps_event_handler(
53*5113495bSYour Name 						struct wlan_objmgr_pdev *pdev);
54*5113495bSYour Name #else
target_if_green_ap_register_ll_ps_event_handler(struct wlan_objmgr_pdev * pdev)55*5113495bSYour Name static inline QDF_STATUS target_if_green_ap_register_ll_ps_event_handler(
56*5113495bSYour Name 						struct wlan_objmgr_pdev *pdev)
57*5113495bSYour Name {
58*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
59*5113495bSYour Name }
60*5113495bSYour Name #endif
61*5113495bSYour Name /**
62*5113495bSYour Name  * target_if_green_ap_register_egap_event_handler() - registers enhanced
63*5113495bSYour Name  *                                  green ap event handler
64*5113495bSYour Name  * @pdev: objmgr pdev
65*5113495bSYour Name  *
66*5113495bSYour Name  * Return: QDF_STATUS in case of success
67*5113495bSYour Name  */
68*5113495bSYour Name QDF_STATUS target_if_green_ap_register_egap_event_handler(
69*5113495bSYour Name 			struct wlan_objmgr_pdev *pdev);
70*5113495bSYour Name 
71*5113495bSYour Name /**
72*5113495bSYour Name  * target_if_green_ap_enable_egap() - enable enhanced green ap
73*5113495bSYour Name  * @pdev: pdev pointer
74*5113495bSYour Name  * @egap_params: enhanced green ap params
75*5113495bSYour Name  *
76*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS in case of success
77*5113495bSYour Name  */
78*5113495bSYour Name QDF_STATUS target_if_green_ap_enable_egap(
79*5113495bSYour Name 		struct wlan_objmgr_pdev *pdev,
80*5113495bSYour Name 		struct wlan_green_ap_egap_params *egap_params);
81*5113495bSYour Name 
82*5113495bSYour Name /**
83*5113495bSYour Name  * target_if_green_ap_set_ps_on_off() - Green AP PS toggle
84*5113495bSYour Name  * @pdev: pdev pointer
85*5113495bSYour Name  * @value: Value to send PS on/off to FW
86*5113495bSYour Name  * @pdev_id: pdev id
87*5113495bSYour Name  *
88*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS in case of success
89*5113495bSYour Name  */
90*5113495bSYour Name QDF_STATUS target_if_green_ap_set_ps_on_off(struct wlan_objmgr_pdev *pdev,
91*5113495bSYour Name 					    bool value, uint8_t pdev_id);
92*5113495bSYour Name 
93*5113495bSYour Name /**
94*5113495bSYour Name  * target_if_green_ap_get_current_channel() - Get current channel
95*5113495bSYour Name  * @pdev: pdev pointer
96*5113495bSYour Name  *
97*5113495bSYour Name  * Return: current channel freq
98*5113495bSYour Name  */
99*5113495bSYour Name uint16_t target_if_green_ap_get_current_channel(struct wlan_objmgr_pdev *pdev);
100*5113495bSYour Name 
101*5113495bSYour Name /**
102*5113495bSYour Name  * target_if_green_ap_get_current_channel_flags() - Get current channel flags
103*5113495bSYour Name  * @pdev: pdev pointer
104*5113495bSYour Name  *
105*5113495bSYour Name  * Return: current channel flags
106*5113495bSYour Name  */
107*5113495bSYour Name uint64_t target_if_green_ap_get_current_channel_flags(
108*5113495bSYour Name 				struct wlan_objmgr_pdev *pdev);
109*5113495bSYour Name 
110*5113495bSYour Name /**
111*5113495bSYour Name  * target_if_green_ap_reset_dev() - Reset dev
112*5113495bSYour Name  * @pdev: pdev pointer
113*5113495bSYour Name  *
114*5113495bSYour Name  * Return:  QDF_STATUS_SUCCESS if device reset
115*5113495bSYour Name  */
116*5113495bSYour Name QDF_STATUS target_if_green_ap_reset_dev(struct wlan_objmgr_pdev *pdev);
117*5113495bSYour Name 
118*5113495bSYour Name #endif
119