xref: /wlan-dirver/qca-wifi-host-cmn/umac/scan/dispatcher/inc/cfg_scan.h (revision 10fe6982eb7194813d8d8335da336bbcd531b22e)
1 /*
2  * Copyright (c) 2012-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
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 centralized definitions of SCAN component
22  */
23 #ifndef __CONFIG_SCAN_H
24 #define __CONFIG_SCAN_H
25 
26 #include "cfg_define.h"
27 
28 /**
29  * enum scan_mode_6ghz - scan mode for 6GHz
30  * @SCAN_MODE_6G_NO_CHANNEL: Remove 6GHz channels in the scan request
31  * @SCAN_MODE_6G_PSC_CHANNEL: Scan only 6Ghz PSC channels and non-PSC
32  *                            through RNR IE
33  * @SCAN_MODE_6G_ALL_CHANNEL: Scan all the 6Ghz channels
34  * @SCAN_MODE_6G_RNR_ONLY: Scan the channels (both PSC and non-PSC) found in
35  *  RNR-IEs while scanning 2g and 5g bands. Host fills all PSC and non-PSC
36  *  channels in the scan request and set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND
37  *  for each channel.
38  * @SCAN_MODE_6G_PSC_DUTY_CYCLE: Scan the complete PSC channel list for every
39  *  duty cycle. For every duty cycle scan, host fills all 6g channels and sets
40  *  the flag FLAG_SCAN_ONLY_IF_RNR_FOUND only for non-PSC channels. Rest of the
41  *  scans will be done only on RNR channels (PSC and non-PSC).
42  * @SCAN_MODE_6G_ALL_DUTY_CYCLE: Scan the complete 6g(PSC and non-PSC) channel
43  *  list for every duty cycle. For every duty cycle scan, host fills all 6g
44  *  channels and doesn't set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for any 6g
45  *  (PSC/non-PSC) channels. Rest of the scans will be done only on RNR (PSC and
46  *  non-PSC channels).
47  * @SCAN_MODE_6G_MAX: Max enumeration
48  */
49 enum scan_mode_6ghz {
50 	SCAN_MODE_6G_NO_CHANNEL,
51 	SCAN_MODE_6G_PSC_CHANNEL,
52 	SCAN_MODE_6G_ALL_CHANNEL,
53 	SCAN_MODE_6G_RNR_ONLY,
54 	SCAN_MODE_6G_PSC_DUTY_CYCLE,
55 	SCAN_MODE_6G_ALL_DUTY_CYCLE,
56 	SCAN_MODE_6G_MAX = SCAN_MODE_6G_ALL_DUTY_CYCLE,
57 };
58 
59 /*
60  * <ini>
61  * drop_bcn_on_chan_mismatch - drop the beacon for chan mismatch
62  * @Min: 0
63  * @Max: 1
64  * @Default: 1
65  *
66  * This ini is used to decide drop the beacon or not if channel received
67  * in metadata doesn't match the one in beacon.
68  *
69  * Related: None
70  *
71  * Usage: External
72  *
73  * </ini>
74  */
75 #define CFG_DROP_BCN_ON_CHANNEL_MISMATCH CFG_INI_BOOL(\
76 		"drop_bcn_on_chan_mismatch",\
77 		true,\
78 		"drop bcn on channel mismatch")
79 
80 /*
81  * <ini>
82  * drop_bcn_on_invalid_freq - drop the beacon or probe resp with invalid freq
83  * @Min: 0
84  * @Max: 1
85  * @Default: 1
86  *
87  * This ini is used to decide whether to drop the beacon/probe resp or not
88  * if channel received in DS param, HT info and HE IE is invalid.
89  *
90  * Related: None
91  *
92  * Usage: External
93  *
94  * </ini>
95  */
96 #define CFG_DROP_BCN_ON_INVALID_FREQ CFG_INI_BOOL(\
97 		"drop_bcn_on_invalid_freq",\
98 		true,\
99 		"drop bcn on invalid freq in HT, DS, HE IE")
100 
101 /*
102  * <ini>
103  * gActiveMaxChannelTime - Set max channel time for active scan
104  * @Min: 0
105  * @Max: 10000
106  * @Default: 40
107  *
108  * This ini is used to set maximum channel time in msecs spent in
109  * active scan
110  *
111  * Related: None
112  *
113  * Usage: External
114  *
115  * </ini>
116  */
117 #define CFG_ACTIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
118 		"gActiveMaxChannelTime",\
119 		0, 10000, PLATFORM_VALUE(40, 105),\
120 		CFG_VALUE_OR_DEFAULT, "active dwell time")
121 
122 /*
123  * <ini>
124  * gEnableDFSChnlScan - Enable/Disable scan on DFS channels
125  * @Min: 0
126  * @Max: 1
127  * @Default: 1
128  *
129  * This ini is used to enable/disable scan on DFS channels.
130  *
131  * Related: Scan
132  *
133  * Usage: External
134  *
135  * </ini>
136  */
137 #define CFG_ENABLE_DFS_SCAN CFG_INI_BOOL( \
138 				"gEnableDFSChnlScan", \
139 				true, \
140 				"enable dfs scan")
141 
142 /*
143  * <ini>
144  * gInitialScanNoDFSChnl - Exclude DFS channels in first scan
145  * @Min: 0
146  * @Max: 1
147  * @Default: 0
148  *
149  * This ini is used to enable/disable scan on DFS channels, in first scan only
150  *
151  * Related: Scan
152  *
153  * Usage: External
154  *
155  * </ini>
156  */
157 #define CFG_INITIAL_NO_DFS_SCAN CFG_INI_BOOL( \
158 				"gInitialScanNoDFSChnl", \
159 				false, \
160 				"disable initial dfs scan")
161 
162 /*
163  * <ini>
164  * active_max_channel_time_2g - Set max time for active 2G channel scan
165  * @Min: 0
166  * @Max: 10000
167  * @Default: 80
168  *
169  * This ini is used to set maximum time in msecs spent in active 2G channel scan
170  * if it's not zero, in case of zero, CFG_ACTIVE_MAX_CHANNEL_TIME is used for 2G
171  * channels also.
172  *
173  * Related: None
174  *
175  * Usage: External
176  *
177  * </ini>
178  */
179 #define CFG_ACTIVE_MAX_2G_CHANNEL_TIME CFG_INI_UINT(\
180 		"active_max_channel_time_2g",\
181 		0, 10000, PLATFORM_VALUE(80, 0),\
182 		CFG_VALUE_OR_DEFAULT, "active dwell time for 2G channels")
183 
184 /*
185  * <ini>
186  * min_channel_time_6g - Set min dwell time for 6G channels scan
187  * @Min: 5
188  * @Max: 60
189  * @Default: 25
190  *
191  * This ini is used to set minimum time in msecs spent in 6G channels scan.
192  * Firmware will park on the 6G channel for this duration and if no FILS
193  * discovery, Beacon, Probe resp is received it will move to new channel after
194  * this duration. If found , it will wait for "active_max_channel_time_6g"
195  * duration
196  *
197  * Related: active_max_channel_time_6g
198  *
199  * Supported Feature: Scan
200  *
201  * Usage: External
202  *
203  * </ini>
204  */
205 #define CFG_MIN_6G_CHANNEL_TIME CFG_INI_UINT(\
206 		"min_dwell_time_6g",\
207 		5, 60, 25,\
208 		CFG_VALUE_OR_DEFAULT, "min dwell time for 6G channels")
209 
210 /*
211  * <ini>
212  * active_max_channel_time_6g - Set max time for active 6G channel scan
213  * @Min: 0
214  * @Max: 10000
215  * @Default: 60
216  *
217  * This ini is used to set maximum time in msecs spent in active 6G channel scan
218  *
219  *
220  * Related: None
221  *
222  * Supported Feature: Scan
223  *
224  * Usage: External
225  *
226  * </ini>
227  */
228 #define CFG_ACTIVE_MAX_6G_CHANNEL_TIME CFG_INI_UINT(\
229 		"active_max_channel_time_6g",\
230 		0, 10000, 60,\
231 		CFG_VALUE_OR_DEFAULT, "max active dwell time for 6G channels")
232 
233 /*
234  * <ini>
235  * passive_max_channel_time_6g - Set max time for passive 6G channel scan
236  * @Min: 0
237  * @Max: 10000
238  * @Default: 60
239  *
240  * This ini is used to set maximum time in msecs spent in passive 6G chan scan
241  *
242  * Related: None
243  *
244  * Supported Feature: Scan
245  *
246  * Usage: External
247  *
248  * </ini>
249  */
250 #define CFG_PASSIVE_MAX_6G_CHANNEL_TIME CFG_INI_UINT(\
251 		"passive_max_channel_time_6g",\
252 		0, 10000, 60,\
253 		CFG_VALUE_OR_DEFAULT, "max passive dwell time for 6G channels")
254 
255 /*
256  * <ini>
257  * active_max_channel_time_6g_conc - Set max time for active 6G
258  * channel scan when associated to AP.
259  * @Min: 0
260  * @Max: 10000
261  * @Default: 40
262  *
263  * This ini is used to set maximum time in msecs spent in
264  * active 6G channel scan
265  *
266  * Related: None
267  *
268  * Supported Feature: Scan
269  *
270  * Usage: External
271  *
272  * </ini>
273  */
274 #define CFG_ACTIVE_MAX_6G_CHANNEL_TIME_CONC CFG_INI_UINT(\
275 		"active_max_channel_time_6g_conc",\
276 		0, 10000, 40,\
277 		CFG_VALUE_OR_DEFAULT, "active conc dwell time for 6G channels")
278 
279 /*
280  * <ini>
281  * passive_max_channel_time_6g_conc - Set max time for passive 6G
282  * channel scan when associated to AP.
283  * @Min: 0
284  * @Max: 10000
285  * @Default: 40
286  *
287  * This ini is used to set maximum time in msecs spent in
288  * passive 6G chan scan
289  *
290  * Related: None
291  *
292  * Supported Feature: Scan
293  *
294  * Usage: External
295  *
296  * </ini>
297  */
298 #define CFG_PASSIVE_MAX_6G_CHANNEL_TIME_CONC CFG_INI_UINT(\
299 		"passive_max_channel_time_6g_conc",\
300 		0, 10000, 40,\
301 		CFG_VALUE_OR_DEFAULT,\
302 		"passive conc dwell time for 6G channels")
303 
304 /*
305  * <ini>
306  * gPassiveMaxChannelTime - Set max channel time for passive scan
307  * @Min: 0
308  * @Max: 10000
309  * @Default: 110
310  *
311  * This ini is used to set maximum channel time in msecs spent in
312  * passive scan
313  *
314  * Related: None
315  *
316  * Usage: External
317  *
318  * </ini>
319  */
320 #define CFG_PASSIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
321 		"gPassiveMaxChannelTime",\
322 		0, 10000, PLATFORM_VALUE(110, 300),\
323 		CFG_VALUE_OR_DEFAULT, "passive dwell time")
324 
325 /*
326  * <ini>
327  * gScanNumProbes - Set the number of probes on each channel for active scan
328  * @Min: 0
329  * @Max: 20
330  * @Default: 0
331  *
332  * This ini is used to set number of probes on each channel for
333  * active scan
334  */
335 #define CFG_SCAN_NUM_PROBES CFG_INI_UINT(\
336 			"gScanNumProbes",\
337 			0, 20, PLATFORM_VALUE(0, 2),\
338 			CFG_VALUE_OR_DEFAULT,\
339 			"number of probes on each channel")
340 
341 /*
342  * <ini>
343  * gScanProbeRepeatTime - Set the probe repeat time on each channel
344  * @Min: 0
345  * @Max: 30
346  * @Default: 0
347  *
348  * This ini is used to set probe repeat time on each channel for
349  * active scan
350  *
351  * Related: None
352  *
353  * Supported Feature: Scan
354  *
355  * Usage: External
356  *
357  * </ini>
358  */
359 #define CFG_SCAN_PROBE_REPEAT_TIME CFG_INI_UINT(\
360 			"gScanProbeRepeatTime",\
361 			0, 50, PLATFORM_VALUE(20, 50),\
362 			CFG_VALUE_OR_DEFAULT,\
363 			"probe repeat time on each channel")
364 
365 /*
366  * <ini>
367  * hostscan_adaptive_dwell_mode - Enable adaptive dwell mode
368  * during host scan with connection
369  * @Min: 0
370  * @Max: 4
371  * @Default: 1
372  *
373  * This ini will set the algo used in dwell time optimization
374  * during host scan with connection.
375  * See enum wmi_dwelltime_adaptive_mode.
376  * Acceptable values for this:
377  * 0: Default (Use firmware default mode)
378  * 1: Conservative optimization
379  * 2: Moderate optimization
380  * 3: Aggressive optimization
381  * 4: Static
382  *
383  * Related: None
384  *
385  * Supported Feature: Scan
386  *
387  * Usage: External
388  *
389  * </ini>
390  */
391 #define CFG_ADAPTIVE_SCAN_DWELL_MODE CFG_INI_UINT(\
392 			"hostscan_adaptive_dwell_mode",\
393 			0, 4, PLATFORM_VALUE(1, 0),\
394 			CFG_VALUE_OR_DEFAULT,\
395 			"Enable adaptive dwell mode")
396 
397 /*
398  * <ini>
399  * hostscan_adaptive_dwell_mode_no_conn - Enable adaptive dwell mode
400  * during host scan without connection
401  * @Min: 0
402  * @Max: 4
403  * @Default: 4
404  *
405  * This ini will set the algo used in dwell time optimization
406  * during host scan with connection.
407  * See enum wmi_dwelltime_adaptive_mode.
408  * Acceptable values for this:
409  * 0: Default (Use firmware default mode)
410  * 1: Conservative optimization
411  * 2: Moderate optimization
412  * 3: Aggressive optimization
413  * 4: Static
414  *
415  * Related: None
416  *
417  * Supported Feature: Scan
418  *
419  * Usage: External
420  *
421  * </ini>
422  */
423 #define CFG_ADAPTIVE_SCAN_DWELL_MODE_NC CFG_INI_UINT(\
424 			"hostscan_adaptive_dwell_mode_no_conn",\
425 			0, 4, PLATFORM_VALUE(4, 0),\
426 			CFG_VALUE_OR_DEFAULT,\
427 			"Enable adaptive dwell mode without connection")
428 
429 /*
430  * <ini>
431  * honour_nl_scan_policy_flags - This ini will decide whether to honour
432  * NL80211 scan policy flags
433  * @Min: 0
434  * @Max: 1
435  * @Default: 1
436  *
437  * This parameter will decide whether to honour scan flags such as
438  * NL80211_SCAN_FLAG_HIGH_ACCURACY , NL80211_SCAN_FLAG_LOW_SPAN,
439  * NL80211_SCAN_FLAG_LOW_POWER.
440  * Acceptable values for this:
441  * 0: Config is disabled
442  * 1: Config is enabled
443  *
444  * Related: None
445  *
446  * Supported Feature: Scan
447  *
448  * Usage: Internal
449  *
450  * </ini>
451  */
452 #define CFG_HONOUR_NL_SCAN_POLICY_FLAGS CFG_INI_BOOL(\
453 			"honour_nl_scan_policy_flags",\
454 			true, \
455 			"honour NL80211 scan policy flags")
456 
457 #ifdef FEATURE_WLAN_SCAN_PNO
458 /*
459  * <ini>
460  * g_user_config_sched_scan_plan - set user config sched scan plans.
461  * @Min: 0
462  * @Max:1
463  * @Default: 1
464  *
465  * This ini is used to decide if user config number of sched scan plan needs to
466  * be configured or only one sched scan plan needs to be configured.
467  * If this ini is enabled then  user config number of sched scan plans will be
468  * configured else only one sched scan plan will be configured.
469  *
470  * Supported Feature: PNO scan
471  *
472  * Usage: External
473  *
474  * </ini>
475  */
476 
477 #define CFG_USER_CONFIG_SCHED_SCAN_PLAN CFG_INI_BOOL(\
478 			"g_user_config_sched_scan_plan",\
479 			true, \
480 			"set user config sched scan plans")
481 
482 /*
483  * <ini>
484  * g_max_sched_scan_plan_iterations - pno sched max scan plan iterations.
485  * @Min: 1
486  * @Max: 100
487  * @Default: 10
488  *
489  * This ini is used to set max sched scan plan iterations for pno scan
490  * (value in seconds).
491  *
492  * Related: gPNOScanSupport
493  *
494  * Supported Feature: PNO scan
495  *
496  * Usage: External
497  *
498  * </ini>
499  */
500 #define CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS CFG_INI_UINT( \
501 			"g_max_sched_scan_plan_iterations", \
502 			1, 100, 10, \
503 			CFG_VALUE_OR_DEFAULT, \
504 			"Max sched scan plan iterations")
505 
506 /*
507  * <ini>
508  * g_max_sched_scan_plan_int - pno sched max scan plan interval.
509  * @Min: 1
510  * @Max: 7200
511  * @Default: 3600
512  *
513  * This ini is used to set max sched scan plan interval for pno scan
514  * (value in seconds).
515  *
516  * Related: gPNOScanSupport
517  *
518  * Supported Feature: PNO scan
519  *
520  * Usage: External
521  *
522  * </ini>
523  */
524 #define CFG_MAX_SCHED_SCAN_PLAN_INTERVAL CFG_INI_UINT( \
525 			"g_max_sched_scan_plan_int", \
526 			1, 7200, 3600, \
527 			CFG_VALUE_OR_DEFAULT, \
528 			"Max sched scan plan interval")
529 
530 /*
531  * <ini>
532  * gEnableDFSPnoChnlScan - enable dfs channels in PNO scan
533  * @Min: 0
534  * @Max: 1
535  * @Default: 1
536  *
537  * This ini is used to enable/disable dfs channels in PNO scan request,
538  * enabling this ini enables driver to include dfs channels in its
539  * PNO scan request
540  * Related: NA
541  *
542  * Supported Feature: DFS, PNO
543  *
544  * Usage: Internal/External
545  *
546  * </ini>
547  */
548 #define CFG_ENABLE_DFS_PNO_CHNL_SCAN CFG_INI_BOOL( \
549 			"gEnableDFSPnoChnlScan", \
550 			true, \
551 			"Enable dfs channels in PNO Scan")
552 
553 /*
554  * <ini>
555  * gPNOScanSupport - Enable or Disable PNO scan
556  * @Min: 0
557  * @Max: 1
558  * @Default: 1
559  *
560  * This ini is used to Enable or Disable PNO scan
561  *
562  * Related: None
563  *
564  * Supported Feature: Scan
565  *
566  * Usage: External
567  *
568  * </ini>
569  */
570 #define CFG_PNO_SCAN_SUPPORT CFG_INI_BOOL( \
571 			"gPNOScanSupport", \
572 			true, \
573 			"Enable/Disable PNO scan")
574 
575 /*
576  * <ini>
577  * gPNOScanTimerRepeatValue - Set PNO scan timer repeat value
578  * @Min: 0
579  * @Max: 0xffffffff
580  * @Default: 30
581  *
582  * This ini is used by firmware to set fast scan max cycles
583  * equal to gPNOScanTimerRepeatValue. Taking power consumption
584  * into account firmware after gPNOScanTimerRepeatValue times
585  * fast_scan_period switches to slow_scan_period.
586  *
587  * Usage: External
588  *
589  * </ini>
590  */
591 #define CFG_PNO_SCAN_TIMER_REPEAT_VALUE CFG_INI_UINT( \
592 			"gPNOScanTimerRepeatValue", \
593 			0, \
594 			0xffffffff, \
595 			30, \
596 			CFG_VALUE_OR_DEFAULT, \
597 			"PNO scan timer repeat value")
598 
599 /*
600  * <ini>
601  * gPNOSlowScanMultiplier - Set PNO slow scan multiplier
602  * @Min: 0
603  * @Max: 30
604  * @Default: 6
605  *
606  * This ini is used by firmware to set slow scan period
607  * as gPNOSlowScanMultiplier times fast_scan_period.
608  *
609  * Related: None
610  *
611  * Supported Feature: Scan
612  *
613  * Usage: External
614  *
615  * </ini>
616  */
617 #define CFG_PNO_SLOW_SCAN_MULTIPLIER CFG_INI_UINT( \
618 			"gPNOSlowScanMultiplier", \
619 			0, \
620 			30, \
621 			6, \
622 			CFG_VALUE_OR_DEFAULT, \
623 			"PNO slow scan multiplier")
624 
625 /*
626  * <ini>
627  * gPNOChannelPrediction - Enable/disable the PNO channel
628  * prediction feature.
629  * @Min: 0
630  * @Max: 1
631  * @Default: 0
632  *
633  * In current PNO implementation, scan is always done until all configured
634  * channels are scanned. If we can determine DUT is stationary based on
635  * scanning a subset of channels, we may cancel the remaining channels.
636  * Hence, we can save additional power consumption.
637  *
638  * Related: None
639  *
640  * Supported Feature: Scan
641  *
642  * Usage: External
643  *
644  * </ini>
645  */
646 #define CFG_PNO_CHANNEL_PREDICTION CFG_INI_BOOL( \
647 			"gPNOChannelPrediction", \
648 			false, \
649 			"enable/disable PNO channel prediction feature")
650 
651 /*
652  * <ini>
653  * gTopKNumOfChannels - top K number of channels are used for tanimoto distance
654  * @Min: 1
655  * @Max: 5
656  * @Default: 3
657  *
658  * These are the top channels on which the probability of finding the AP's is
659  * extremely high. This number is intended for tweaking the internal algorithm
660  * for experiments. This should not be changed externally.
661  *
662  * Related: None
663  *
664  * Supported Feature: Scan
665  *
666  * Usage: External
667  *
668  * </ini>
669  */
670 #define CFG_TOP_K_NUM_OF_CHANNELS CFG_INI_UINT( \
671 			"gTopKNumOfChannels", \
672 			1, \
673 			5, \
674 			3, \
675 			CFG_VALUE_OR_DEFAULT, \
676 			"Top K number of channels")
677 /*
678  * <ini>
679  * gStationaryThreshold - STA threshold value to determine if it is stationary
680  * @Min: 0
681  * @Max: 100
682  * @Default: 10
683  *
684  * This is the threshold value to determine that the STA is
685  * stationary. If the tanimoto distance is less than this
686  * value, then the device is considered to be stationary.
687  * This parameter is intended to tweak the internal algorithm
688  * for experiments. This should not be changed externally.
689  *
690  *
691  * Related: None
692  *
693  * Supported Feature: Scan
694  *
695  * Usage: External
696  *
697  * </ini>
698  */
699 #define CFG_STATIONARY_THRESHOLD CFG_INI_UINT( \
700 			"gStationaryThreshold", \
701 			0, \
702 			100, \
703 			10, \
704 			CFG_VALUE_OR_DEFAULT, \
705 			"Threshold to determine if sta is stationary")
706 
707 /*
708  * <ini>
709  * gChPredictionFullScanMs - Set periodic timer for channel prediction
710  * @Min: 3000
711  * @Max: 0x7fffffff
712  * @Default: 60000
713  *
714  * This ini is used to set the periodic timer upon which
715  * a full scan needs to be triggered when PNO channel
716  * prediction feature is enabled. This parameter is intended
717  * to tweak the internal algorithm for experiments.
718  *
719  * Related: None
720  *
721  * Supported Feature: Scan
722  *
723  * Usage: Internal
724  *
725  * </ini>
726  */
727 #define CFG_CHANNEL_PREDICTION_SCAN_TIMER CFG_INI_UINT( \
728 			"gChPredictionFullScanMs", \
729 			3000, \
730 			0x7fffffff, \
731 			60000, \
732 			CFG_VALUE_OR_DEFAULT, \
733 			"Timer value for channel prediction")
734 
735 /*
736  * <ini>
737  * pnoscan_adaptive_dwell_mode - Enable adaptive dwell mode
738  * during pno scan
739  * @Min: 0
740  * @Max: 4
741  * @Default: 1
742  *
743  * This ini will set the algo used in dwell time optimization
744  * during pno scan. see enum scan_dwelltime_adaptive_mode.
745  * Acceptable values for this:
746  * 0: Default (Use firmware default mode)
747  * 1: Conservative optimization
748  * 2: Moderate optimization
749  * 3: Aggressive optimization
750  * 4: Static
751  *
752  * Related: None
753  *
754  * Supported Feature: Scan
755  *
756  * Usage: External
757  *
758  * </ini>
759  */
760 #define CFG_ADAPTIVE_PNOSCAN_DWELL_MODE CFG_INI_UINT( \
761 			"pnoscan_adaptive_dwell_mode", \
762 			0, \
763 			4, \
764 			1, \
765 			CFG_VALUE_OR_DEFAULT, \
766 			"Algorithm used in dwell time optimization")
767 
768 /*
769  * <ini>
770  * gScanBackoffMultiplier - For NLO/PNO, multiply fast scan period by this every
771  *      max cycles
772  * @Min: 0
773  * @Max: 255
774  * @Default: 0
775  *
776  * For Network Listen Offload and Preferred Network Offload, multiply the fast
777  * scan period by this value after max cycles have occurred. Setting this to 0
778  * disables the feature.
779  *
780  * @E.g.
781  *      # Disable scan backoff multiplier
782  *      gScanBackoffMultiplier=0
783  *      # Effectively the same
784  *      gScanBackoffMultiplier=1
785  *      # Double the scan period after each max cycles have occurred
786  *      gScanBackoffMultiplier=2
787  *
788  * Related: NLO, PNO
789  *
790  * Usage: Internal/External
791  *
792  * </ini>
793  */
794 #define CFG_SCAN_BACKOFF_MULTIPLIER CFG_INI_UINT( \
795 			"gScanBackoffMultiplier", \
796 			0, \
797 			255, \
798 			0, \
799 			CFG_VALUE_OR_DEFAULT, \
800 			"Scan backoff multiplier")
801 
802 /*
803  * <ini>
804  * mawc_nlo_enabled - For NLO/PNO, enable MAWC based scan
805  * @Min: 0
806  * @Max: 1
807  * @Default: 0
808  *
809  * Enable/Disable the Motion Aided Wireless Connectivity
810  * based NLO using this parameter
811  *
812  * Related: NLO, PNO
813  *
814  * Usage: Internal/External
815  *
816  * </ini>
817  */
818 #define CFG_MAWC_NLO_ENABLED CFG_INI_BOOL( \
819 			"mawc_nlo_enabled", \
820 			0, \
821 			"Enable MAWC based scan")
822 
823 /*
824  * <ini>
825  * mawc_nlo_exp_backoff_ratio - Exponential back off ratio
826  * @Min: 0
827  * @Max: 300
828  * @Default: 3
829  *
830  * Configure the exponential back off ratio using this
831  * parameter for MAWC based NLO
832  * ratio of exponential backoff, next = current + current*ratio/100
833  *
834  * Related: NLO, PNO
835  *
836  * Usage: Internal/External
837  *
838  * </ini>
839  */
840 #define CFG_MAWC_NLO_EXP_BACKOFF_RATIO CFG_INI_UINT( \
841 			"mawc_nlo_exp_backoff_ratio", \
842 			0, \
843 			300, \
844 			3, \
845 			CFG_VALUE_OR_DEFAULT, \
846 			"MWAC based NLO exponential ratio")
847 
848 /*
849  * <ini>
850  * mawc_nlo_init_scan_interval - Initial Scan Interval
851  * @Min: 1000
852  * @Max: 0xFFFFFFFF
853  * @Default: 10000
854  *
855  * Configure the initial scan interval  using this
856  * parameter for MAWC based NLO (Units in Milliseconds)
857  *
858  * Related: NLO, PNO
859  *
860  * Usage: Internal/External
861  *
862  * </ini>
863  */
864 #define CFG_MAWC_NLO_INIT_SCAN_INTERVAL CFG_INI_UINT( \
865 			"mawc_nlo_init_scan_interval", \
866 			1000, \
867 			0xFFFFFFFF, \
868 			10000, \
869 			CFG_VALUE_OR_DEFAULT, \
870 			"Initial Scan Interval")
871 
872 /*
873  * <ini>
874  * mawc_nlo_max_scan_interval - Maximum Scan Interval
875  * @Min: 1000
876  * @Max: 0xFFFFFFFF
877  * @Default: 60000
878  *
879  * Configure the maximum scan interval  using this
880  * parameter for MAWC based NLO (Units in Milliseconds)
881  *
882  * Related: NLO, PNO
883  *
884  * Usage: Internal/External
885  *
886  * </ini>
887  */
888 #define CFG_MAWC_NLO_MAX_SCAN_INTERVAL CFG_INI_UINT( \
889 			"mawc_nlo_max_scan_interval", \
890 			1000, \
891 			0xFFFFFFFF, \
892 			60000, \
893 			CFG_VALUE_OR_DEFAULT, \
894 			"Maximum Scan Interval")
895 
896 #define CFG_SCAN_PNO \
897 	CFG(CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS) \
898 	CFG(CFG_MAX_SCHED_SCAN_PLAN_INTERVAL) \
899 	CFG(CFG_PNO_SCAN_SUPPORT) \
900 	CFG(CFG_ENABLE_DFS_PNO_CHNL_SCAN) \
901 	CFG(CFG_PNO_SCAN_TIMER_REPEAT_VALUE) \
902 	CFG(CFG_PNO_SLOW_SCAN_MULTIPLIER) \
903 	CFG(CFG_PNO_CHANNEL_PREDICTION) \
904 	CFG(CFG_TOP_K_NUM_OF_CHANNELS) \
905 	CFG(CFG_STATIONARY_THRESHOLD) \
906 	CFG(CFG_CHANNEL_PREDICTION_SCAN_TIMER) \
907 	CFG(CFG_ADAPTIVE_PNOSCAN_DWELL_MODE) \
908 	CFG(CFG_SCAN_BACKOFF_MULTIPLIER) \
909 	CFG(CFG_MAWC_NLO_ENABLED) \
910 	CFG(CFG_MAWC_NLO_EXP_BACKOFF_RATIO) \
911 	CFG(CFG_MAWC_NLO_INIT_SCAN_INTERVAL) \
912 	CFG(CFG_MAWC_NLO_MAX_SCAN_INTERVAL) \
913 	CFG(CFG_USER_CONFIG_SCHED_SCAN_PLAN)
914 
915 #else
916 #define CFG_SCAN_PNO
917 #endif  /* FEATURE_WLAN_SCAN_PNO */
918 
919 /*
920  * <ini>
921  * gActiveMaxChannelTimeConc - Maximum active scan time in milliseconds.
922  * @Min: 0
923  * @Max: 10000
924  * @Default: 40
925  *
926  * This ini is used to set maximum active scan time in STA+SAP concurrent
927  * mode.
928  *
929  * Related: None.
930  *
931  * Supported Feature: Concurrency
932  *
933  * Usage: Internal/External
934  *
935  * </ini>
936  */
937 #define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
938 				"gActiveMaxChannelTimeConc",\
939 				0, 10000, PLATFORM_VALUE(40, 0),\
940 				CFG_VALUE_OR_DEFAULT, \
941 				"active scan time in STA+SAP concurrent")
942 
943 /*
944  * <ini>
945  * gPassiveMaxChannelTimeConc - Maximum passive scan time in milliseconds.
946  * @Min: 0
947  * @Max: 10000
948  * @Default: 110
949  *
950  * This ini is used to set maximum passive scan time in STA+SAP concurrent
951  * mode.
952  *
953  * Related: None.
954  *
955  * Supported Feature: Concurrency
956  *
957  * Usage: Internal/External
958  *
959  * </ini>
960  */
961 #define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
962 				"gPassiveMaxChannelTimeConc",\
963 				0, 10000, PLATFORM_VALUE(110, 0),\
964 				CFG_VALUE_OR_DEFAULT, \
965 				"Set priority for connection with bssid_hint")
966 
967 /*
968  * <ini>
969  * gRestTimeConc - Rest time before moving to a new channel to scan.
970  * @Min: 0
971  * @Max: 10000
972  * @Default: 100
973  *
974  * This ini is used to configure rest time.
975  *
976  * Related: None.
977  *
978  * Supported Feature: Concurrency
979  *
980  * Usage: Internal/External
981  *
982  * </ini>
983  */
984 #define CFG_MAX_REST_TIME_CONC CFG_INI_UINT(\
985 				"nRestTimeConc",\
986 				0, 10000, PLATFORM_VALUE(100, 0),\
987 				CFG_VALUE_OR_DEFAULT, \
988 				"Rest time before moving to a new channel")
989 
990 /*
991  * <ini>
992  * min_rest_time_conc - Minimum time spent on home channel before moving to a
993  * new channel to scan.
994  * @Min: 0
995  * @Max: 50
996  * @Default: 50
997  *
998  * This ini is used to configure minimum time spent on home channel before
999  * moving to a new channel to scan.
1000  *
1001  * Related: None.
1002  *
1003  * Supported Feature: Concurrency
1004  *
1005  * Usage: Internal/External
1006  *
1007  * </ini>
1008  */
1009 #define CFG_MIN_REST_TIME_CONC CFG_INI_UINT(\
1010 				"min_rest_time_conc",\
1011 				0, 50, PLATFORM_VALUE(50, 0),\
1012 				CFG_VALUE_OR_DEFAULT, \
1013 				"minimum time spent on home channel")
1014 
1015 /*
1016  * <ini>
1017  * wake_lock_in_user_scan - use to acquire wake lock during user scan
1018  * @Min: 0
1019  * @Max: 1
1020  * @Default: 0
1021  *
1022  * This INI is added for a specific OEM on their request, who don’t want to
1023  * use PNO offload scan (sched scans). This is useful only if PNO scan offload
1024  * is disabled. If PNO scan is enabled this INI should be disabled and its
1025  * by default disabled intentionally.
1026  * This is used to acquire wake lock to handle the case where PNO scan offload
1027  * is disabled so that wlan is not suspended during scan before connect and
1028  * thus scan is not aborted in between. In case PNO scan is offloaded, the FW
1029  * will take care of connect scans and will wake up host when candidate is found
1030  *
1031  * Related: Scan
1032  *
1033  * Usage: Internal/External
1034  *
1035  * </ini>
1036  */
1037 #define CFG_ENABLE_WAKE_LOCK_IN_SCAN CFG_INI_BOOL( \
1038 				"wake_lock_in_user_scan", \
1039 				false, \
1040 				"use wake lock during scan")
1041 
1042 /*
1043  * <ini>
1044  * gIdleTimeConc - Data inactivity time in msec.
1045  * @Min: 0
1046  * @Max: 25
1047  * @Default: 25
1048  *
1049  * This ini is used to configure data inactivity time in msec on bss channel
1050  * that will be used by scan engine in firmware.
1051  * For example if this value is 25ms then firmware will check for data
1052  * inactivity every 25ms till gRestTimeConc is reached.
1053  * If inactive then scan engine will move from home channel to scan the next
1054  * frequency.
1055  *
1056  * Related: None.
1057  *
1058  * Supported Feature: Concurrency
1059  *
1060  * Usage: Internal/External
1061  *
1062  * </ini>
1063  */
1064 #define CFG_IDLE_TIME_CONC CFG_INI_UINT(\
1065 				"gIdleTimeConc",\
1066 				0, 25, PLATFORM_VALUE(25, 0),\
1067 				CFG_VALUE_OR_DEFAULT, \
1068 				"data inactivity time on bss channel")
1069 
1070 /*
1071  * <ini>
1072  * gChlistTrimConc - Enable scan list modification on concurrent mode.
1073  * @Min: 0
1074  * @Max: 1
1075  * @Default: 0
1076  *
1077  * This ini is used to enable/disable scan list modification
1078  * on concurrent mode.
1079  *
1080  * Related: None.
1081  *
1082  * Supported Feature: Concurrency, Scan
1083  *
1084  * Usage: Internal/External
1085  *
1086  * </ini>
1087  */
1088 #define CFG_CHAN_LIST_TRIM_CONC CFG_INI_BOOL(\
1089 				"ch_list_trim_conc",\
1090 				false, \
1091 				"Enable scan list trim")
1092 
1093 /*
1094  * <ini>
1095  * gEnableMacAddrSpoof - Enable mac address randomization feature.
1096  * @Min: 0
1097  * @Max: 1
1098  * @Default: 1
1099  *
1100  * This ini is used to enable/disable mac address randomization for scan.
1101  *
1102  * Supported Feature: SCAN
1103  *
1104  *
1105  * Usage: Internal/External
1106  *
1107  * </ini>
1108  */
1109 #define CFG_ENABLE_MAC_ADDR_SPOOFING CFG_INI_BOOL( \
1110 		"gEnableMacAddrSpoof", \
1111 		true, \
1112 		"Enable mac spoofing")
1113 
1114 /*
1115  * <ini>
1116  * gScanAgingTime - Set scan aging time
1117  * @Min: 0
1118  * @Max: 200
1119  * @Default: 30
1120  *
1121  * This ini is used to set scan aging timeout value
1122  * in secs. For example after 30 secs the bss results
1123  * greater than 30secs age will be flushed.
1124  *
1125  * Related: None
1126  *
1127  * Supported Feature: Scan
1128  *
1129  * Usage: External
1130  *
1131  * </ini>
1132  */
1133 #ifdef CONFIG_WIFI_EMULATION_WIFI_3_0
1134 #define CFG_SCAN_AGING_TIME_DEFAULT (90)
1135 #else
1136 #define CFG_SCAN_AGING_TIME_DEFAULT (30)
1137 #endif
1138 
1139 #define CFG_SCAN_AGING_TIME CFG_INI_UINT( \
1140 			"gScanAgingTime", \
1141 			0, \
1142 			200, \
1143 			CFG_SCAN_AGING_TIME_DEFAULT, \
1144 			CFG_VALUE_OR_DEFAULT, \
1145 			"scan aging time")
1146 /*
1147  * <ini>
1148  * extscan_adaptive_dwell_mode  Enable adaptive dwell mode
1149  * during ext scan
1150  * @Min: 0
1151  * @Max: 4
1152  * @Default: 1
1153  *
1154  * This ini will set the algo used in dwell time optimization
1155  * during ext scan. see enum scan_dwelltime_adaptive_mode.
1156  * Acceptable values for this:
1157  * 0: Default (Use firmware default mode)
1158  * 1: Conservative optimization
1159  * 2: Moderate optimization
1160  * 3: Aggressive optimization
1161  * 4: Static
1162  *
1163  * Related: None
1164  *
1165  * Supported Feature: Scan
1166  *
1167  * Usage: External
1168  *
1169  * </ini>
1170  */
1171 #define CFG_ADAPTIVE_EXTSCAN_DWELL_MODE CFG_INI_UINT( \
1172 			"extscan_adaptive_dwell_mode", \
1173 			0, \
1174 			4, \
1175 			1, \
1176 			CFG_VALUE_OR_DEFAULT, \
1177 			"ext scan adaptive dwell mode")
1178 
1179 /*
1180  * <ini>
1181  * sta_scan_burst_duration - Burst duration in case of split scan.
1182  * @Min: 0
1183  * @Max: 180
1184  * @Default: 0
1185  *
1186  * This ini is used to set burst duration of sta scan requests.
1187  *
1188  * Related: None.
1189  *
1190  * Supported Feature: Concurrency
1191  *
1192  * Usage: External
1193  *
1194  * </ini>
1195  */
1196 #define CFG_STA_SCAN_BURST_DURATION CFG_INI_UINT( \
1197 			"sta_scan_burst_duration", \
1198 			0, \
1199 			180, \
1200 			0, \
1201 			CFG_VALUE_OR_DEFAULT, \
1202 			"sta scan burst duration")
1203 
1204 /*
1205  * <ini>
1206  * p2p_scan_burst_duration - Burst duration in case of split scan for p2p scan.
1207  * @Min: 0
1208  * @Max: 180
1209  * @Default: 0
1210  *
1211  * This ini is used to set burst duration of scan for p2p scan requests.
1212  *
1213  * Related: None.
1214  *
1215  * Supported Feature: Concurrency
1216  *
1217  * Usage: External
1218  *
1219  * </ini>
1220  */
1221 
1222 #define CFG_P2P_SCAN_BURST_DURATION CFG_INI_UINT( \
1223 			"p2p_scan_burst_duration", \
1224 			0, \
1225 			180, \
1226 			0, \
1227 			CFG_VALUE_OR_DEFAULT, \
1228 			"p2p scan burst duration")
1229 /*
1230  * <ini>
1231  * go_scan_burst_duration - Burst duration in case of split scan when GO is
1232  * active.
1233  * @Min: 0
1234  * @Max: 180
1235  * @Default: 0
1236  *
1237  * This ini is used to set burst duration of scan when GO is active.
1238  *
1239  * Related: None.
1240  *
1241  * Supported Feature: Concurrency
1242  *
1243  * Usage: External
1244  *
1245  * </ini>
1246  */
1247 #define CFG_GO_SCAN_BURST_DURATION CFG_INI_UINT( \
1248 			"go_scan_burst_duration", \
1249 			0, \
1250 			180, \
1251 			0, \
1252 			CFG_VALUE_OR_DEFAULT, \
1253 			"go scan burst duration")
1254 
1255 /*
1256  * <ini>
1257  * ap_scan_burst_duration - Burst duration in case of split scan when ap
1258  * is active.
1259  * @Min: 0
1260  * @Max: 32
1261  * @Default: 0
1262  *
1263  * This ini is used to set burst duration of scan when SAP is active.
1264  *
1265  * Related: None.
1266  *
1267  * Supported Feature: Concurrency
1268  *
1269  * Usage: External
1270  *
1271  * </ini>
1272  */
1273 #define CFG_AP_SCAN_BURST_DURATION CFG_INI_UINT( \
1274 			"ap_scan_burst_duration", \
1275 			0, \
1276 			32, \
1277 			0, \
1278 			CFG_VALUE_OR_DEFAULT, \
1279 			"ap scan burst duration")
1280 
1281 /*
1282  * <ini>
1283  * gSkipDfsChannelInP2pSearch - Skip DFS Channel in case of P2P Search
1284  * @Min: 0
1285  * @Max: 1
1286  * @Default: 1
1287  *
1288  * This ini is used to disable(skip) dfs channel in p2p search.
1289  * Related: None.
1290  *
1291  * Supported Feature: DFS P2P
1292  *
1293  * Usage: External
1294  *
1295  * <ini>
1296  */
1297 #define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH CFG_INI_BOOL( \
1298 	"gSkipDfsChannelInP2pSearch", \
1299 	1, \
1300 	"skip dfs channel in p2p search")
1301 
1302 /*
1303  * <ini>
1304  * gEnableConnectedScan - Will enable or disable scan in connected state
1305  * This ini is used to enable or disable the scanning in
1306  * Connected state
1307  * @Min: 0
1308  * @Max: 1
1309  * @Default: 1
1310  *
1311  * Related: None
1312  *
1313  * Supported Feature: STA
1314  *
1315  * Usage: External
1316  *
1317  * <ini>
1318  */
1319 #define CFG_ENABLE_CONNECTED_SCAN CFG_INI_BOOL( \
1320 				"gEnableConnectedScan", \
1321 				true, \
1322 				"Enable/disable scan in connected state")
1323 
1324 /*
1325  * <ini>
1326  * gEnableSNRMonitoring - Enables SNR Monitoring
1327  * @Min: 0
1328  * @Max: 1
1329  * @Default: 1
1330  *
1331  * This ini is used to set default snr monitor
1332  *
1333  * Related: None
1334  *
1335  * Supported Feature: STA
1336  *
1337  * Usage: Internal/External
1338  *
1339  * </ini>
1340  */
1341 #define CFG_ENABLE_SNR_MONITORING CFG_INI_BOOL(\
1342 			"gEnableSNRMonitoring",\
1343 			true,\
1344 			"Enable/Disable SNR Monitoring")
1345 
1346 /*
1347  * <ini>
1348  * scan_mode_6ghz - 6ghz Scan mode
1349  * @Min: 0
1350  * @Max: 2
1351  * @Default: 1
1352  *
1353  * Configure the 6Ghz scan mode
1354  * 0 - Remove 6GHz channels in the scan request
1355  * 1 - Allow/Add 6Ghz PSC channels to scan request
1356  * 2 - Allow all the 6Ghz channels
1357  * 3 - Scan the channels (both PSC and non-PSC) found in RNR-IEs while scanning
1358  *     2g and 5g bands. Host fills all PSC and non-PSC channels in the scan
1359  *     request and set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for each channel.
1360  * 4 - Scan the complete PSC channel list for every duty cycle. For every
1361  *     duty cycle scan, host fills all 6g channels and sets the flag
1362  *     FLAG_SCAN_ONLY_IF_RNR_FOUND only for non-PSC channels. Rest of the scans
1363  *     will be done only on RNR channels (PSC and non-PSC).
1364  * 5 - Scan the complete 6g(PSC and non-PSC) channel list for every duty cycle.
1365  *     For every duty cycle scan, host fills all 6g channels and doesn't set the
1366  *     flag FLAG_SCAN_ONLY_IF_RNR_FOUND for any 6g (PSC/non-PSC) channels. Rest
1367  *     of the scans will be done only on RNR (PSC and non-PSC channels).
1368  *
1369  * Related: SCAN
1370  *
1371  * Usage: Internal/External
1372  *
1373  * </ini>
1374  */
1375 #define CFG_6GHZ_SCAN_MODE CFG_INI_UINT( \
1376 			"scan_mode_6ghz", \
1377 			SCAN_MODE_6G_NO_CHANNEL, \
1378 			SCAN_MODE_6G_MAX, \
1379 			PLATFORM_VALUE(SCAN_MODE_6G_PSC_DUTY_CYCLE, \
1380 				SCAN_MODE_6G_ALL_CHANNEL), \
1381 			CFG_VALUE_OR_DEFAULT, \
1382 			"6ghz scan mode")
1383 
1384 /*
1385  * <ini>
1386  * scan_mode_6ghz_duty_cycle - 6ghz Scan mode duty cycle
1387  * @Min: 0
1388  * @Max: 0xFFFF
1389  * @Default: 4
1390  *
1391  * Configure the 6Ghz scan mode duty cycle
1392  * 0 - No full scan needed, all scans are optimized
1393  * 1 - No scan optimization, all full scans are considered as it is
1394  * 2 - Every alternate full scan req is considered as it is without optimization
1395  * 3 - Every third full scan req is considered as it is without optimization
1396  * 4 - Every fourth full scan req is considered as it is without optimization
1397  *
1398  * This INI is used to disable optimization on full scan requests after every
1399  * duty cycle and send it as it is to firmware. The optimization is to fill 6ghz
1400  * channels and scan for only RNR channels based on the ini scan_mode_6ghz.
1401  *
1402  * Related: scan_mode_6ghz
1403  *
1404  * Usage: External
1405  *
1406  * </ini>
1407  */
1408 #define CFG_6GHZ_SCAN_MODE_DUTY_CYCLE CFG_INI_UINT( \
1409 			"scan_mode_6ghz_duty_cycle", \
1410 			0, \
1411 			0xFFFF, \
1412 			4, \
1413 			CFG_VALUE_OR_DEFAULT, \
1414 			"6ghz scan mode duty cycle")
1415 
1416 /*
1417  * <ini>
1418  * scan_allow_bss_with_corrupted_ie - Continue scan even if corrupted IEs are
1419  * present.
1420  * @Min: 0
1421  * @Max: 1
1422  * @Default: 0
1423  *
1424  * This ini is used to continue scan even if corrupted IEs are present. If this
1425  * ini is enable, the scan module skips the IEs following corrupted IEs(IE's
1426  * with invalid len) and adds the scan entry without completely dropping the
1427  * frame.
1428  *
1429  * Related: scan
1430  *
1431  * Usage: External
1432  *
1433  * <ini>
1434  */
1435 #define CFG_SCAN_ALLOW_BSS_WITH_CORRUPTED_IE CFG_INI_BOOL( \
1436 			"scan_allow_bss_with_corrupted_ie", \
1437 			false, \
1438 			"scan allow bss with corrupted ie")
1439 
1440 /*
1441  * <ini>
1442  * skip_6g_and_indoor_freq_scan - Skip scan on 6Ghz and indoor channel
1443  * @Min: 0
1444  * @Max: 1
1445  * @Default: 0
1446  *
1447  * This ini is used to skip 6Ghz and 5Gh indoor freq for STA scan if hw is
1448  * non-DBS and SAP is present
1449  *
1450  * Related: scan
1451  *
1452  * Usage: External
1453  *
1454  * <ini>
1455  */
1456 #define CFG_SKIP_6GHZ_AND_INDOOR_FREQ_SCAN CFG_INI_BOOL( \
1457 			"skip_6g_and_indoor_freq_scan", \
1458 			false, \
1459 			"skip sta scan on 6Ghz and 5Ghz indoor channel")
1460 /*
1461  * <ini>
1462  * last_scan_ageout_time - To use cached scan results for provided time
1463  * duration.
1464  * @Min: 0
1465  * @Max: 30000 ms
1466  * @Default: 0
1467  *
1468  * This is used to use last cached scan results for provided time.
1469  * Instead of issuing new scan, cached scan results can be used to
1470  * select best SAP channel if channels are scanned with in the provided
1471  * value.
1472  *
1473  * Related: None.
1474  *
1475  * Supported Feature: ACS scan optimization
1476  *
1477  * Usage: Internal
1478  *
1479  * </ini>
1480  */
1481 #define CFG_LAST_SCAN_AGEOUT_TIME CFG_INI_UINT( \
1482 			"last_scan_ageout_time", \
1483 			0, \
1484 			30000, \
1485 			0, \
1486 			CFG_VALUE_OR_DEFAULT, \
1487 			"last scan ageout time")
1488 #define CFG_SCAN_ALL \
1489 	CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
1490 	CFG(CFG_DROP_BCN_ON_INVALID_FREQ) \
1491 	CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
1492 	CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
1493 	CFG(CFG_ENABLE_DFS_SCAN) \
1494 	CFG(CFG_ENABLE_CONNECTED_SCAN) \
1495 	CFG(CFG_INITIAL_NO_DFS_SCAN) \
1496 	CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \
1497 	CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
1498 	CFG(CFG_MIN_6G_CHANNEL_TIME) \
1499 	CFG(CFG_ACTIVE_MAX_6G_CHANNEL_TIME) \
1500 	CFG(CFG_PASSIVE_MAX_6G_CHANNEL_TIME) \
1501 	CFG(CFG_ACTIVE_MAX_6G_CHANNEL_TIME_CONC) \
1502 	CFG(CFG_PASSIVE_MAX_6G_CHANNEL_TIME_CONC) \
1503 	CFG(CFG_SCAN_NUM_PROBES) \
1504 	CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
1505 	CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
1506 	CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC) \
1507 	CFG(CFG_HONOUR_NL_SCAN_POLICY_FLAGS) \
1508 	CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
1509 	CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \
1510 	CFG(CFG_MAX_REST_TIME_CONC) \
1511 	CFG(CFG_MIN_REST_TIME_CONC) \
1512 	CFG(CFG_IDLE_TIME_CONC) \
1513 	CFG(CFG_CHAN_LIST_TRIM_CONC) \
1514 	CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
1515 	CFG(CFG_SCAN_AGING_TIME) \
1516 	CFG(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE) \
1517 	CFG(CFG_STA_SCAN_BURST_DURATION) \
1518 	CFG(CFG_P2P_SCAN_BURST_DURATION) \
1519 	CFG(CFG_GO_SCAN_BURST_DURATION) \
1520 	CFG(CFG_ENABLE_SNR_MONITORING) \
1521 	CFG(CFG_AP_SCAN_BURST_DURATION) \
1522 	CFG(CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH) \
1523 	CFG(CFG_6GHZ_SCAN_MODE) \
1524 	CFG(CFG_6GHZ_SCAN_MODE_DUTY_CYCLE) \
1525 	CFG(CFG_SCAN_ALLOW_BSS_WITH_CORRUPTED_IE) \
1526 	CFG(CFG_SKIP_6GHZ_AND_INDOOR_FREQ_SCAN) \
1527 	CFG_SCAN_PNO \
1528 	CFG(CFG_LAST_SCAN_AGEOUT_TIME)
1529 #endif /* __CONFIG_SCAN_H */
1530