wlan_scan_cfg.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936
  1. /*
  2. * Copyright (c) 2012-2019 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. * DOC: This file contains centralized definitions of SCAN component
  20. */
  21. #ifndef __CONFIG_SCAN_H
  22. #define __CONFIG_SCAN_H
  23. #include "cfg_define.h"
  24. /*
  25. * <ini>
  26. * drop_bcn_on_chan_mismatch - drop the beacon for chan mismatch
  27. * @Min: 0
  28. * @Max: 1
  29. * @Default: 1
  30. *
  31. * This ini is used to decide drop the beacon or not if channel received
  32. * in metadata doesn't match the one in beacon.
  33. *
  34. * Related: None
  35. *
  36. * Usage: External
  37. *
  38. * </ini>
  39. */
  40. #define CFG_DROP_BCN_ON_CHANNEL_MISMATCH CFG_INI_BOOL(\
  41. "drop_bcn_on_chan_mismatch",\
  42. true,\
  43. "drop bcn on channel mismatch")
  44. /*
  45. * <ini>
  46. * gActiveMaxChannelTime - Set max channel time for active scan
  47. * @Min: 0
  48. * @Max: 10000
  49. * @Default: 40
  50. *
  51. * This ini is used to set maximum channel time in msecs spent in
  52. * active scan
  53. *
  54. * Related: None
  55. *
  56. * Usage: External
  57. *
  58. * </ini>
  59. */
  60. #define CFG_ACTIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
  61. "gActiveMaxChannelTime",\
  62. 0, 10000, MCL_OR_WIN_VALUE(40, 105),\
  63. CFG_VALUE_OR_DEFAULT, "active dwell time")
  64. /*
  65. * <ini>
  66. * gEnableDFSChnlScan - Enable/Disable scan on DFS channels
  67. * @Min: 0
  68. * @Max: 1
  69. * @Default: 1
  70. *
  71. * This ini is used to enable/disable scan on DFS channels.
  72. *
  73. * Related: Scan
  74. *
  75. * Usage: External
  76. *
  77. * </ini>
  78. */
  79. #define CFG_ENABLE_DFS_SCAN CFG_INI_BOOL( \
  80. "gEnableDFSChnlScan", \
  81. true, \
  82. "enable dfs scan")
  83. /*
  84. * <ini>
  85. * gInitialScanNoDFSChnl - Exclude DFS channels in first scan
  86. * @Min: 0
  87. * @Max: 1
  88. * @Default: 0
  89. *
  90. * This ini is used to enable/disable scan on DFS channels, in first scan only
  91. *
  92. * Related: Scan
  93. *
  94. * Usage: External
  95. *
  96. * </ini>
  97. */
  98. #define CFG_INITIAL_NO_DFS_SCAN CFG_INI_BOOL( \
  99. "gInitialScanNoDFSChnl", \
  100. false, \
  101. "disable initial dfs scan")
  102. /*
  103. * <ini>
  104. * active_max_channel_time_2g - Set max time for active 2G channel scan
  105. * @Min: 0
  106. * @Max: 10000
  107. * @Default: 80
  108. *
  109. * This ini is used to set maximum time in msecs spent in active 2G channel scan
  110. * if it's not zero, in case of zero, CFG_ACTIVE_MAX_CHANNEL_TIME is used for 2G
  111. * channels also.
  112. *
  113. * Related: None
  114. *
  115. * Usage: External
  116. *
  117. * </ini>
  118. */
  119. #define CFG_ACTIVE_MAX_2G_CHANNEL_TIME CFG_INI_UINT(\
  120. "active_max_channel_time_2g",\
  121. 0, 10000, MCL_OR_WIN_VALUE(80, 0),\
  122. CFG_VALUE_OR_DEFAULT, "active dwell time for 2G channels")
  123. /*
  124. * <ini>
  125. * gPassiveMaxChannelTime - Set max channel time for passive scan
  126. * @Min: 0
  127. * @Max: 10000
  128. * @Default: 110
  129. *
  130. * This ini is used to set maximum channel time in msecs spent in
  131. * passive scan
  132. *
  133. * Related: None
  134. *
  135. * Usage: External
  136. *
  137. * </ini>
  138. */
  139. #define CFG_PASSIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
  140. "gPassiveMaxChannelTime",\
  141. 0, 10000, MCL_OR_WIN_VALUE(100, 300),\
  142. CFG_VALUE_OR_DEFAULT, "passive dwell time")
  143. /*
  144. * <ini>
  145. * gScanNumProbes - Set the number of probes on each channel for active scan
  146. * @Min: 0
  147. * @Max: 20
  148. * @Default: 0
  149. *
  150. * This ini is used to set number of probes on each channel for
  151. * active scan
  152. */
  153. #define CFG_SCAN_NUM_PROBES CFG_INI_UINT(\
  154. "gScanNumProbes",\
  155. 0, 20, MCL_OR_WIN_VALUE(0, 2),\
  156. CFG_VALUE_OR_DEFAULT,\
  157. "number of probes on each channel")
  158. /*
  159. * <ini>
  160. * gScanProbeRepeatTime - Set the probe repeat time on each channel
  161. * @Min: 0
  162. * @Max: 30
  163. * @Default: 0
  164. *
  165. * This ini is used to set probe repeat time on each channel for
  166. * active scan
  167. *
  168. * Related: None
  169. *
  170. * Supported Feature: Scan
  171. *
  172. * Usage: External
  173. *
  174. * </ini>
  175. */
  176. #define CFG_SCAN_PROBE_REPEAT_TIME CFG_INI_UINT(\
  177. "gScanProbeRepeatTime",\
  178. 0, 30, MCL_OR_WIN_VALUE(20, 50),\
  179. CFG_VALUE_OR_DEFAULT,\
  180. "probe repeat time on each channel")
  181. /*
  182. * <ini>
  183. * hostscan_adaptive_dwell_mode - Enable adaptive dwell mode
  184. * during host scan with conneciton
  185. * @Min: 0
  186. * @Max: 4
  187. * @Default: 2
  188. *
  189. * This ini will set the algo used in dwell time optimization
  190. * during host scan with connection.
  191. * See enum wmi_dwelltime_adaptive_mode.
  192. * Acceptable values for this:
  193. * 0: Default (Use firmware default mode)
  194. * 1: Conservative optimization
  195. * 2: Moderate optimization
  196. * 3: Aggressive optimization
  197. * 4: Static
  198. *
  199. * Related: None
  200. *
  201. * Supported Feature: Scan
  202. *
  203. * Usage: External
  204. *
  205. * </ini>
  206. */
  207. #define CFG_ADAPTIVE_SCAN_DWELL_MODE CFG_INI_UINT(\
  208. "hostscan_adaptive_dwell_mode",\
  209. 0, 4, MCL_OR_WIN_VALUE(2, 0),\
  210. CFG_VALUE_OR_DEFAULT,\
  211. "Enable adaptive dwell mode")
  212. /*
  213. * <ini>
  214. * hostscan_adaptive_dwell_mode_no_conn - Enable adaptive dwell mode
  215. * during host scan without conneciton
  216. * @Min: 0
  217. * @Max: 4
  218. * @Default: 4
  219. *
  220. * This ini will set the algo used in dwell time optimization
  221. * during host scan with connection.
  222. * See enum wmi_dwelltime_adaptive_mode.
  223. * Acceptable values for this:
  224. * 0: Default (Use firmware default mode)
  225. * 1: Conservative optimization
  226. * 2: Moderate optimization
  227. * 3: Aggressive optimization
  228. * 4: Static
  229. *
  230. * Related: None
  231. *
  232. * Supported Feature: Scan
  233. *
  234. * Usage: External
  235. *
  236. * </ini>
  237. */
  238. #define CFG_ADAPTIVE_SCAN_DWELL_MODE_NC CFG_INI_UINT(\
  239. "hostscan_adaptive_dwell_mode_no_conn",\
  240. 0, 4, MCL_OR_WIN_VALUE(4, 0),\
  241. CFG_VALUE_OR_DEFAULT,\
  242. "Enable adaptive dwell mode without connection")
  243. /*
  244. * <ini>
  245. * is_bssid_hint_priority - Set priority for connection with bssid_hint
  246. * BSSID.
  247. * @Min: 0
  248. * @Max: 1
  249. * @Default: 1
  250. *
  251. * This ini is used to give priority to BSS for connection which comes
  252. * as part of bssid_hint
  253. *
  254. * Related: None
  255. *
  256. * Supported Feature: STA
  257. *
  258. * Usage: External
  259. *
  260. * </ini>
  261. */
  262. #define CFG_IS_BSSID_HINT_PRIORITY CFG_INI_UINT(\
  263. "is_bssid_hint_priority",\
  264. 0, 1, 0,\
  265. CFG_VALUE_OR_DEFAULT, \
  266. "Set priority for connection with bssid_hint")
  267. #ifdef FEATURE_WLAN_SCAN_PNO
  268. /*
  269. * <ini>
  270. * g_max_sched_scan_plan_iterations - pno sched max scan plan iterations.
  271. * @Min: 1
  272. * @Max: 100
  273. * @Default: 10
  274. *
  275. * This ini is used to set max sched scan plan iterations for pno scan
  276. * (value in seconds).
  277. *
  278. * Related: gPNOScanSupport
  279. *
  280. * Supported Feature: PNO scan
  281. *
  282. * Usage: External
  283. *
  284. * </ini>
  285. */
  286. #define CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS CFG_INI_UINT( \
  287. "g_max_sched_scan_plan_iterations", \
  288. 1, 100, 10, \
  289. CFG_VALUE_OR_DEFAULT, \
  290. "Max sched scan plan iterations")
  291. /*
  292. * <ini>
  293. * g_max_sched_scan_plan_int - pno sched max scan plan interval.
  294. * @Min: 1
  295. * @Max: 7200
  296. * @Default: 3600
  297. *
  298. * This ini is used to set max sched scan plan interval for pno scan
  299. * (value in seconds).
  300. *
  301. * Related: gPNOScanSupport
  302. *
  303. * Supported Feature: PNO scan
  304. *
  305. * Usage: External
  306. *
  307. * </ini>
  308. */
  309. #define CFG_MAX_SCHED_SCAN_PLAN_INTERVAL CFG_INI_UINT( \
  310. "g_max_sched_scan_plan_int", \
  311. 1, 7200, 3600, \
  312. CFG_VALUE_OR_DEFAULT, \
  313. "Max sched scan plan interval")
  314. /*
  315. * <ini>
  316. * gEnableDFSPnoChnlScan - enable dfs channels in PNO scan
  317. * @Min: 0
  318. * @Max: 1
  319. * @Default: 1
  320. *
  321. * This ini is used to enable/disable dfs channels in PNO scan request,
  322. * enabling this ini enables driver to include dfs channels in its
  323. * PNO scan request
  324. * Related: NA
  325. *
  326. * Supported Feature: DFS, PNO
  327. *
  328. * Usage: Internal/External
  329. *
  330. * </ini>
  331. */
  332. #define CFG_ENABLE_DFS_PNO_CHNL_SCAN CFG_INI_BOOL( \
  333. "gEnableDFSPnoChnlScan", \
  334. true, \
  335. "Enable dfs channels in PNO Scan")
  336. /*
  337. * <ini>
  338. * gPNOScanSupport - Enable or Disable PNO scan
  339. * @Min: 0
  340. * @Max: 1
  341. * @Default: 1
  342. *
  343. * This ini is used to Enable or Disable PNO scan
  344. *
  345. * Related: None
  346. *
  347. * Supported Feature: Scan
  348. *
  349. * Usage: External
  350. *
  351. * </ini>
  352. */
  353. #define CFG_PNO_SCAN_SUPPORT CFG_INI_BOOL( \
  354. "gPNOScanSupport", \
  355. true, \
  356. "Enable/Disable PNO scan")
  357. /*
  358. * <ini>
  359. * gPNOScanTimerRepeatValue - Set PNO scan timer repeat value
  360. * @Min: 0
  361. * @Max: 0xffffffff
  362. * @Default: 30
  363. *
  364. * This ini is used by firmware to set fast scan max cycles
  365. * equal to gPNOScanTimerRepeatValue. Taking power consumption
  366. * into account firmware after gPNOScanTimerRepeatValue times
  367. * fast_scan_period switches to slow_scan_period.
  368. *
  369. * Usage: External
  370. *
  371. * </ini>
  372. */
  373. #define CFG_PNO_SCAN_TIMER_REPEAT_VALUE CFG_INI_UINT( \
  374. "gPNOScanTimerRepeatValue", \
  375. 0, \
  376. 0xffffffff, \
  377. 30, \
  378. CFG_VALUE_OR_DEFAULT, \
  379. "PNO scan timer repeat value")
  380. /*
  381. * <ini>
  382. * gPNOSlowScanMultiplier - Set PNO slow scan multiplier
  383. * @Min: 0
  384. * @Max: 30
  385. * @Default: 6
  386. *
  387. * This ini is used by firmware to set slow scan period
  388. * as gPNOSlowScanMultiplier times fast_scan_period.
  389. *
  390. * Related: None
  391. *
  392. * Supported Feature: Scan
  393. *
  394. * Usage: External
  395. *
  396. * </ini>
  397. */
  398. #define CFG_PNO_SLOW_SCAN_MULTIPLIER CFG_INI_UINT( \
  399. "gPNOSlowScanMultiplier", \
  400. 0, \
  401. 30, \
  402. 6, \
  403. CFG_VALUE_OR_DEFAULT, \
  404. "PNO slow scan multiplier")
  405. /*
  406. * <ini>
  407. * gPNOChannelPrediction - Enable/disable the PNO channel
  408. * prediction feature.
  409. * @Min: 0
  410. * @Max: 1
  411. * @Default: 0
  412. *
  413. * In current PNO implementation, scan is always done until all configured
  414. * channels are scanned. If we can determine DUT is stationary based on
  415. * scanning a subset of channels, we may cancel the remaining channels.
  416. * Hence, we can save additional power consumption.
  417. *
  418. * Related: None
  419. *
  420. * Supported Feature: Scan
  421. *
  422. * Usage: External
  423. *
  424. * </ini>
  425. */
  426. #define CFG_PNO_CHANNEL_PREDICTION CFG_INI_BOOL( \
  427. "gPNOChannelPrediction", \
  428. false, \
  429. "enable/disable PNO channel prediction feature")
  430. /*
  431. * <ini>
  432. * gTopKNumOfChannels - top K number of channels are used for tanimoto distance
  433. * @Min: 1
  434. * @Max: 5
  435. * @Default: 3
  436. *
  437. * These are the top channels on which the probability of finding the AP's is
  438. * extremely high. This number is intended for tweaking the internal algorithm
  439. * for experiments. This should not be changed externally.
  440. *
  441. * Related: None
  442. *
  443. * Supported Feature: Scan
  444. *
  445. * Usage: External
  446. *
  447. */
  448. #define CFG_TOP_K_NUM_OF_CHANNELS CFG_INI_UINT( \
  449. "gTopKNumOfChannels", \
  450. 1, \
  451. 5, \
  452. 3, \
  453. CFG_VALUE_OR_DEFAULT, \
  454. "Top K number of channels")
  455. /*
  456. * <ini>
  457. * gStationaryThreshold - STA threshold value to determine if it is stationary
  458. * @Min: 0
  459. * @Max: 100
  460. * @Default: 10
  461. *
  462. * This is the threshold value to determine that the STA is
  463. * stationary. If the tanimoto distance is less than this
  464. * value, then the device is considered to be stationary.
  465. * This parameter is intended to tweak the internal algorithm
  466. * for experiments. This should not be changed externally.
  467. *
  468. *
  469. * Related: None
  470. *
  471. * Supported Feature: Scan
  472. *
  473. * Usage: External
  474. *
  475. * </ini>
  476. */
  477. #define CFG_STATIONARY_THRESHOLD CFG_INI_UINT( \
  478. "gStationaryThreshold", \
  479. 0, \
  480. 100, \
  481. 10, \
  482. CFG_VALUE_OR_DEFAULT, \
  483. "Threshold to determine if sta is stationary")
  484. /*
  485. * <ini>
  486. * gChPredictionFullScanMs - Set periodic timer for channel prediction
  487. * @Min: 3000
  488. * @Max: 0x7fffffff
  489. * @Default: 60000
  490. *
  491. * This ini is used to set the periodic timer upon which
  492. * a full scan needs to be triggered when PNO channel
  493. * prediction feature is enabled. This parameter is intended
  494. * to tweak the internal algortihm for experiments.
  495. *
  496. * Related: None
  497. *
  498. * Supported Feature: Scan
  499. *
  500. * Usage: Internal
  501. *
  502. * </ini>
  503. */
  504. #define CFG_CHANNEL_PREDICTION_SCAN_TIMER CFG_INI_UINT( \
  505. "gChPredictionFullScanMs", \
  506. 3000, \
  507. 0x7fffffff, \
  508. 60000, \
  509. CFG_VALUE_OR_DEFAULT, \
  510. "Timer value for channel prediction")
  511. /*
  512. * <ini>
  513. * pnoscan_adaptive_dwell_mode - Enable adaptive dwell mode
  514. * during pno scan
  515. * @Min: 0
  516. * @Max: 4
  517. * @Default: 1
  518. *
  519. * This ini will set the algo used in dwell time optimization
  520. * during pno scan. see enum scan_dwelltime_adaptive_mode.
  521. * Acceptable values for this:
  522. * 0: Default (Use firmware default mode)
  523. * 1: Conservative optimization
  524. * 2: Moderate optimization
  525. * 3: Aggressive optimization
  526. * 4: Static
  527. *
  528. * Related: None
  529. *
  530. * Supported Feature: Scan
  531. *
  532. * Usage: External
  533. *
  534. * </ini>
  535. */
  536. #define CFG_ADAPTIVE_PNOSCAN_DWELL_MODE CFG_INI_UINT( \
  537. "pnoscan_adaptive_dwell_mode", \
  538. 0, \
  539. 4, \
  540. 1, \
  541. CFG_VALUE_OR_DEFAULT, \
  542. "Algorithm used in dwell time optimization")
  543. /*
  544. * <ini>
  545. * gScanBackoffMultiplier - For NLO/PNO, multiply fast scan period by this every
  546. * max cycles
  547. * @Min: 0
  548. * @Max: 255
  549. * @Default: 0
  550. *
  551. * For Network Listen Offload and Perfered Network Offload, multiply the fast
  552. * scan period by this value after max cycles have occurred. Setting this to 0
  553. * disables the feature.
  554. *
  555. * @E.g.
  556. * # Disable scan backoff multiplier
  557. * gScanBackoffMultiplier=0
  558. * # Effectively the same
  559. * gScanBackoffMultiplier=1
  560. * # Double the scan period after each max cycles have occurred
  561. * gScanBackoffMultiplier=2
  562. *
  563. * Related: NLO, PNO
  564. *
  565. * Usage: Internal/External
  566. *
  567. * </ini>
  568. */
  569. #define CFG_SCAN_BACKOFF_MULTIPLIER CFG_INI_UINT( \
  570. "gScanBackoffMultiplier", \
  571. 0, \
  572. 255, \
  573. 0, \
  574. CFG_VALUE_OR_DEFAULT, \
  575. "Scan backoff multiplier")
  576. /*
  577. * <ini>
  578. * mawc_nlo_enabled - For NLO/PNO, enable MAWC based scan
  579. * @Min: 0
  580. * @Max: 1
  581. * @Default: 1
  582. *
  583. * Enable/Disable the Motion Aided Wireless Connectivity
  584. * based NLO using this parameter
  585. *
  586. * Related: NLO, PNO
  587. *
  588. * Usage: Internal/External
  589. *
  590. * </ini>
  591. */
  592. #define CFG_MAWC_NLO_ENABLED CFG_INI_BOOL( \
  593. "mawc_nlo_enabled", \
  594. 1, \
  595. "Enable MAWC based scan")
  596. /*
  597. * <ini>
  598. * mawc_nlo_exp_backoff_ratio - Exponential back off ratio
  599. * @Min: 0
  600. * @Max: 300
  601. * @Default: 3
  602. *
  603. * Configure the exponential back off ratio using this
  604. * parameter for MAWC based NLO
  605. * ratio of exponential backoff, next = current + current*ratio/100
  606. *
  607. * Related: NLO, PNO
  608. *
  609. * Usage: Internal/External
  610. *
  611. * </ini>
  612. */
  613. #define CFG_MAWC_NLO_EXP_BACKOFF_RATIO CFG_INI_UINT( \
  614. "mawc_nlo_exp_backoff_ratio", \
  615. 0, \
  616. 300, \
  617. 3, \
  618. CFG_VALUE_OR_DEFAULT, \
  619. "MWAC based NLO exponential ratio")
  620. /*
  621. * <ini>
  622. * mawc_nlo_init_scan_interval - Initial Scan Interval
  623. * @Min: 1000
  624. * @Max: 0xFFFFFFFF
  625. * @Default: 10000
  626. *
  627. * Configure the initial scan interval using this
  628. * parameter for MAWC based NLO (Units in Milliseconds)
  629. *
  630. * Related: NLO, PNO
  631. *
  632. * Usage: Internal/External
  633. *
  634. * </ini>
  635. */
  636. #define CFG_MAWC_NLO_INIT_SCAN_INTERVAL CFG_INI_UINT( \
  637. "mawc_nlo_init_scan_interval", \
  638. 1000, \
  639. 0xFFFFFFFF, \
  640. 10000, \
  641. CFG_VALUE_OR_DEFAULT, \
  642. "Initial Scan Interval")
  643. /*
  644. * <ini>
  645. * mawc_nlo_max_scan_interval - Maximum Scan Interval
  646. * @Min: 1000
  647. * @Max: 0xFFFFFFFF
  648. * @Default: 60000
  649. *
  650. * Configure the maximum scan interval using this
  651. * parameter for MAWC based NLO (Units in Milliseconds)
  652. *
  653. * Related: NLO, PNO
  654. *
  655. * Usage: Internal/External
  656. *
  657. * </ini>
  658. */
  659. #define CFG_MAWC_NLO_MAX_SCAN_INTERVAL CFG_INI_UINT( \
  660. "mawc_nlo_max_scan_interval", \
  661. 1000, \
  662. 0xFFFFFFFF, \
  663. 60000, \
  664. CFG_VALUE_OR_DEFAULT, \
  665. "Maximum Scan Interval")
  666. #define CFG_SCAN_PNO \
  667. CFG(CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS) \
  668. CFG(CFG_MAX_SCHED_SCAN_PLAN_INTERVAL) \
  669. CFG(CFG_PNO_SCAN_SUPPORT) \
  670. CFG(CFG_ENABLE_DFS_PNO_CHNL_SCAN) \
  671. CFG(CFG_PNO_SCAN_TIMER_REPEAT_VALUE) \
  672. CFG(CFG_PNO_SLOW_SCAN_MULTIPLIER) \
  673. CFG(CFG_PNO_CHANNEL_PREDICTION) \
  674. CFG(CFG_TOP_K_NUM_OF_CHANNELS) \
  675. CFG(CFG_STATIONARY_THRESHOLD) \
  676. CFG(CFG_CHANNEL_PREDICTION_SCAN_TIMER) \
  677. CFG(CFG_ADAPTIVE_PNOSCAN_DWELL_MODE) \
  678. CFG(CFG_SCAN_BACKOFF_MULTIPLIER) \
  679. CFG(CFG_MAWC_NLO_ENABLED) \
  680. CFG(CFG_MAWC_NLO_EXP_BACKOFF_RATIO) \
  681. CFG(CFG_MAWC_NLO_INIT_SCAN_INTERVAL) \
  682. CFG(CFG_MAWC_NLO_MAX_SCAN_INTERVAL)
  683. #else
  684. #define CFG_SCAN_PNO
  685. #endif /* FEATURE_WLAN_SCAN_PNO */
  686. /*
  687. * <ini>
  688. * gActiveMaxChannelTimeConc - Maximum active scan time in milliseconds.
  689. * @Min: 0
  690. * @Max: 10000
  691. * @Default: 40
  692. *
  693. * This ini is used to set maximum active scan time in STA+SAP concurrent
  694. * mode.
  695. *
  696. * Related: None.
  697. *
  698. * Supported Feature: Concurrency
  699. *
  700. * Usage: Internal/External
  701. *
  702. * </ini>
  703. */
  704. #define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
  705. "gActiveMaxChannelTimeConc",\
  706. 0, 10000, MCL_OR_WIN_VALUE(40, 0),\
  707. CFG_VALUE_OR_DEFAULT, \
  708. "active scan time in STA+SAP concurrent")
  709. /*
  710. * <ini>
  711. * gPassiveMaxChannelTimeConc - Maximum passive scan time in milliseconds.
  712. * @Min: 0
  713. * @Max: 10000
  714. * @Default: 110
  715. *
  716. * This ini is used to set maximum passive scan time in STA+SAP concurrent
  717. * mode.
  718. *
  719. * Related: None.
  720. *
  721. * Supported Feature: Concurrency
  722. *
  723. * Usage: Internal/External
  724. *
  725. * </ini>
  726. */
  727. #define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
  728. "gPassiveMaxChannelTimeConc",\
  729. 0, 10000, MCL_OR_WIN_VALUE(110, 0),\
  730. CFG_VALUE_OR_DEFAULT, \
  731. "Set priority for connection with bssid_hint")
  732. /*
  733. * <ini>
  734. * gRestTimeConc - Rest time before moving to a new channel to scan.
  735. * @Min: 0
  736. * @Max: 10000
  737. * @Default: 100
  738. *
  739. * This ini is used to configure rest time.
  740. *
  741. * Related: None.
  742. *
  743. * Supported Feature: Concurrency
  744. *
  745. * Usage: Internal/External
  746. *
  747. * </ini>
  748. */
  749. #define CFG_MAX_REST_TIME_CONC CFG_INI_UINT(\
  750. "nRestTimeConc",\
  751. 0, 10000, MCL_OR_WIN_VALUE(100, 0),\
  752. CFG_VALUE_OR_DEFAULT, \
  753. "Rest time before moving to a new channel")
  754. /*
  755. * <ini>
  756. * min_rest_time_conc - Mininum time spent on home channel before moving to a
  757. * new channel to scan.
  758. * @Min: 0
  759. * @Max: 50
  760. * @Default: 50
  761. *
  762. * This ini is used to configure minimum time spent on home channel before
  763. * moving to a new channel to scan.
  764. *
  765. * Related: None.
  766. *
  767. * Supported Feature: Concurrency
  768. *
  769. * Usage: Internal/External
  770. *
  771. * </ini>
  772. */
  773. #define CFG_MIN_REST_TIME_CONC CFG_INI_UINT(\
  774. "min_rest_time_conc",\
  775. 0, 50, MCL_OR_WIN_VALUE(50, 0),\
  776. CFG_VALUE_OR_DEFAULT, \
  777. "minimum time spent on home channel")
  778. /*
  779. * <ini>
  780. * wake_lock_in_user_scan - use wake lock during user scan
  781. * @Min: 0
  782. * @Max: 1
  783. * @Default: 0
  784. *
  785. * This ini is used to define if wake lock is held used during user scan req
  786. *
  787. * Related: Scan
  788. *
  789. * Usage: Internal/External
  790. *
  791. * </ini>
  792. */
  793. #define CFG_ENABLE_WAKE_LOCK_IN_SCAN CFG_INI_BOOL( \
  794. "wake_lock_in_user_scan", \
  795. false, \
  796. "use wake lock during scan")
  797. /*
  798. * <ini>
  799. * gIdleTimeConc - Data inactivity time in msec.
  800. * @Min: 0
  801. * @Max: 25
  802. * @Default: 25
  803. *
  804. * This ini is used to configure data inactivity time in msec on bss channel
  805. * that will be used by scan engine in firmware.
  806. * For example if this value is 25ms then firmware will check for data
  807. * inactivity every 25ms till gRestTimeConc is reached.
  808. * If inactive then scan engine will move from home channel to scan the next
  809. * frequency.
  810. *
  811. * Related: None.
  812. *
  813. * Supported Feature: Concurrency
  814. *
  815. * Usage: Internal/External
  816. *
  817. * </ini>
  818. */
  819. #define CFG_IDLE_TIME_CONC CFG_INI_UINT(\
  820. "gIdleTimeConc",\
  821. 0, 25, MCL_OR_WIN_VALUE(25, 0),\
  822. CFG_VALUE_OR_DEFAULT, \
  823. "data inactivity time on bss channel")
  824. /*
  825. * <ini>
  826. * gEnableMacAddrSpoof - Enable mac address randomization feature.
  827. * @Min: 0
  828. * @Max: 1
  829. * @Default: 1
  830. *
  831. * This ini is used to enable/disable mac address randomization for scan.
  832. *
  833. * Supported Feature: SCAN
  834. *
  835. *
  836. * Usage: Internal/External
  837. *
  838. * </ini>
  839. */
  840. #define CFG_ENABLE_MAC_ADDR_SPOOFING CFG_INI_BOOL( \
  841. "gEnableMacAddrSpoof", \
  842. true, \
  843. "Enable mac spoofing")
  844. /*
  845. * <ini>
  846. * gScanAgingTime - Set scan aging time
  847. * @Min: 0
  848. * @Max: 200
  849. * @Default: 30
  850. *
  851. * This ini is used to set scan aging timeout value
  852. * in secs. For example after 30 secs the bss results
  853. * greater than 30secs age will be flushed.
  854. *
  855. * Related: None
  856. *
  857. * Supported Feature: Scan
  858. *
  859. * Usage: External
  860. *
  861. * </ini>
  862. */
  863. #ifdef QCA_WIFI_NAPIER_EMULATION
  864. #define CFG_SCAN_AGING_TIME_DEFAULT (90)
  865. #else
  866. #define CFG_SCAN_AGING_TIME_DEFAULT (30)
  867. #endif
  868. #define CFG_SCAN_AGING_TIME CFG_INI_UINT( \
  869. "gScanAgingTime", \
  870. 0, \
  871. 200, \
  872. CFG_SCAN_AGING_TIME_DEFAULT, \
  873. CFG_VALUE_OR_DEFAULT, \
  874. "scan aging time")
  875. #define CFG_SCAN_ALL \
  876. CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
  877. CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
  878. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
  879. CFG(CFG_ENABLE_DFS_SCAN) \
  880. CFG(CFG_INITIAL_NO_DFS_SCAN) \
  881. CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \
  882. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
  883. CFG(CFG_SCAN_NUM_PROBES) \
  884. CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
  885. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
  886. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC) \
  887. CFG(CFG_IS_BSSID_HINT_PRIORITY) \
  888. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
  889. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \
  890. CFG(CFG_MAX_REST_TIME_CONC) \
  891. CFG(CFG_MIN_REST_TIME_CONC) \
  892. CFG(CFG_IDLE_TIME_CONC) \
  893. CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
  894. CFG(CFG_SCAN_AGING_TIME) \
  895. CFG_SCAN_PNO
  896. #endif /* __CONFIG_SCAN_H */