wlan_scan_cfg.h 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  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(110, 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. * </ini>
  448. */
  449. #define CFG_TOP_K_NUM_OF_CHANNELS CFG_INI_UINT( \
  450. "gTopKNumOfChannels", \
  451. 1, \
  452. 5, \
  453. 3, \
  454. CFG_VALUE_OR_DEFAULT, \
  455. "Top K number of channels")
  456. /*
  457. * <ini>
  458. * gStationaryThreshold - STA threshold value to determine if it is stationary
  459. * @Min: 0
  460. * @Max: 100
  461. * @Default: 10
  462. *
  463. * This is the threshold value to determine that the STA is
  464. * stationary. If the tanimoto distance is less than this
  465. * value, then the device is considered to be stationary.
  466. * This parameter is intended to tweak the internal algorithm
  467. * for experiments. This should not be changed externally.
  468. *
  469. *
  470. * Related: None
  471. *
  472. * Supported Feature: Scan
  473. *
  474. * Usage: External
  475. *
  476. * </ini>
  477. */
  478. #define CFG_STATIONARY_THRESHOLD CFG_INI_UINT( \
  479. "gStationaryThreshold", \
  480. 0, \
  481. 100, \
  482. 10, \
  483. CFG_VALUE_OR_DEFAULT, \
  484. "Threshold to determine if sta is stationary")
  485. /*
  486. * <ini>
  487. * gChPredictionFullScanMs - Set periodic timer for channel prediction
  488. * @Min: 3000
  489. * @Max: 0x7fffffff
  490. * @Default: 60000
  491. *
  492. * This ini is used to set the periodic timer upon which
  493. * a full scan needs to be triggered when PNO channel
  494. * prediction feature is enabled. This parameter is intended
  495. * to tweak the internal algortihm for experiments.
  496. *
  497. * Related: None
  498. *
  499. * Supported Feature: Scan
  500. *
  501. * Usage: Internal
  502. *
  503. * </ini>
  504. */
  505. #define CFG_CHANNEL_PREDICTION_SCAN_TIMER CFG_INI_UINT( \
  506. "gChPredictionFullScanMs", \
  507. 3000, \
  508. 0x7fffffff, \
  509. 60000, \
  510. CFG_VALUE_OR_DEFAULT, \
  511. "Timer value for channel prediction")
  512. /*
  513. * <ini>
  514. * pnoscan_adaptive_dwell_mode - Enable adaptive dwell mode
  515. * during pno scan
  516. * @Min: 0
  517. * @Max: 4
  518. * @Default: 1
  519. *
  520. * This ini will set the algo used in dwell time optimization
  521. * during pno scan. see enum scan_dwelltime_adaptive_mode.
  522. * Acceptable values for this:
  523. * 0: Default (Use firmware default mode)
  524. * 1: Conservative optimization
  525. * 2: Moderate optimization
  526. * 3: Aggressive optimization
  527. * 4: Static
  528. *
  529. * Related: None
  530. *
  531. * Supported Feature: Scan
  532. *
  533. * Usage: External
  534. *
  535. * </ini>
  536. */
  537. #define CFG_ADAPTIVE_PNOSCAN_DWELL_MODE CFG_INI_UINT( \
  538. "pnoscan_adaptive_dwell_mode", \
  539. 0, \
  540. 4, \
  541. 1, \
  542. CFG_VALUE_OR_DEFAULT, \
  543. "Algorithm used in dwell time optimization")
  544. /*
  545. * <ini>
  546. * gScanBackoffMultiplier - For NLO/PNO, multiply fast scan period by this every
  547. * max cycles
  548. * @Min: 0
  549. * @Max: 255
  550. * @Default: 0
  551. *
  552. * For Network Listen Offload and Perfered Network Offload, multiply the fast
  553. * scan period by this value after max cycles have occurred. Setting this to 0
  554. * disables the feature.
  555. *
  556. * @E.g.
  557. * # Disable scan backoff multiplier
  558. * gScanBackoffMultiplier=0
  559. * # Effectively the same
  560. * gScanBackoffMultiplier=1
  561. * # Double the scan period after each max cycles have occurred
  562. * gScanBackoffMultiplier=2
  563. *
  564. * Related: NLO, PNO
  565. *
  566. * Usage: Internal/External
  567. *
  568. * </ini>
  569. */
  570. #define CFG_SCAN_BACKOFF_MULTIPLIER CFG_INI_UINT( \
  571. "gScanBackoffMultiplier", \
  572. 0, \
  573. 255, \
  574. 0, \
  575. CFG_VALUE_OR_DEFAULT, \
  576. "Scan backoff multiplier")
  577. /*
  578. * <ini>
  579. * mawc_nlo_enabled - For NLO/PNO, enable MAWC based scan
  580. * @Min: 0
  581. * @Max: 1
  582. * @Default: 1
  583. *
  584. * Enable/Disable the Motion Aided Wireless Connectivity
  585. * based NLO using this parameter
  586. *
  587. * Related: NLO, PNO
  588. *
  589. * Usage: Internal/External
  590. *
  591. * </ini>
  592. */
  593. #define CFG_MAWC_NLO_ENABLED CFG_INI_BOOL( \
  594. "mawc_nlo_enabled", \
  595. 1, \
  596. "Enable MAWC based scan")
  597. /*
  598. * <ini>
  599. * mawc_nlo_exp_backoff_ratio - Exponential back off ratio
  600. * @Min: 0
  601. * @Max: 300
  602. * @Default: 3
  603. *
  604. * Configure the exponential back off ratio using this
  605. * parameter for MAWC based NLO
  606. * ratio of exponential backoff, next = current + current*ratio/100
  607. *
  608. * Related: NLO, PNO
  609. *
  610. * Usage: Internal/External
  611. *
  612. * </ini>
  613. */
  614. #define CFG_MAWC_NLO_EXP_BACKOFF_RATIO CFG_INI_UINT( \
  615. "mawc_nlo_exp_backoff_ratio", \
  616. 0, \
  617. 300, \
  618. 3, \
  619. CFG_VALUE_OR_DEFAULT, \
  620. "MWAC based NLO exponential ratio")
  621. /*
  622. * <ini>
  623. * mawc_nlo_init_scan_interval - Initial Scan Interval
  624. * @Min: 1000
  625. * @Max: 0xFFFFFFFF
  626. * @Default: 10000
  627. *
  628. * Configure the initial scan interval using this
  629. * parameter for MAWC based NLO (Units in Milliseconds)
  630. *
  631. * Related: NLO, PNO
  632. *
  633. * Usage: Internal/External
  634. *
  635. * </ini>
  636. */
  637. #define CFG_MAWC_NLO_INIT_SCAN_INTERVAL CFG_INI_UINT( \
  638. "mawc_nlo_init_scan_interval", \
  639. 1000, \
  640. 0xFFFFFFFF, \
  641. 10000, \
  642. CFG_VALUE_OR_DEFAULT, \
  643. "Initial Scan Interval")
  644. /*
  645. * <ini>
  646. * mawc_nlo_max_scan_interval - Maximum Scan Interval
  647. * @Min: 1000
  648. * @Max: 0xFFFFFFFF
  649. * @Default: 60000
  650. *
  651. * Configure the maximum scan interval using this
  652. * parameter for MAWC based NLO (Units in Milliseconds)
  653. *
  654. * Related: NLO, PNO
  655. *
  656. * Usage: Internal/External
  657. *
  658. * </ini>
  659. */
  660. #define CFG_MAWC_NLO_MAX_SCAN_INTERVAL CFG_INI_UINT( \
  661. "mawc_nlo_max_scan_interval", \
  662. 1000, \
  663. 0xFFFFFFFF, \
  664. 60000, \
  665. CFG_VALUE_OR_DEFAULT, \
  666. "Maximum Scan Interval")
  667. #define CFG_SCAN_PNO \
  668. CFG(CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS) \
  669. CFG(CFG_MAX_SCHED_SCAN_PLAN_INTERVAL) \
  670. CFG(CFG_PNO_SCAN_SUPPORT) \
  671. CFG(CFG_ENABLE_DFS_PNO_CHNL_SCAN) \
  672. CFG(CFG_PNO_SCAN_TIMER_REPEAT_VALUE) \
  673. CFG(CFG_PNO_SLOW_SCAN_MULTIPLIER) \
  674. CFG(CFG_PNO_CHANNEL_PREDICTION) \
  675. CFG(CFG_TOP_K_NUM_OF_CHANNELS) \
  676. CFG(CFG_STATIONARY_THRESHOLD) \
  677. CFG(CFG_CHANNEL_PREDICTION_SCAN_TIMER) \
  678. CFG(CFG_ADAPTIVE_PNOSCAN_DWELL_MODE) \
  679. CFG(CFG_SCAN_BACKOFF_MULTIPLIER) \
  680. CFG(CFG_MAWC_NLO_ENABLED) \
  681. CFG(CFG_MAWC_NLO_EXP_BACKOFF_RATIO) \
  682. CFG(CFG_MAWC_NLO_INIT_SCAN_INTERVAL) \
  683. CFG(CFG_MAWC_NLO_MAX_SCAN_INTERVAL)
  684. #else
  685. #define CFG_SCAN_PNO
  686. #endif /* FEATURE_WLAN_SCAN_PNO */
  687. /*
  688. * <ini>
  689. * gActiveMaxChannelTimeConc - Maximum active scan time in milliseconds.
  690. * @Min: 0
  691. * @Max: 10000
  692. * @Default: 40
  693. *
  694. * This ini is used to set maximum active scan time in STA+SAP concurrent
  695. * mode.
  696. *
  697. * Related: None.
  698. *
  699. * Supported Feature: Concurrency
  700. *
  701. * Usage: Internal/External
  702. *
  703. * </ini>
  704. */
  705. #define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
  706. "gActiveMaxChannelTimeConc",\
  707. 0, 10000, MCL_OR_WIN_VALUE(40, 0),\
  708. CFG_VALUE_OR_DEFAULT, \
  709. "active scan time in STA+SAP concurrent")
  710. /*
  711. * <ini>
  712. * gPassiveMaxChannelTimeConc - Maximum passive scan time in milliseconds.
  713. * @Min: 0
  714. * @Max: 10000
  715. * @Default: 110
  716. *
  717. * This ini is used to set maximum passive scan time in STA+SAP concurrent
  718. * mode.
  719. *
  720. * Related: None.
  721. *
  722. * Supported Feature: Concurrency
  723. *
  724. * Usage: Internal/External
  725. *
  726. * </ini>
  727. */
  728. #define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
  729. "gPassiveMaxChannelTimeConc",\
  730. 0, 10000, MCL_OR_WIN_VALUE(110, 0),\
  731. CFG_VALUE_OR_DEFAULT, \
  732. "Set priority for connection with bssid_hint")
  733. /*
  734. * <ini>
  735. * gRestTimeConc - Rest time before moving to a new channel to scan.
  736. * @Min: 0
  737. * @Max: 10000
  738. * @Default: 100
  739. *
  740. * This ini is used to configure rest time.
  741. *
  742. * Related: None.
  743. *
  744. * Supported Feature: Concurrency
  745. *
  746. * Usage: Internal/External
  747. *
  748. * </ini>
  749. */
  750. #define CFG_MAX_REST_TIME_CONC CFG_INI_UINT(\
  751. "nRestTimeConc",\
  752. 0, 10000, MCL_OR_WIN_VALUE(100, 0),\
  753. CFG_VALUE_OR_DEFAULT, \
  754. "Rest time before moving to a new channel")
  755. /*
  756. * <ini>
  757. * min_rest_time_conc - Mininum time spent on home channel before moving to a
  758. * new channel to scan.
  759. * @Min: 0
  760. * @Max: 50
  761. * @Default: 50
  762. *
  763. * This ini is used to configure minimum time spent on home channel before
  764. * moving to a new channel to scan.
  765. *
  766. * Related: None.
  767. *
  768. * Supported Feature: Concurrency
  769. *
  770. * Usage: Internal/External
  771. *
  772. * </ini>
  773. */
  774. #define CFG_MIN_REST_TIME_CONC CFG_INI_UINT(\
  775. "min_rest_time_conc",\
  776. 0, 50, MCL_OR_WIN_VALUE(50, 0),\
  777. CFG_VALUE_OR_DEFAULT, \
  778. "minimum time spent on home channel")
  779. /*
  780. * <ini>
  781. * wake_lock_in_user_scan - use wake lock during user scan
  782. * @Min: 0
  783. * @Max: 1
  784. * @Default: 0
  785. *
  786. * This ini is used to define if wake lock is held used during user scan req
  787. *
  788. * Related: Scan
  789. *
  790. * Usage: Internal/External
  791. *
  792. * </ini>
  793. */
  794. #define CFG_ENABLE_WAKE_LOCK_IN_SCAN CFG_INI_BOOL( \
  795. "wake_lock_in_user_scan", \
  796. false, \
  797. "use wake lock during scan")
  798. /*
  799. * <ini>
  800. * gIdleTimeConc - Data inactivity time in msec.
  801. * @Min: 0
  802. * @Max: 25
  803. * @Default: 25
  804. *
  805. * This ini is used to configure data inactivity time in msec on bss channel
  806. * that will be used by scan engine in firmware.
  807. * For example if this value is 25ms then firmware will check for data
  808. * inactivity every 25ms till gRestTimeConc is reached.
  809. * If inactive then scan engine will move from home channel to scan the next
  810. * frequency.
  811. *
  812. * Related: None.
  813. *
  814. * Supported Feature: Concurrency
  815. *
  816. * Usage: Internal/External
  817. *
  818. * </ini>
  819. */
  820. #define CFG_IDLE_TIME_CONC CFG_INI_UINT(\
  821. "gIdleTimeConc",\
  822. 0, 25, MCL_OR_WIN_VALUE(25, 0),\
  823. CFG_VALUE_OR_DEFAULT, \
  824. "data inactivity time on bss channel")
  825. /*
  826. * <ini>
  827. * gEnableMacAddrSpoof - Enable mac address randomization feature.
  828. * @Min: 0
  829. * @Max: 1
  830. * @Default: 1
  831. *
  832. * This ini is used to enable/disable mac address randomization for scan.
  833. *
  834. * Supported Feature: SCAN
  835. *
  836. *
  837. * Usage: Internal/External
  838. *
  839. * </ini>
  840. */
  841. #define CFG_ENABLE_MAC_ADDR_SPOOFING CFG_INI_BOOL( \
  842. "gEnableMacAddrSpoof", \
  843. true, \
  844. "Enable mac spoofing")
  845. /*
  846. * <ini>
  847. * gScanAgingTime - Set scan aging time
  848. * @Min: 0
  849. * @Max: 200
  850. * @Default: 30
  851. *
  852. * This ini is used to set scan aging timeout value
  853. * in secs. For example after 30 secs the bss results
  854. * greater than 30secs age will be flushed.
  855. *
  856. * Related: None
  857. *
  858. * Supported Feature: Scan
  859. *
  860. * Usage: External
  861. *
  862. * </ini>
  863. */
  864. #ifdef QCA_WIFI_NAPIER_EMULATION
  865. #define CFG_SCAN_AGING_TIME_DEFAULT (90)
  866. #else
  867. #define CFG_SCAN_AGING_TIME_DEFAULT (30)
  868. #endif
  869. #define CFG_SCAN_AGING_TIME CFG_INI_UINT( \
  870. "gScanAgingTime", \
  871. 0, \
  872. 200, \
  873. CFG_SCAN_AGING_TIME_DEFAULT, \
  874. CFG_VALUE_OR_DEFAULT, \
  875. "scan aging time")
  876. /*
  877. * <ini>
  878. * extscan_adaptive_dwell_mode Enable adaptive dwell mode
  879. * during ext scan
  880. * @Min: 0
  881. * @Max: 4
  882. * @Default: 1
  883. *
  884. * This ini will set the algo used in dwell time optimization
  885. * during ext scan. see enum scan_dwelltime_adaptive_mode.
  886. * Acceptable values for this:
  887. * 0: Default (Use firmware default mode)
  888. * 1: Conservative optimization
  889. * 2: Moderate optimization
  890. * 3: Aggressive optimization
  891. * 4: Static
  892. *
  893. * Related: None
  894. *
  895. * Supported Feature: Scan
  896. *
  897. * Usage: External
  898. *
  899. * </ini>
  900. */
  901. #define CFG_ADAPTIVE_EXTSCAN_DWELL_MODE CFG_INI_UINT( \
  902. "extscan_adaptive_dwell_mode", \
  903. 0, \
  904. 4, \
  905. 1, \
  906. CFG_VALUE_OR_DEFAULT, \
  907. "ext scan adaptive dwell mode")
  908. /*
  909. * <ini>
  910. * sta_scan_burst_duration - Burst duration in case of split scan.
  911. * @Min: 0
  912. * @Max: 180
  913. * @Default: 0
  914. *
  915. * This ini is used to set burst duration of sta scan requests.
  916. *
  917. * Related: None.
  918. *
  919. * Supported Feature: Concurrency
  920. *
  921. * Usage: External
  922. *
  923. * </ini>
  924. */
  925. #define CFG_STA_SCAN_BURST_DURATION CFG_INI_UINT( \
  926. "sta_scan_burst_duration", \
  927. 0, \
  928. 180, \
  929. 0, \
  930. CFG_VALUE_OR_DEFAULT, \
  931. "sta scan burst duration")
  932. /*
  933. * <ini>
  934. * p2p_scan_burst_duration - Burst duration in case of split scan for p2p scan.
  935. * @Min: 0
  936. * @Max: 180
  937. * @Default: 0
  938. *
  939. * This ini is used to set burst duration of scan for p2p scan requests.
  940. *
  941. * Related: None.
  942. *
  943. * Supported Feature: Concurrency
  944. *
  945. * Usage: External
  946. *
  947. * </ini>
  948. */
  949. #define CFG_P2P_SCAN_BURST_DURATION CFG_INI_UINT( \
  950. "p2p_scan_burst_duration", \
  951. 0, \
  952. 180, \
  953. 0, \
  954. CFG_VALUE_OR_DEFAULT, \
  955. "p2p scan burst duration")
  956. /*
  957. * <ini>
  958. * go_scan_burst_duration - Burst duration in case of split scan when GO is
  959. * active.
  960. * @Min: 0
  961. * @Max: 180
  962. * @Default: 0
  963. *
  964. * This ini is used to set burst duration of scan when GO is active.
  965. *
  966. * Related: None.
  967. *
  968. * Supported Feature: Concurrency
  969. *
  970. * Usage: External
  971. *
  972. * </ini>
  973. */
  974. #define CFG_GO_SCAN_BURST_DURATION CFG_INI_UINT( \
  975. "go_scan_burst_duration", \
  976. 0, \
  977. 180, \
  978. 0, \
  979. CFG_VALUE_OR_DEFAULT, \
  980. "go scan burst duration")
  981. /*
  982. * <ini>
  983. * ap_scan_burst_duration - Burst duration in case of split scan when ap
  984. * is active.
  985. * @Min: 0
  986. * @Max: 32
  987. * @Default: 0
  988. *
  989. * This ini is used to set burst duration of scan when SAP is active.
  990. *
  991. * Related: None.
  992. *
  993. * Supported Feature: Concurrency
  994. *
  995. * Usage: External
  996. *
  997. * </ini>
  998. */
  999. #define CFG_AP_SCAN_BURST_DURATION CFG_INI_UINT( \
  1000. "ap_scan_burst_duration", \
  1001. 0, \
  1002. 32, \
  1003. 0, \
  1004. CFG_VALUE_OR_DEFAULT, \
  1005. "ap scan burst duration")
  1006. /*
  1007. * <ini>
  1008. * gSkipDfsChannelInP2pSearch - Skip DFS Channel in case of P2P Search
  1009. * @Min: 0
  1010. * @Max: 1
  1011. * @Default: 1
  1012. *
  1013. * This ini is used to disable(skip) dfs channel in p2p search.
  1014. * Related: None.
  1015. *
  1016. * Supported Feature: DFS P2P
  1017. *
  1018. * Usage: External
  1019. *
  1020. * <ini>
  1021. */
  1022. #define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH CFG_INI_BOOL( \
  1023. "gSkipDfsChannelInP2pSearch", \
  1024. 1, \
  1025. "skip dfs channel in p2p search")
  1026. /*
  1027. * <ini>
  1028. * gEnableConnectedScan - Will enable or disable scan in connected state
  1029. * This ini is used to enable or disable the scanning in
  1030. * Connected state
  1031. * @Min: 0
  1032. * @Max: 1
  1033. * @Default: 1
  1034. *
  1035. * Related: None
  1036. *
  1037. * Supported Feature: STA
  1038. *
  1039. * Usage: External
  1040. *
  1041. * <ini>
  1042. */
  1043. #define CFG_ENABLE_CONNECTED_SCAN CFG_INI_BOOL( \
  1044. "gEnableConnectedScan", \
  1045. true, \
  1046. "Enable/disable scan in connected state")
  1047. /*
  1048. * <ini>
  1049. * gEnableSNRMonitoring - Enables SNR Monitoring
  1050. * @Min: 0
  1051. * @Max: 1
  1052. * @Default: 0
  1053. *
  1054. * This ini is used to set default snr monitor
  1055. *
  1056. * Related: None
  1057. *
  1058. * Supported Feature: STA
  1059. *
  1060. * Usage: Internal/External
  1061. *
  1062. * </ini>
  1063. */
  1064. #define CFG_ENABLE_SNR_MONITORING CFG_INI_BOOL(\
  1065. "gEnableSNRMonitoring",\
  1066. false,\
  1067. "Enable/Disable SNR Monitoring")
  1068. #define CFG_SCAN_ALL \
  1069. CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
  1070. CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
  1071. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
  1072. CFG(CFG_ENABLE_DFS_SCAN) \
  1073. CFG(CFG_ENABLE_CONNECTED_SCAN) \
  1074. CFG(CFG_INITIAL_NO_DFS_SCAN) \
  1075. CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \
  1076. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
  1077. CFG(CFG_SCAN_NUM_PROBES) \
  1078. CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
  1079. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
  1080. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC) \
  1081. CFG(CFG_IS_BSSID_HINT_PRIORITY) \
  1082. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
  1083. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \
  1084. CFG(CFG_MAX_REST_TIME_CONC) \
  1085. CFG(CFG_MIN_REST_TIME_CONC) \
  1086. CFG(CFG_IDLE_TIME_CONC) \
  1087. CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
  1088. CFG(CFG_SCAN_AGING_TIME) \
  1089. CFG(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE) \
  1090. CFG(CFG_STA_SCAN_BURST_DURATION) \
  1091. CFG(CFG_P2P_SCAN_BURST_DURATION) \
  1092. CFG(CFG_GO_SCAN_BURST_DURATION) \
  1093. CFG(CFG_ENABLE_SNR_MONITORING) \
  1094. CFG(CFG_AP_SCAN_BURST_DURATION) \
  1095. CFG(CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH) \
  1096. CFG_SCAN_PNO
  1097. #endif /* __CONFIG_SCAN_H */