xref: /wlan-driver/qca-wifi-host-cmn/target_if/twt/inc/target_if_twt.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name  * above copyright notice and this permission notice appear in all
7*5113495bSYour Name  * copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name  */
18*5113495bSYour Name 
19*5113495bSYour Name /**
20*5113495bSYour Name  * DOC: target_if_twt.h
21*5113495bSYour Name  */
22*5113495bSYour Name 
23*5113495bSYour Name #ifndef _TARGET_IF_TWT_H_
24*5113495bSYour Name #define _TARGET_IF_TWT_H_
25*5113495bSYour Name 
26*5113495bSYour Name #include <wmi_unified_param.h>
27*5113495bSYour Name #include <wlan_lmac_if_def.h>
28*5113495bSYour Name #include <target_if.h>
29*5113495bSYour Name #include <wlan_twt_public_structs.h>
30*5113495bSYour Name 
31*5113495bSYour Name #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
32*5113495bSYour Name /**
33*5113495bSYour Name  * target_if_twt_set_twt_ack_support() - set ack support
34*5113495bSYour Name  * @psoc: psoc handle
35*5113495bSYour Name  * @val: value
36*5113495bSYour Name  *
37*5113495bSYour Name  * return: QDF_STATUS
38*5113495bSYour Name  */
39*5113495bSYour Name QDF_STATUS
40*5113495bSYour Name target_if_twt_set_twt_ack_support(struct wlan_objmgr_psoc *psoc,
41*5113495bSYour Name 				  bool val);
42*5113495bSYour Name 
43*5113495bSYour Name /**
44*5113495bSYour Name  * target_if_twt_fill_tgt_caps() - fill twt target caps
45*5113495bSYour Name  * @psoc: psoc handle
46*5113495bSYour Name  * @wmi_handle: wmi handle
47*5113495bSYour Name  *
48*5113495bSYour Name  * This function populates twt target capability info in twt private psoc object
49*5113495bSYour Name  *
50*5113495bSYour Name  * return: QDF_STATUS
51*5113495bSYour Name  */
52*5113495bSYour Name QDF_STATUS
53*5113495bSYour Name target_if_twt_fill_tgt_caps(struct wlan_objmgr_psoc *psoc,
54*5113495bSYour Name 			    wmi_unified_t wmi_handle);
55*5113495bSYour Name 
56*5113495bSYour Name /**
57*5113495bSYour Name  * target_if_twt_register_tx_ops() - Register twt tx ops
58*5113495bSYour Name  * @tx_ops: tx_ops structure
59*5113495bSYour Name  *
60*5113495bSYour Name  * return: QDF_STATUS
61*5113495bSYour Name  */
62*5113495bSYour Name QDF_STATUS
63*5113495bSYour Name target_if_twt_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
64*5113495bSYour Name 
65*5113495bSYour Name /**
66*5113495bSYour Name  * target_if_twt_register_events() - Register twt wmi events
67*5113495bSYour Name  * @psoc: psoc handle
68*5113495bSYour Name  *
69*5113495bSYour Name  * Register TWT WMI events
70*5113495bSYour Name  *
71*5113495bSYour Name  * return: QDF_STATUS
72*5113495bSYour Name  */
73*5113495bSYour Name QDF_STATUS
74*5113495bSYour Name target_if_twt_register_events(struct wlan_objmgr_psoc *psoc);
75*5113495bSYour Name 
76*5113495bSYour Name /**
77*5113495bSYour Name  * target_if_twt_deregister_events() - De-register twt wmi events
78*5113495bSYour Name  * @psoc: psoc handle
79*5113495bSYour Name  *
80*5113495bSYour Name  * De-register TWT WMI events
81*5113495bSYour Name  *
82*5113495bSYour Name  * return: QDF_STATUS
83*5113495bSYour Name  */
84*5113495bSYour Name QDF_STATUS
85*5113495bSYour Name target_if_twt_deregister_events(struct wlan_objmgr_psoc *psoc);
86*5113495bSYour Name 
87*5113495bSYour Name #else
88*5113495bSYour Name static inline
target_if_twt_set_twt_ack_support(struct wlan_objmgr_psoc * psoc,bool val)89*5113495bSYour Name QDF_STATUS target_if_twt_set_twt_ack_support(struct wlan_objmgr_psoc *psoc,
90*5113495bSYour Name 					     bool val)
91*5113495bSYour Name {
92*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
93*5113495bSYour Name }
94*5113495bSYour Name 
95*5113495bSYour Name static inline
target_if_twt_fill_tgt_caps(struct wlan_objmgr_psoc * psoc,wmi_unified_t wmi_handle)96*5113495bSYour Name QDF_STATUS target_if_twt_fill_tgt_caps(struct wlan_objmgr_psoc *psoc,
97*5113495bSYour Name 				       wmi_unified_t wmi_handle)
98*5113495bSYour Name {
99*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
100*5113495bSYour Name }
101*5113495bSYour Name 
102*5113495bSYour Name static inline
target_if_twt_register_tx_ops(struct wlan_lmac_if_tx_ops * tx_ops)103*5113495bSYour Name QDF_STATUS target_if_twt_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
104*5113495bSYour Name {
105*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
106*5113495bSYour Name }
107*5113495bSYour Name 
108*5113495bSYour Name static inline
target_if_twt_register_events(struct wlan_objmgr_psoc * psoc)109*5113495bSYour Name QDF_STATUS target_if_twt_register_events(struct wlan_objmgr_psoc *psoc)
110*5113495bSYour Name {
111*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
112*5113495bSYour Name }
113*5113495bSYour Name 
114*5113495bSYour Name static inline
target_if_twt_deregister_events(struct wlan_objmgr_psoc * psoc)115*5113495bSYour Name QDF_STATUS target_if_twt_deregister_events(struct wlan_objmgr_psoc *psoc)
116*5113495bSYour Name {
117*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
118*5113495bSYour Name }
119*5113495bSYour Name 
120*5113495bSYour Name #endif
121*5113495bSYour Name #endif /* _TARGET_IF_TWT_H_ */
122