xref: /wlan-driver/qcacld-3.0/components/mlme/dispatcher/inc/cfg_mlme_stats.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2012-2020 The Linux Foundation. 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: This file contains centralized definitions of converged configuration.
21  */
22 
23 #ifndef __CFG_MLME_STATS_H
24 #define __CFG_MLME_STATS_H
25 
26 enum mlme_stats_link_speed_rpt_type {
27 	CFG_STATS_LINK_SPEED_REPORT_ACTUAL = 0,
28 	CFG_STATS_LINK_SPEED_REPORT_MAX = 1,
29 	CFG_STATS_LINK_SPEED_REPORT_MAX_SCALED = 2,
30 };
31 
32 /*
33  * <ini>
34  * periodic_stats_display_time - time(seconds) after which stats will be printed
35  * @Min: 0
36  * @Max: 256
37  * @Default: 10
38  *
39  * This values specifies the recurring time period after which stats will be
40  * printed in wlan driver logs.
41  *
42  * Usage: Internal / External
43  *
44  * </ini>
45  */
46 #define CFG_PERIODIC_STATS_DISPLAY_TIME CFG_INI_UINT( \
47 		"periodic_stats_display_time", \
48 		0, \
49 		256, \
50 		10, \
51 		CFG_VALUE_OR_DEFAULT, \
52 		"time after which stats will be printed")
53 
54 /*
55  * <ini>
56  * gLinkSpeedRssiMed - Used when eHDD_LINK_SPEED_REPORT_SCALED is selected
57  * @Min: -127
58  * @Max: 0
59  * @Default: -65
60  *
61  * This ini is used to set medium rssi link speed
62  *
63  * Related: None
64  *
65  * Supported Feature: STA
66  *
67  * Usage: Internal / External
68  *
69  * </ini>
70  */
71 #define CFG_LINK_SPEED_RSSI_MID CFG_INI_INT( \
72 		"gLinkSpeedRssiMed", \
73 		-127, \
74 		0, \
75 		-65, \
76 		CFG_VALUE_OR_DEFAULT, \
77 		"medium rssi link speed")
78 
79 /*
80  * <ini>
81  * gReportMaxLinkSpeed - Max link speed
82  * @Min: CFG_STATS_LINK_SPEED_REPORT_ACTUAL
83  * @Max: CFG_STATS_LINK_SPEED_REPORT_MAX_SCALED
84  * @Default: CFG_STATS_LINK_SPEED_REPORT_ACTUAL
85  *
86  * This ini is used to set Max link speed
87  *
88  * Related: None
89  *
90  * Supported Feature: STA
91  *
92  * Usage: Internal / External
93  *
94  * </ini>
95  */
96 #define CFG_REPORT_MAX_LINK_SPEED CFG_INI_UINT( \
97 		"gReportMaxLinkSpeed", \
98 		CFG_STATS_LINK_SPEED_REPORT_ACTUAL, \
99 		CFG_STATS_LINK_SPEED_REPORT_MAX_SCALED, \
100 		CFG_STATS_LINK_SPEED_REPORT_ACTUAL, \
101 		CFG_VALUE_OR_DEFAULT, \
102 		"Max link speed")
103 
104 /*
105  * <ini>
106  * gLinkSpeedRssiLow - Used when eHDD_LINK_SPEED_REPORT_SCALED is selected
107  * @Min: -127
108  * @Max: 0
109  * @Default: -80
110  *
111  * This ini is used to set low rssi link speed
112  *
113  * Related: None
114  *
115  * Supported Feature: STA
116  *
117  * Usage: Internal / External
118  *
119  * </ini>
120  */
121 #define CFG_LINK_SPEED_RSSI_LOW CFG_INI_INT( \
122 		"gLinkSpeedRssiLow", \
123 		-127, \
124 		0, \
125 		-80, \
126 		CFG_VALUE_OR_DEFAULT, \
127 		"low rssi link speed")
128 
129 /*
130  * <ini>
131  * gLinkSpeedRssiHigh - Report the max possible speed with RSSI scaling
132  * @Min: -127
133  * @Max: 0
134  * @Default: -55
135  *
136  * This ini is used to set default eHDD_LINK_SPEED_REPORT
137  * Used when eHDD_LINK_SPEED_REPORT_SCALED is selected
138  *
139  * Related: None
140  *
141  * Supported Feature: STA
142  *
143  * Usage: Internal / External
144  *
145  * </ini>
146  */
147 #define CFG_LINK_SPEED_RSSI_HIGH CFG_INI_INT( \
148 		"gLinkSpeedRssiHigh", \
149 		-127, \
150 		0, \
151 		-55, \
152 		CFG_VALUE_OR_DEFAULT, \
153 		"max possible rssi link speed")
154 
155 #define CFG_STATS_ALL \
156 	CFG(CFG_PERIODIC_STATS_DISPLAY_TIME) \
157 	CFG(CFG_LINK_SPEED_RSSI_HIGH) \
158 	CFG(CFG_LINK_SPEED_RSSI_MID) \
159 	CFG(CFG_LINK_SPEED_RSSI_LOW) \
160 	CFG(CFG_REPORT_MAX_LINK_SPEED)
161 
162 #endif /* __CFG_MLME_STATS_H */
163