xref: /wlan-driver/qca-wifi-host-cmn/umac/cmn_services/mgmt_txrx/dispatcher/inc/cfg_mgmt_rx_reo.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 /**
19  *  DOC: cfg_mgmt_rx_reo.h
20  *  This file contains cfg definitions of mgmt rx reo sub-component
21  */
22 
23 #ifndef __CFG_MGMT_RX_REO_H
24 #define __CFG_MGMT_RX_REO_H
25 
26 #ifdef WLAN_MGMT_RX_REO_SUPPORT
27 
28 /*
29  * <ini>
30  * mgmt_rx_reo_enable - Enable MGMT Rx REO feature
31  * @Min: 0
32  * @Max: 1
33  * @Default: 0
34  *
35  * This ini is used to enable MGMT Rx REO feature
36  *
37  * Related: None
38  *
39  * Supported Feature: MGMT Rx REO
40  *
41  * Usage: External
42  *
43  * </ini>
44  */
45 #define CFG_MGMT_RX_REO_ENABLE \
46 	CFG_INI_BOOL("mgmt_rx_reo_enable", false, \
47 			"Enable MGMT Rx REO feature")
48 
49 /*
50  * <ini>
51  * mgmt_rx_reo_scheduler_enable - Enable MGMT Rx REO scheduler
52  * @Min: 0
53  * @Max: 1
54  * @Default: 0
55  *
56  * This ini is used to enable MGMT Rx REO scheduler
57  *
58  * Related: None
59  *
60  * Supported Feature: MGMT Rx REO
61  *
62  * Usage: External
63  *
64  * </ini>
65  */
66 #define CFG_MGMT_RX_REO_SCHEDULER_ENABLE \
67 	CFG_INI_BOOL("mgmt_rx_reo_scheduler_enable", false, \
68 			"Enable MGMT Rx REO scheduler")
69 
70 /*
71  * <ini>
72  * mgmt_rx_reo_pkt_ctr_delta_thresh - Packet counter delta threshold
73  * @Min: 0
74  * @Max: 0xFFFF
75  * @Default: 0
76  *
77  * This ini is used to configure the maximum allowed delta between subsequent
78  * management frames of a given link. Configurations are as follows:
79  * 0 - No restrictions in the delta value
80  * >= 1 - Assert the system if the delta between the packet counter values of
81  * subsequent frames of a given link crosses this value.
82  *
83  * Related: None
84  *
85  * Supported Feature: MGMT Rx REO
86  *
87  * Usage: External
88  *
89  * </ini>
90  */
91 #define CFG_MGMT_RX_REO_PKT_CTR_DELTA_THRESH CFG_INI_UINT(\
92 		"mgmt_rx_reo_pkt_ctr_delta_thresh",\
93 		0, 0xFFFF, 0,\
94 		CFG_VALUE_OR_DEFAULT, "Packet counter delta threshold")
95 
96 /*
97  * <ini>
98  * mgmt_rx_reo_ingress_frame_debug_list_size - Size of the list which logs the
99  * incoming management frames
100  * @Min: 0
101  * @Max: WLAN_MGMT_RX_REO_INGRESS_FRAME_DEBUG_LIST_SIZE_MAX
102  * @Default: WLAN_MGMT_RX_REO_INGRESS_FRAME_DEBUG_LIST_SIZE_DEFAULT
103  *
104  * This ini is used to configure the size of the list which logs the incoming
105  * management frames.
106  *
107  * Related: None
108  *
109  * Supported Feature: MGMT Rx REO
110  *
111  * Usage: External
112  *
113  * </ini>
114  */
115 #define CFG_MGMT_RX_REO_INGRESS_FRAME_DEBUG_LIST_SIZE CFG_INI_UINT(\
116 		"mgmt_rx_reo_ingress_frame_debug_list_size",\
117 		0, WLAN_MGMT_RX_REO_INGRESS_FRAME_DEBUG_LIST_SIZE_MAX,\
118 		WLAN_MGMT_RX_REO_INGRESS_FRAME_DEBUG_LIST_SIZE_DEFAULT,\
119 		CFG_VALUE_OR_CLAMP, "Size of ingress frame debug list")
120 
121 /*
122  * <ini>
123  * mgmt_rx_reo_egress_frame_debug_list_size - Size of the list which logs the
124  * outgoing management frames
125  * @Min: 0
126  * @Max: WLAN_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE_MAX
127  * @Default: WLAN_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE_DEFAULT
128  *
129  * This ini is used to configure the size of the list which logs the outgoing
130  * management frames.
131  *
132  * Related: None
133  *
134  * Supported Feature: MGMT Rx REO
135  *
136  * Usage: External
137  *
138  * </ini>
139  */
140 #define CFG_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE CFG_INI_UINT(\
141 		"mgmt_rx_reo_egress_frame_debug_list_size",\
142 		0, WLAN_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE_MAX,\
143 		WLAN_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE_DEFAULT,\
144 		CFG_VALUE_OR_CLAMP, "Size of egress frame debug list")
145 
146 /*
147  * <ini>
148  * mgmt_rx_reo_scheduler_debug_list_size - Size of the list which logs the
149  * frames which are scheduled by management rx reorder scheduler
150  * @Min: 0
151  * @Max: WLAN_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE_MAX
152  * @Default: WLAN_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE_DEFAULT
153  *
154  * This ini is used to configure the size of the list which logs the frames
155  * which are scheduled by management rx reorder scheduler
156  *
157  * Related: None
158  *
159  * Supported Feature: MGMT Rx REO
160  *
161  * Usage: External
162  *
163  * </ini>
164  */
165 #define CFG_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE CFG_INI_UINT(\
166 		"mgmt_rx_reo_scheduler_debug_list_size",\
167 		0, WLAN_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE_MAX,\
168 		WLAN_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE_DEFAULT,\
169 		CFG_VALUE_OR_CLAMP, "Size of scheduler debug list")
170 
171 #ifdef WLAN_MGMT_RX_REO_DEBUG_SUPPORT
172 #define CFG_MGMT_RX_REO_DEBUG_ALL \
173 	CFG(CFG_MGMT_RX_REO_INGRESS_FRAME_DEBUG_LIST_SIZE) \
174 	CFG(CFG_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE) \
175 	CFG(CFG_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE)
176 #else
177 #define CFG_MGMT_RX_REO_DEBUG_ALL
178 #endif /* WLAN_MGMT_RX_REO_DEBUG_SUPPORT */
179 
180 #define CFG_MGMT_RX_REO_ALL \
181 	CFG(CFG_MGMT_RX_REO_ENABLE) \
182 	CFG(CFG_MGMT_RX_REO_SCHEDULER_ENABLE) \
183 	CFG(CFG_MGMT_RX_REO_PKT_CTR_DELTA_THRESH) \
184 	CFG_MGMT_RX_REO_DEBUG_ALL
185 
186 #else
187 
188 #define CFG_MGMT_RX_REO_ALL
189 
190 #endif /* WLAN_MGMT_RX_REO_SUPPORT */
191 #endif /* __CFG_MGMT_RX_REO_H */
192