xref: /wlan-driver/qcacld-3.0/components/denylist_mgr/dispatcher/inc/cfg_dlm.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2021-2023 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: This file contains ini params for denylist mgr component
22*5113495bSYour Name  */
23*5113495bSYour Name 
24*5113495bSYour Name #ifndef __CFG_DLM_H_
25*5113495bSYour Name #define __CFG_DLM_H_
26*5113495bSYour Name 
27*5113495bSYour Name #ifdef FEATURE_DENYLIST_MGR
28*5113495bSYour Name 
29*5113495bSYour Name /*
30*5113495bSYour Name  * <ini>
31*5113495bSYour Name  * avoid_list_expiry_time - Config Param to move AP from avoid to monitor list.
32*5113495bSYour Name  * @Min: 1 minutes
33*5113495bSYour Name  * @Max: 300 minutes
34*5113495bSYour Name  * @Default: 5 minutes
35*5113495bSYour Name  *
36*5113495bSYour Name  * This ini is used to specify the time after which the BSSID which is in the
37*5113495bSYour Name  * avoid list should be moved to monitor list, assuming that the AP or the
38*5113495bSYour Name  * gateway with which the data stall happenend might have recovered, and now
39*5113495bSYour Name  * the STA can give another chance to connect to the AP.
40*5113495bSYour Name  *
41*5113495bSYour Name  * Supported Feature: Data Stall Recovery
42*5113495bSYour Name  *
43*5113495bSYour Name  * Usage: External
44*5113495bSYour Name  *
45*5113495bSYour Name  * </ini>
46*5113495bSYour Name  */
47*5113495bSYour Name #define CFG_AVOID_LIST_EXPIRY_TIME CFG_INI_UINT( \
48*5113495bSYour Name 				"avoid_list_expiry_time", \
49*5113495bSYour Name 				1, \
50*5113495bSYour Name 				300, \
51*5113495bSYour Name 				5, \
52*5113495bSYour Name 				CFG_VALUE_OR_DEFAULT, \
53*5113495bSYour Name 				"avoid list expiry")
54*5113495bSYour Name 
55*5113495bSYour Name /*
56*5113495bSYour Name  * <ini>
57*5113495bSYour Name  * bad_bssid_counter_thresh - Threshold to move the Ap from avoid to denylist.
58*5113495bSYour Name  * @Min: 2
59*5113495bSYour Name  * @Max: 100
60*5113495bSYour Name  * @Default: 3
61*5113495bSYour Name  *
62*5113495bSYour Name  * This ini is used to specify the threshld after which the BSSID which is in
63*5113495bSYour Name  * the avoid list should be moved to deny list, assuming that the AP or the
64*5113495bSYour Name  * gateway with which the data stall happenend has no recovered, and now
65*5113495bSYour Name  * the STA got the NUD failure again with the BSSID
66*5113495bSYour Name  *
67*5113495bSYour Name  * Supported Feature: Data Stall Recovery
68*5113495bSYour Name  *
69*5113495bSYour Name  * Usage: External
70*5113495bSYour Name  *
71*5113495bSYour Name  * </ini>
72*5113495bSYour Name  */
73*5113495bSYour Name #define CFG_BAD_BSSID_COUNTER_THRESHOLD CFG_INI_UINT( \
74*5113495bSYour Name 				"bad_bssid_counter_thresh", \
75*5113495bSYour Name 				2, \
76*5113495bSYour Name 				100, \
77*5113495bSYour Name 				3, \
78*5113495bSYour Name 				CFG_VALUE_OR_DEFAULT, \
79*5113495bSYour Name 				"bad bssid counter thresh")
80*5113495bSYour Name 
81*5113495bSYour Name /*
82*5113495bSYour Name  * <ini>
83*5113495bSYour Name  * deny_list_expiry_time - Config Param to move AP from denylist to monitor
84*5113495bSYour Name  * list.
85*5113495bSYour Name  * @Min: 1 minutes
86*5113495bSYour Name  * @Max: 600 minutes
87*5113495bSYour Name  * @Default: 10 minutes
88*5113495bSYour Name  *
89*5113495bSYour Name  * This ini is used to specify the time after which the BSSID which is in the
90*5113495bSYour Name  * deny list should be moved to monitor list, assuming that the AP or the
91*5113495bSYour Name  * gateway with which the data stall happenend might have recovered, and now
92*5113495bSYour Name  * the STA can give another chance to connect to the AP.
93*5113495bSYour Name  *
94*5113495bSYour Name  * Supported Feature: Data Stall Recovery
95*5113495bSYour Name  *
96*5113495bSYour Name  * Usage: External
97*5113495bSYour Name  *
98*5113495bSYour Name  * </ini>
99*5113495bSYour Name  */
100*5113495bSYour Name #define CFG_DENY_LIST_EXPIRY_TIME CFG_INI_UINT( \
101*5113495bSYour Name 				"black_list_expiry_time", \
102*5113495bSYour Name 				1, \
103*5113495bSYour Name 				600, \
104*5113495bSYour Name 				10, \
105*5113495bSYour Name 				CFG_VALUE_OR_DEFAULT, \
106*5113495bSYour Name 				"deny list expiry")
107*5113495bSYour Name 
108*5113495bSYour Name /*
109*5113495bSYour Name  * <ini>
110*5113495bSYour Name  * bad_bssid_reset_time - Config Param to specify time after which AP would be
111*5113495bSYour Name  * removed from monitor/avoid when connected.
112*5113495bSYour Name  * @Min: 30 seconds
113*5113495bSYour Name  * @Max: 1 minute
114*5113495bSYour Name  * @Default: 30 seconds
115*5113495bSYour Name  *
116*5113495bSYour Name  * This ini is used to specify the time after which the BSSID which is in the
117*5113495bSYour Name  * avoid or monitor list should be removed from the respective list, if the
118*5113495bSYour Name  * data stall has not happened till the mentioned time after connection to the
119*5113495bSYour Name  * AP. That means that the AP has recovered from the previous state where
120*5113495bSYour Name  * data stall was observed with it, and was moved to avoid list.
121*5113495bSYour Name  *
122*5113495bSYour Name  * Supported Feature: Data Stall Recovery
123*5113495bSYour Name  *
124*5113495bSYour Name  * Usage: External
125*5113495bSYour Name  *
126*5113495bSYour Name  * </ini>
127*5113495bSYour Name  */
128*5113495bSYour Name #define CFG_BAD_BSSID_RESET_TIME CFG_INI_UINT( \
129*5113495bSYour Name 				"bad_bssid_reset_time", \
130*5113495bSYour Name 				30, \
131*5113495bSYour Name 				60, \
132*5113495bSYour Name 				30, \
133*5113495bSYour Name 				CFG_VALUE_OR_DEFAULT, \
134*5113495bSYour Name 				"bad bssid reset time")
135*5113495bSYour Name 
136*5113495bSYour Name /*
137*5113495bSYour Name  * <ini>
138*5113495bSYour Name  * delta_rssi - RSSI threshold value, only when AP rssi improves
139*5113495bSYour Name  * by threshold value entry would be removed from denylist manager and assoc
140*5113495bSYour Name  * req would be sent by FW.
141*5113495bSYour Name  * @Min: 0
142*5113495bSYour Name  * @Max: 10
143*5113495bSYour Name  * @Default: 5
144*5113495bSYour Name  *
145*5113495bSYour Name  * This ini is used to specify the rssi threshold value, after rssi improves
146*5113495bSYour Name  * by threshold the BSSID which is in the denylist manager list should be
147*5113495bSYour Name  * removed from the respective list.
148*5113495bSYour Name  *
149*5113495bSYour Name  * Supported Feature: Customer requirement
150*5113495bSYour Name  *
151*5113495bSYour Name  * Usage: Internal/External
152*5113495bSYour Name  *
153*5113495bSYour Name  * </ini>
154*5113495bSYour Name  */
155*5113495bSYour Name #define CFG_DENYLIST_RSSI_THRESHOLD CFG_INI_INT( \
156*5113495bSYour Name 			"delta_rssi", \
157*5113495bSYour Name 			0, \
158*5113495bSYour Name 			10, \
159*5113495bSYour Name 			5, \
160*5113495bSYour Name 			CFG_VALUE_OR_DEFAULT, \
161*5113495bSYour Name 			"Configure delta RSSI")
162*5113495bSYour Name 
163*5113495bSYour Name #define CFG_DENYLIST_MGR_ALL \
164*5113495bSYour Name 	CFG(CFG_AVOID_LIST_EXPIRY_TIME) \
165*5113495bSYour Name 	CFG(CFG_BAD_BSSID_COUNTER_THRESHOLD) \
166*5113495bSYour Name 	CFG(CFG_DENY_LIST_EXPIRY_TIME) \
167*5113495bSYour Name 	CFG(CFG_BAD_BSSID_RESET_TIME) \
168*5113495bSYour Name 	CFG(CFG_DENYLIST_RSSI_THRESHOLD)
169*5113495bSYour Name 
170*5113495bSYour Name #else
171*5113495bSYour Name 
172*5113495bSYour Name #define CFG_DENYLIST_MGR_ALL
173*5113495bSYour Name 
174*5113495bSYour Name #endif /* FEATURE_DENYLIST_MGR */
175*5113495bSYour Name 
176*5113495bSYour Name #endif /* __CFG_DENYLIST_MGR */
177