xref: /wlan-driver/qcacld-3.0/components/denylist_mgr/dispatcher/inc/cfg_dlm.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: This file contains ini params for denylist mgr component
22  */
23 
24 #ifndef __CFG_DLM_H_
25 #define __CFG_DLM_H_
26 
27 #ifdef FEATURE_DENYLIST_MGR
28 
29 /*
30  * <ini>
31  * avoid_list_expiry_time - Config Param to move AP from avoid to monitor list.
32  * @Min: 1 minutes
33  * @Max: 300 minutes
34  * @Default: 5 minutes
35  *
36  * This ini is used to specify the time after which the BSSID which is in the
37  * avoid list should be moved to monitor list, assuming that the AP or the
38  * gateway with which the data stall happenend might have recovered, and now
39  * the STA can give another chance to connect to the AP.
40  *
41  * Supported Feature: Data Stall Recovery
42  *
43  * Usage: External
44  *
45  * </ini>
46  */
47 #define CFG_AVOID_LIST_EXPIRY_TIME CFG_INI_UINT( \
48 				"avoid_list_expiry_time", \
49 				1, \
50 				300, \
51 				5, \
52 				CFG_VALUE_OR_DEFAULT, \
53 				"avoid list expiry")
54 
55 /*
56  * <ini>
57  * bad_bssid_counter_thresh - Threshold to move the Ap from avoid to denylist.
58  * @Min: 2
59  * @Max: 100
60  * @Default: 3
61  *
62  * This ini is used to specify the threshld after which the BSSID which is in
63  * the avoid list should be moved to deny list, assuming that the AP or the
64  * gateway with which the data stall happenend has no recovered, and now
65  * the STA got the NUD failure again with the BSSID
66  *
67  * Supported Feature: Data Stall Recovery
68  *
69  * Usage: External
70  *
71  * </ini>
72  */
73 #define CFG_BAD_BSSID_COUNTER_THRESHOLD CFG_INI_UINT( \
74 				"bad_bssid_counter_thresh", \
75 				2, \
76 				100, \
77 				3, \
78 				CFG_VALUE_OR_DEFAULT, \
79 				"bad bssid counter thresh")
80 
81 /*
82  * <ini>
83  * deny_list_expiry_time - Config Param to move AP from denylist to monitor
84  * list.
85  * @Min: 1 minutes
86  * @Max: 600 minutes
87  * @Default: 10 minutes
88  *
89  * This ini is used to specify the time after which the BSSID which is in the
90  * deny list should be moved to monitor list, assuming that the AP or the
91  * gateway with which the data stall happenend might have recovered, and now
92  * the STA can give another chance to connect to the AP.
93  *
94  * Supported Feature: Data Stall Recovery
95  *
96  * Usage: External
97  *
98  * </ini>
99  */
100 #define CFG_DENY_LIST_EXPIRY_TIME CFG_INI_UINT( \
101 				"black_list_expiry_time", \
102 				1, \
103 				600, \
104 				10, \
105 				CFG_VALUE_OR_DEFAULT, \
106 				"deny list expiry")
107 
108 /*
109  * <ini>
110  * bad_bssid_reset_time - Config Param to specify time after which AP would be
111  * removed from monitor/avoid when connected.
112  * @Min: 30 seconds
113  * @Max: 1 minute
114  * @Default: 30 seconds
115  *
116  * This ini is used to specify the time after which the BSSID which is in the
117  * avoid or monitor list should be removed from the respective list, if the
118  * data stall has not happened till the mentioned time after connection to the
119  * AP. That means that the AP has recovered from the previous state where
120  * data stall was observed with it, and was moved to avoid list.
121  *
122  * Supported Feature: Data Stall Recovery
123  *
124  * Usage: External
125  *
126  * </ini>
127  */
128 #define CFG_BAD_BSSID_RESET_TIME CFG_INI_UINT( \
129 				"bad_bssid_reset_time", \
130 				30, \
131 				60, \
132 				30, \
133 				CFG_VALUE_OR_DEFAULT, \
134 				"bad bssid reset time")
135 
136 /*
137  * <ini>
138  * delta_rssi - RSSI threshold value, only when AP rssi improves
139  * by threshold value entry would be removed from denylist manager and assoc
140  * req would be sent by FW.
141  * @Min: 0
142  * @Max: 10
143  * @Default: 5
144  *
145  * This ini is used to specify the rssi threshold value, after rssi improves
146  * by threshold the BSSID which is in the denylist manager list should be
147  * removed from the respective list.
148  *
149  * Supported Feature: Customer requirement
150  *
151  * Usage: Internal/External
152  *
153  * </ini>
154  */
155 #define CFG_DENYLIST_RSSI_THRESHOLD CFG_INI_INT( \
156 			"delta_rssi", \
157 			0, \
158 			10, \
159 			5, \
160 			CFG_VALUE_OR_DEFAULT, \
161 			"Configure delta RSSI")
162 
163 #define CFG_DENYLIST_MGR_ALL \
164 	CFG(CFG_AVOID_LIST_EXPIRY_TIME) \
165 	CFG(CFG_BAD_BSSID_COUNTER_THRESHOLD) \
166 	CFG(CFG_DENY_LIST_EXPIRY_TIME) \
167 	CFG(CFG_BAD_BSSID_RESET_TIME) \
168 	CFG(CFG_DENYLIST_RSSI_THRESHOLD)
169 
170 #else
171 
172 #define CFG_DENYLIST_MGR_ALL
173 
174 #endif /* FEATURE_DENYLIST_MGR */
175 
176 #endif /* __CFG_DENYLIST_MGR */
177