wlan_scan_cfg.h 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075
  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. /*
  876. * <ini>
  877. * extscan_adaptive_dwell_mode Enable adaptive dwell mode
  878. * during ext scan
  879. * @Min: 0
  880. * @Max: 4
  881. * @Default: 1
  882. *
  883. * This ini will set the algo used in dwell time optimization
  884. * during ext scan. see enum scan_dwelltime_adaptive_mode.
  885. * Acceptable values for this:
  886. * 0: Default (Use firmware default mode)
  887. * 1: Conservative optimization
  888. * 2: Moderate optimization
  889. * 3: Aggressive optimization
  890. * 4: Static
  891. *
  892. * Related: None
  893. *
  894. * Supported Feature: Scan
  895. *
  896. * Usage: External
  897. *
  898. * </ini>
  899. */
  900. #define CFG_ADAPTIVE_EXTSCAN_DWELL_MODE CFG_INI_UINT( \
  901. "extscan_adaptive_dwell_mode", \
  902. 0, \
  903. 4, \
  904. 1, \
  905. CFG_VALUE_OR_DEFAULT, \
  906. "ext scan adaptive dwell mode")
  907. /*
  908. * <ini>
  909. * sta_scan_burst_duration - Burst duration in case of split scan.
  910. * @Min: 0
  911. * @Max: 180
  912. * @Default: 0
  913. *
  914. * This ini is used to set burst duration of sta scan requests.
  915. *
  916. * Related: None.
  917. *
  918. * Supported Feature: Concurrency
  919. *
  920. * Usage: External
  921. *
  922. * </ini>
  923. */
  924. #define CFG_STA_SCAN_BURST_DURATION CFG_INI_UINT( \
  925. "sta_scan_burst_duration", \
  926. 0, \
  927. 180, \
  928. 0, \
  929. CFG_VALUE_OR_DEFAULT, \
  930. "sta scan burst duration")
  931. /*
  932. * <ini>
  933. * p2p_scan_burst_duration - Burst duration in case of split scan for p2p scan.
  934. * @Min: 0
  935. * @Max: 180
  936. * @Default: 0
  937. *
  938. * This ini is used to set burst duration of scan for p2p scan requests.
  939. *
  940. * Related: None.
  941. *
  942. * Supported Feature: Concurrency
  943. *
  944. * Usage: External
  945. *
  946. * </ini>
  947. */
  948. #define CFG_P2P_SCAN_BURST_DURATION CFG_INI_UINT( \
  949. "p2p_scan_burst_duration", \
  950. 0, \
  951. 180, \
  952. 0, \
  953. CFG_VALUE_OR_DEFAULT, \
  954. "p2p scan burst duration")
  955. /*
  956. * <ini>
  957. * go_scan_burst_duration - Burst duration in case of split scan when GO is
  958. * active.
  959. * @Min: 0
  960. * @Max: 180
  961. * @Default: 0
  962. *
  963. * This ini is used to set burst duration of scan when GO is active.
  964. *
  965. * Related: None.
  966. *
  967. * Supported Feature: Concurrency
  968. *
  969. * Usage: External
  970. *
  971. * </ini>
  972. */
  973. #define CFG_GO_SCAN_BURST_DURATION CFG_INI_UINT( \
  974. "go_scan_burst_duration", \
  975. 0, \
  976. 180, \
  977. 0, \
  978. CFG_VALUE_OR_DEFAULT, \
  979. "go scan burst duration")
  980. /*
  981. * <ini>
  982. * ap_scan_burst_duration - Burst duration in case of split scan when ap
  983. * is active.
  984. * @Min: 0
  985. * @Max: 32
  986. * @Default: 0
  987. *
  988. * This ini is used to set burst duration of scan when SAP is active.
  989. *
  990. * Related: None.
  991. *
  992. * Supported Feature: Concurrency
  993. *
  994. * Usage: External
  995. *
  996. * </ini>
  997. */
  998. #define CFG_AP_SCAN_BURST_DURATION CFG_INI_UINT( \
  999. "ap_scan_burst_duration", \
  1000. 0, \
  1001. 32, \
  1002. 0, \
  1003. CFG_VALUE_OR_DEFAULT, \
  1004. "ap scan burst duration")
  1005. #define CFG_SCAN_ALL \
  1006. CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
  1007. CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
  1008. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
  1009. CFG(CFG_ENABLE_DFS_SCAN) \
  1010. CFG(CFG_INITIAL_NO_DFS_SCAN) \
  1011. CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \
  1012. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
  1013. CFG(CFG_SCAN_NUM_PROBES) \
  1014. CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
  1015. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
  1016. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC) \
  1017. CFG(CFG_IS_BSSID_HINT_PRIORITY) \
  1018. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
  1019. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \
  1020. CFG(CFG_MAX_REST_TIME_CONC) \
  1021. CFG(CFG_MIN_REST_TIME_CONC) \
  1022. CFG(CFG_IDLE_TIME_CONC) \
  1023. CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
  1024. CFG(CFG_SCAN_AGING_TIME) \
  1025. CFG(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE) \
  1026. CFG(CFG_STA_SCAN_BURST_DURATION) \
  1027. CFG(CFG_P2P_SCAN_BURST_DURATION) \
  1028. CFG(CFG_GO_SCAN_BURST_DURATION) \
  1029. CFG(CFG_AP_SCAN_BURST_DURATION) \
  1030. CFG_SCAN_PNO
  1031. #endif /* __CONFIG_SCAN_H */