xref: /wlan-dirver/qca-wifi-host-cmn/umac/twt/dispatcher/inc/wlan_twt_ucfg_ext_cfg.h (revision 901120c066e139c7f8a2c8e4820561fdd83c67ef)
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
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 /**
20  * DOC: wlan_twt_ucfg_ext_cfg.h
21  * This file provides TWT ucfg cfg param related apis.
22  */
23 #ifndef _WLAN_TWT_UCFG_EXT_CFG_H_
24 #define _WLAN_TWT_UCFG_EXT_CFG_H_
25 
26 #include <wlan_objmgr_psoc_obj.h>
27 #include <wlan_twt_public_structs.h>
28 
29 /**
30  * ucfg_twt_cfg_get_requestor() - get TWT requestor
31  * @psoc: Pointer to global PSOC object
32  * @val: pointer to output variable
33  *
34  * Return: QDF_STATUS_SUCCESS
35  */
36 QDF_STATUS ucfg_twt_cfg_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
37 
38 /**
39  * ucfg_twt_cfg_get_responder() - get TWT responder
40  * @psoc: Pointer to global PSOC object
41  * @val: pointer to output variable
42  *
43  * Return: QDF_STATUS_SUCCESS
44  */
45 QDF_STATUS ucfg_twt_cfg_get_responder(struct wlan_objmgr_psoc *psoc, bool *val);
46 
47 /**
48  * ucfg_twt_cfg_get_congestion_timeout() - Get TWT congestion timeout
49  * @psoc: Pointer to global psoc object
50  * @val: pointer to output variable
51  *
52  * Return: QDF_STATUS_SUCCESS
53  */
54 QDF_STATUS
55 ucfg_twt_cfg_get_congestion_timeout(struct wlan_objmgr_psoc *psoc,
56 				    uint32_t *val);
57 
58 /**
59  * ucfg_twt_cfg_set_congestion_timeout() - Set TWT congestion timeout
60  * @psoc: Pointer to global psoc object
61  * @val: congestion timeout
62  *
63  * Return: QDF_STATUS_SUCCESS
64  */
65 QDF_STATUS
66 ucfg_twt_cfg_set_congestion_timeout(struct wlan_objmgr_psoc *psoc,
67 				    uint32_t val);
68 
69 /**
70  * ucfg_twt_cfg_get_24ghz_enabled() - Get TWT 24ghz enabled
71  * @psoc: Pointer to global psoc object
72  * @val: pointer to output variable
73  *
74  * Return: QDF_STATUS_SUCCESS
75  */
76 QDF_STATUS
77 ucfg_twt_cfg_get_24ghz_enabled(struct wlan_objmgr_psoc *psoc, bool *val);
78 
79 /**
80  * ucfg_twt_cfg_get_bcast_requestor() - Get TWT broadcast requestor
81  * @psoc: Pointer to global psoc object
82  * @val: pointer to output variable
83  *
84  * Return: QDF_STATUS_SUCCESS
85  */
86 QDF_STATUS
87 ucfg_twt_cfg_get_bcast_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
88 
89 /**
90  * ucfg_twt_cfg_get_flex_sched() - Get TWT flex scheduling
91  * @psoc: Pointer to global psoc object
92  * @val: pointer to output variable
93  *
94  * Return: QDF_STATUS_SUCCESS
95  */
96 QDF_STATUS
97 ucfg_twt_cfg_get_flex_sched(struct wlan_objmgr_psoc *psoc, bool *val);
98 #else
99 static inline
100 QDF_STATUS ucfg_twt_cfg_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
101 {
102 	*val = false;
103 	return QDF_STATUS_SUCCESS;
104 }
105 
106 static inline
107 QDF_STATUS ucfg_twt_cfg_get_responder(struct wlan_objmgr_psoc *psoc, bool *val)
108 {
109 	*val = false;
110 	return QDF_STATUS_SUCCESS;
111 }
112 
113 static inline
114 QDF_STATUS ucfg_twt_cfg_get_congestion_timeout(struct wlan_objmgr_psoc *psoc,
115 					       uint32_t *val)
116 {
117 	*val = 0;
118 	return QDF_STATUS_SUCCESS;
119 }
120 
121 static inline
122 QDF_STATUS ucfg_twt_cfg_set_congestion_timeout(struct wlan_objmgr_psoc *psoc,
123 					       uint32_t val)
124 {
125 	return QDF_STATUS_SUCCESS;
126 }
127 
128 static inline QDF_STATUS
129 ucfg_twt_cfg_get_24ghz_enabled(struct wlan_objmgr_psoc *psoc, bool *val)
130 {
131 	*val = false;
132 	return QDF_STATUS_SUCCESS;
133 }
134 
135 static inline QDF_STATUS
136 ucfg_twt_cfg_get_bcast_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
137 {
138 	*val = false;
139 	return QDF_STATUS_SUCCESS;
140 }
141 
142 static inline QDF_STATUS
143 ucfg_twt_cfg_get_flex_sched(struct wlan_objmgr_psoc *psoc, bool *val)
144 {
145 	*val = false;
146 	return QDF_STATUS_SUCCESS;
147 }
148 
149 #endif /* _WLAN_TWT_UCFG_EXT_CFG_H_ */
150