wlan_scan_cfg.h 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174
  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. * honour_nl_scan_policy_flags - This ini will decide whether to honour
  246. * NL80211 scan policy flags
  247. * @Min: 0
  248. * @Max: 1
  249. * @Default: 1
  250. *
  251. * This parameter will decide whether to honour scan flags such as
  252. * NL80211_SCAN_FLAG_HIGH_ACCURACY , NL80211_SCAN_FLAG_LOW_SPAN,
  253. * NL80211_SCAN_FLAG_LOW_POWER.
  254. * Acceptable values for this:
  255. * 0: Config is disabled
  256. * 1: Config is enabled
  257. *
  258. * Related: None
  259. *
  260. * Supported Feature: Scan
  261. *
  262. * Usage: Internal
  263. *
  264. * </ini>
  265. */
  266. #define CFG_HONOUR_NL_SCAN_POLICY_FLAGS CFG_INI_BOOL(\
  267. "honour_nl_scan_policy_flags",\
  268. true, \
  269. "honour NL80211 scan policy flags")
  270. /*
  271. * <ini>
  272. * is_bssid_hint_priority - Set priority for connection with bssid_hint
  273. * BSSID.
  274. * @Min: 0
  275. * @Max: 1
  276. * @Default: 1
  277. *
  278. * This ini is used to give priority to BSS for connection which comes
  279. * as part of bssid_hint
  280. *
  281. * Related: None
  282. *
  283. * Supported Feature: STA
  284. *
  285. * Usage: External
  286. *
  287. * </ini>
  288. */
  289. #define CFG_IS_BSSID_HINT_PRIORITY CFG_INI_UINT(\
  290. "is_bssid_hint_priority",\
  291. 0, 1, 0,\
  292. CFG_VALUE_OR_DEFAULT, \
  293. "Set priority for connection with bssid_hint")
  294. #ifdef FEATURE_WLAN_SCAN_PNO
  295. /*
  296. * <ini>
  297. * g_max_sched_scan_plan_iterations - pno sched max scan plan iterations.
  298. * @Min: 1
  299. * @Max: 100
  300. * @Default: 10
  301. *
  302. * This ini is used to set max sched scan plan iterations for pno scan
  303. * (value in seconds).
  304. *
  305. * Related: gPNOScanSupport
  306. *
  307. * Supported Feature: PNO scan
  308. *
  309. * Usage: External
  310. *
  311. * </ini>
  312. */
  313. #define CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS CFG_INI_UINT( \
  314. "g_max_sched_scan_plan_iterations", \
  315. 1, 100, 10, \
  316. CFG_VALUE_OR_DEFAULT, \
  317. "Max sched scan plan iterations")
  318. /*
  319. * <ini>
  320. * g_max_sched_scan_plan_int - pno sched max scan plan interval.
  321. * @Min: 1
  322. * @Max: 7200
  323. * @Default: 3600
  324. *
  325. * This ini is used to set max sched scan plan interval for pno scan
  326. * (value in seconds).
  327. *
  328. * Related: gPNOScanSupport
  329. *
  330. * Supported Feature: PNO scan
  331. *
  332. * Usage: External
  333. *
  334. * </ini>
  335. */
  336. #define CFG_MAX_SCHED_SCAN_PLAN_INTERVAL CFG_INI_UINT( \
  337. "g_max_sched_scan_plan_int", \
  338. 1, 7200, 3600, \
  339. CFG_VALUE_OR_DEFAULT, \
  340. "Max sched scan plan interval")
  341. /*
  342. * <ini>
  343. * gEnableDFSPnoChnlScan - enable dfs channels in PNO scan
  344. * @Min: 0
  345. * @Max: 1
  346. * @Default: 1
  347. *
  348. * This ini is used to enable/disable dfs channels in PNO scan request,
  349. * enabling this ini enables driver to include dfs channels in its
  350. * PNO scan request
  351. * Related: NA
  352. *
  353. * Supported Feature: DFS, PNO
  354. *
  355. * Usage: Internal/External
  356. *
  357. * </ini>
  358. */
  359. #define CFG_ENABLE_DFS_PNO_CHNL_SCAN CFG_INI_BOOL( \
  360. "gEnableDFSPnoChnlScan", \
  361. true, \
  362. "Enable dfs channels in PNO Scan")
  363. /*
  364. * <ini>
  365. * gPNOScanSupport - Enable or Disable PNO scan
  366. * @Min: 0
  367. * @Max: 1
  368. * @Default: 1
  369. *
  370. * This ini is used to Enable or Disable PNO scan
  371. *
  372. * Related: None
  373. *
  374. * Supported Feature: Scan
  375. *
  376. * Usage: External
  377. *
  378. * </ini>
  379. */
  380. #define CFG_PNO_SCAN_SUPPORT CFG_INI_BOOL( \
  381. "gPNOScanSupport", \
  382. true, \
  383. "Enable/Disable PNO scan")
  384. /*
  385. * <ini>
  386. * gPNOScanTimerRepeatValue - Set PNO scan timer repeat value
  387. * @Min: 0
  388. * @Max: 0xffffffff
  389. * @Default: 30
  390. *
  391. * This ini is used by firmware to set fast scan max cycles
  392. * equal to gPNOScanTimerRepeatValue. Taking power consumption
  393. * into account firmware after gPNOScanTimerRepeatValue times
  394. * fast_scan_period switches to slow_scan_period.
  395. *
  396. * Usage: External
  397. *
  398. * </ini>
  399. */
  400. #define CFG_PNO_SCAN_TIMER_REPEAT_VALUE CFG_INI_UINT( \
  401. "gPNOScanTimerRepeatValue", \
  402. 0, \
  403. 0xffffffff, \
  404. 30, \
  405. CFG_VALUE_OR_DEFAULT, \
  406. "PNO scan timer repeat value")
  407. /*
  408. * <ini>
  409. * gPNOSlowScanMultiplier - Set PNO slow scan multiplier
  410. * @Min: 0
  411. * @Max: 30
  412. * @Default: 6
  413. *
  414. * This ini is used by firmware to set slow scan period
  415. * as gPNOSlowScanMultiplier times fast_scan_period.
  416. *
  417. * Related: None
  418. *
  419. * Supported Feature: Scan
  420. *
  421. * Usage: External
  422. *
  423. * </ini>
  424. */
  425. #define CFG_PNO_SLOW_SCAN_MULTIPLIER CFG_INI_UINT( \
  426. "gPNOSlowScanMultiplier", \
  427. 0, \
  428. 30, \
  429. 6, \
  430. CFG_VALUE_OR_DEFAULT, \
  431. "PNO slow scan multiplier")
  432. /*
  433. * <ini>
  434. * gPNOChannelPrediction - Enable/disable the PNO channel
  435. * prediction feature.
  436. * @Min: 0
  437. * @Max: 1
  438. * @Default: 0
  439. *
  440. * In current PNO implementation, scan is always done until all configured
  441. * channels are scanned. If we can determine DUT is stationary based on
  442. * scanning a subset of channels, we may cancel the remaining channels.
  443. * Hence, we can save additional power consumption.
  444. *
  445. * Related: None
  446. *
  447. * Supported Feature: Scan
  448. *
  449. * Usage: External
  450. *
  451. * </ini>
  452. */
  453. #define CFG_PNO_CHANNEL_PREDICTION CFG_INI_BOOL( \
  454. "gPNOChannelPrediction", \
  455. false, \
  456. "enable/disable PNO channel prediction feature")
  457. /*
  458. * <ini>
  459. * gTopKNumOfChannels - top K number of channels are used for tanimoto distance
  460. * @Min: 1
  461. * @Max: 5
  462. * @Default: 3
  463. *
  464. * These are the top channels on which the probability of finding the AP's is
  465. * extremely high. This number is intended for tweaking the internal algorithm
  466. * for experiments. This should not be changed externally.
  467. *
  468. * Related: None
  469. *
  470. * Supported Feature: Scan
  471. *
  472. * Usage: External
  473. *
  474. * </ini>
  475. */
  476. #define CFG_TOP_K_NUM_OF_CHANNELS CFG_INI_UINT( \
  477. "gTopKNumOfChannels", \
  478. 1, \
  479. 5, \
  480. 3, \
  481. CFG_VALUE_OR_DEFAULT, \
  482. "Top K number of channels")
  483. /*
  484. * <ini>
  485. * gStationaryThreshold - STA threshold value to determine if it is stationary
  486. * @Min: 0
  487. * @Max: 100
  488. * @Default: 10
  489. *
  490. * This is the threshold value to determine that the STA is
  491. * stationary. If the tanimoto distance is less than this
  492. * value, then the device is considered to be stationary.
  493. * This parameter is intended to tweak the internal algorithm
  494. * for experiments. This should not be changed externally.
  495. *
  496. *
  497. * Related: None
  498. *
  499. * Supported Feature: Scan
  500. *
  501. * Usage: External
  502. *
  503. * </ini>
  504. */
  505. #define CFG_STATIONARY_THRESHOLD CFG_INI_UINT( \
  506. "gStationaryThreshold", \
  507. 0, \
  508. 100, \
  509. 10, \
  510. CFG_VALUE_OR_DEFAULT, \
  511. "Threshold to determine if sta is stationary")
  512. /*
  513. * <ini>
  514. * gChPredictionFullScanMs - Set periodic timer for channel prediction
  515. * @Min: 3000
  516. * @Max: 0x7fffffff
  517. * @Default: 60000
  518. *
  519. * This ini is used to set the periodic timer upon which
  520. * a full scan needs to be triggered when PNO channel
  521. * prediction feature is enabled. This parameter is intended
  522. * to tweak the internal algortihm for experiments.
  523. *
  524. * Related: None
  525. *
  526. * Supported Feature: Scan
  527. *
  528. * Usage: Internal
  529. *
  530. * </ini>
  531. */
  532. #define CFG_CHANNEL_PREDICTION_SCAN_TIMER CFG_INI_UINT( \
  533. "gChPredictionFullScanMs", \
  534. 3000, \
  535. 0x7fffffff, \
  536. 60000, \
  537. CFG_VALUE_OR_DEFAULT, \
  538. "Timer value for channel prediction")
  539. /*
  540. * <ini>
  541. * pnoscan_adaptive_dwell_mode - Enable adaptive dwell mode
  542. * during pno scan
  543. * @Min: 0
  544. * @Max: 4
  545. * @Default: 1
  546. *
  547. * This ini will set the algo used in dwell time optimization
  548. * during pno scan. see enum scan_dwelltime_adaptive_mode.
  549. * Acceptable values for this:
  550. * 0: Default (Use firmware default mode)
  551. * 1: Conservative optimization
  552. * 2: Moderate optimization
  553. * 3: Aggressive optimization
  554. * 4: Static
  555. *
  556. * Related: None
  557. *
  558. * Supported Feature: Scan
  559. *
  560. * Usage: External
  561. *
  562. * </ini>
  563. */
  564. #define CFG_ADAPTIVE_PNOSCAN_DWELL_MODE CFG_INI_UINT( \
  565. "pnoscan_adaptive_dwell_mode", \
  566. 0, \
  567. 4, \
  568. 1, \
  569. CFG_VALUE_OR_DEFAULT, \
  570. "Algorithm used in dwell time optimization")
  571. /*
  572. * <ini>
  573. * gScanBackoffMultiplier - For NLO/PNO, multiply fast scan period by this every
  574. * max cycles
  575. * @Min: 0
  576. * @Max: 255
  577. * @Default: 0
  578. *
  579. * For Network Listen Offload and Perfered Network Offload, multiply the fast
  580. * scan period by this value after max cycles have occurred. Setting this to 0
  581. * disables the feature.
  582. *
  583. * @E.g.
  584. * # Disable scan backoff multiplier
  585. * gScanBackoffMultiplier=0
  586. * # Effectively the same
  587. * gScanBackoffMultiplier=1
  588. * # Double the scan period after each max cycles have occurred
  589. * gScanBackoffMultiplier=2
  590. *
  591. * Related: NLO, PNO
  592. *
  593. * Usage: Internal/External
  594. *
  595. * </ini>
  596. */
  597. #define CFG_SCAN_BACKOFF_MULTIPLIER CFG_INI_UINT( \
  598. "gScanBackoffMultiplier", \
  599. 0, \
  600. 255, \
  601. 0, \
  602. CFG_VALUE_OR_DEFAULT, \
  603. "Scan backoff multiplier")
  604. /*
  605. * <ini>
  606. * mawc_nlo_enabled - For NLO/PNO, enable MAWC based scan
  607. * @Min: 0
  608. * @Max: 1
  609. * @Default: 1
  610. *
  611. * Enable/Disable the Motion Aided Wireless Connectivity
  612. * based NLO using this parameter
  613. *
  614. * Related: NLO, PNO
  615. *
  616. * Usage: Internal/External
  617. *
  618. * </ini>
  619. */
  620. #define CFG_MAWC_NLO_ENABLED CFG_INI_BOOL( \
  621. "mawc_nlo_enabled", \
  622. 1, \
  623. "Enable MAWC based scan")
  624. /*
  625. * <ini>
  626. * mawc_nlo_exp_backoff_ratio - Exponential back off ratio
  627. * @Min: 0
  628. * @Max: 300
  629. * @Default: 3
  630. *
  631. * Configure the exponential back off ratio using this
  632. * parameter for MAWC based NLO
  633. * ratio of exponential backoff, next = current + current*ratio/100
  634. *
  635. * Related: NLO, PNO
  636. *
  637. * Usage: Internal/External
  638. *
  639. * </ini>
  640. */
  641. #define CFG_MAWC_NLO_EXP_BACKOFF_RATIO CFG_INI_UINT( \
  642. "mawc_nlo_exp_backoff_ratio", \
  643. 0, \
  644. 300, \
  645. 3, \
  646. CFG_VALUE_OR_DEFAULT, \
  647. "MWAC based NLO exponential ratio")
  648. /*
  649. * <ini>
  650. * mawc_nlo_init_scan_interval - Initial Scan Interval
  651. * @Min: 1000
  652. * @Max: 0xFFFFFFFF
  653. * @Default: 10000
  654. *
  655. * Configure the initial scan interval using this
  656. * parameter for MAWC based NLO (Units in Milliseconds)
  657. *
  658. * Related: NLO, PNO
  659. *
  660. * Usage: Internal/External
  661. *
  662. * </ini>
  663. */
  664. #define CFG_MAWC_NLO_INIT_SCAN_INTERVAL CFG_INI_UINT( \
  665. "mawc_nlo_init_scan_interval", \
  666. 1000, \
  667. 0xFFFFFFFF, \
  668. 10000, \
  669. CFG_VALUE_OR_DEFAULT, \
  670. "Initial Scan Interval")
  671. /*
  672. * <ini>
  673. * mawc_nlo_max_scan_interval - Maximum Scan Interval
  674. * @Min: 1000
  675. * @Max: 0xFFFFFFFF
  676. * @Default: 60000
  677. *
  678. * Configure the maximum scan interval using this
  679. * parameter for MAWC based NLO (Units in Milliseconds)
  680. *
  681. * Related: NLO, PNO
  682. *
  683. * Usage: Internal/External
  684. *
  685. * </ini>
  686. */
  687. #define CFG_MAWC_NLO_MAX_SCAN_INTERVAL CFG_INI_UINT( \
  688. "mawc_nlo_max_scan_interval", \
  689. 1000, \
  690. 0xFFFFFFFF, \
  691. 60000, \
  692. CFG_VALUE_OR_DEFAULT, \
  693. "Maximum Scan Interval")
  694. #define CFG_SCAN_PNO \
  695. CFG(CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS) \
  696. CFG(CFG_MAX_SCHED_SCAN_PLAN_INTERVAL) \
  697. CFG(CFG_PNO_SCAN_SUPPORT) \
  698. CFG(CFG_ENABLE_DFS_PNO_CHNL_SCAN) \
  699. CFG(CFG_PNO_SCAN_TIMER_REPEAT_VALUE) \
  700. CFG(CFG_PNO_SLOW_SCAN_MULTIPLIER) \
  701. CFG(CFG_PNO_CHANNEL_PREDICTION) \
  702. CFG(CFG_TOP_K_NUM_OF_CHANNELS) \
  703. CFG(CFG_STATIONARY_THRESHOLD) \
  704. CFG(CFG_CHANNEL_PREDICTION_SCAN_TIMER) \
  705. CFG(CFG_ADAPTIVE_PNOSCAN_DWELL_MODE) \
  706. CFG(CFG_SCAN_BACKOFF_MULTIPLIER) \
  707. CFG(CFG_MAWC_NLO_ENABLED) \
  708. CFG(CFG_MAWC_NLO_EXP_BACKOFF_RATIO) \
  709. CFG(CFG_MAWC_NLO_INIT_SCAN_INTERVAL) \
  710. CFG(CFG_MAWC_NLO_MAX_SCAN_INTERVAL)
  711. #else
  712. #define CFG_SCAN_PNO
  713. #endif /* FEATURE_WLAN_SCAN_PNO */
  714. /*
  715. * <ini>
  716. * gActiveMaxChannelTimeConc - Maximum active scan time in milliseconds.
  717. * @Min: 0
  718. * @Max: 10000
  719. * @Default: 40
  720. *
  721. * This ini is used to set maximum active scan time in STA+SAP concurrent
  722. * mode.
  723. *
  724. * Related: None.
  725. *
  726. * Supported Feature: Concurrency
  727. *
  728. * Usage: Internal/External
  729. *
  730. * </ini>
  731. */
  732. #define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
  733. "gActiveMaxChannelTimeConc",\
  734. 0, 10000, MCL_OR_WIN_VALUE(40, 0),\
  735. CFG_VALUE_OR_DEFAULT, \
  736. "active scan time in STA+SAP concurrent")
  737. /*
  738. * <ini>
  739. * gPassiveMaxChannelTimeConc - Maximum passive scan time in milliseconds.
  740. * @Min: 0
  741. * @Max: 10000
  742. * @Default: 110
  743. *
  744. * This ini is used to set maximum passive scan time in STA+SAP concurrent
  745. * mode.
  746. *
  747. * Related: None.
  748. *
  749. * Supported Feature: Concurrency
  750. *
  751. * Usage: Internal/External
  752. *
  753. * </ini>
  754. */
  755. #define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
  756. "gPassiveMaxChannelTimeConc",\
  757. 0, 10000, MCL_OR_WIN_VALUE(110, 0),\
  758. CFG_VALUE_OR_DEFAULT, \
  759. "Set priority for connection with bssid_hint")
  760. /*
  761. * <ini>
  762. * gRestTimeConc - Rest time before moving to a new channel to scan.
  763. * @Min: 0
  764. * @Max: 10000
  765. * @Default: 100
  766. *
  767. * This ini is used to configure rest time.
  768. *
  769. * Related: None.
  770. *
  771. * Supported Feature: Concurrency
  772. *
  773. * Usage: Internal/External
  774. *
  775. * </ini>
  776. */
  777. #define CFG_MAX_REST_TIME_CONC CFG_INI_UINT(\
  778. "nRestTimeConc",\
  779. 0, 10000, MCL_OR_WIN_VALUE(100, 0),\
  780. CFG_VALUE_OR_DEFAULT, \
  781. "Rest time before moving to a new channel")
  782. /*
  783. * <ini>
  784. * min_rest_time_conc - Mininum time spent on home channel before moving to a
  785. * new channel to scan.
  786. * @Min: 0
  787. * @Max: 50
  788. * @Default: 50
  789. *
  790. * This ini is used to configure minimum time spent on home channel before
  791. * moving to a new channel to scan.
  792. *
  793. * Related: None.
  794. *
  795. * Supported Feature: Concurrency
  796. *
  797. * Usage: Internal/External
  798. *
  799. * </ini>
  800. */
  801. #define CFG_MIN_REST_TIME_CONC CFG_INI_UINT(\
  802. "min_rest_time_conc",\
  803. 0, 50, MCL_OR_WIN_VALUE(50, 0),\
  804. CFG_VALUE_OR_DEFAULT, \
  805. "minimum time spent on home channel")
  806. /*
  807. * <ini>
  808. * wake_lock_in_user_scan - use wake lock during user scan
  809. * @Min: 0
  810. * @Max: 1
  811. * @Default: 0
  812. *
  813. * This ini is used to define if wake lock is held used during user scan req
  814. *
  815. * Related: Scan
  816. *
  817. * Usage: Internal/External
  818. *
  819. * </ini>
  820. */
  821. #define CFG_ENABLE_WAKE_LOCK_IN_SCAN CFG_INI_BOOL( \
  822. "wake_lock_in_user_scan", \
  823. false, \
  824. "use wake lock during scan")
  825. /*
  826. * <ini>
  827. * gIdleTimeConc - Data inactivity time in msec.
  828. * @Min: 0
  829. * @Max: 25
  830. * @Default: 25
  831. *
  832. * This ini is used to configure data inactivity time in msec on bss channel
  833. * that will be used by scan engine in firmware.
  834. * For example if this value is 25ms then firmware will check for data
  835. * inactivity every 25ms till gRestTimeConc is reached.
  836. * If inactive then scan engine will move from home channel to scan the next
  837. * frequency.
  838. *
  839. * Related: None.
  840. *
  841. * Supported Feature: Concurrency
  842. *
  843. * Usage: Internal/External
  844. *
  845. * </ini>
  846. */
  847. #define CFG_IDLE_TIME_CONC CFG_INI_UINT(\
  848. "gIdleTimeConc",\
  849. 0, 25, MCL_OR_WIN_VALUE(25, 0),\
  850. CFG_VALUE_OR_DEFAULT, \
  851. "data inactivity time on bss channel")
  852. /*
  853. * <ini>
  854. * gEnableMacAddrSpoof - Enable mac address randomization feature.
  855. * @Min: 0
  856. * @Max: 1
  857. * @Default: 1
  858. *
  859. * This ini is used to enable/disable mac address randomization for scan.
  860. *
  861. * Supported Feature: SCAN
  862. *
  863. *
  864. * Usage: Internal/External
  865. *
  866. * </ini>
  867. */
  868. #define CFG_ENABLE_MAC_ADDR_SPOOFING CFG_INI_BOOL( \
  869. "gEnableMacAddrSpoof", \
  870. true, \
  871. "Enable mac spoofing")
  872. /*
  873. * <ini>
  874. * gScanAgingTime - Set scan aging time
  875. * @Min: 0
  876. * @Max: 200
  877. * @Default: 30
  878. *
  879. * This ini is used to set scan aging timeout value
  880. * in secs. For example after 30 secs the bss results
  881. * greater than 30secs age will be flushed.
  882. *
  883. * Related: None
  884. *
  885. * Supported Feature: Scan
  886. *
  887. * Usage: External
  888. *
  889. * </ini>
  890. */
  891. #ifdef QCA_WIFI_NAPIER_EMULATION
  892. #define CFG_SCAN_AGING_TIME_DEFAULT (90)
  893. #else
  894. #define CFG_SCAN_AGING_TIME_DEFAULT (30)
  895. #endif
  896. #define CFG_SCAN_AGING_TIME CFG_INI_UINT( \
  897. "gScanAgingTime", \
  898. 0, \
  899. 200, \
  900. CFG_SCAN_AGING_TIME_DEFAULT, \
  901. CFG_VALUE_OR_DEFAULT, \
  902. "scan aging time")
  903. /*
  904. * <ini>
  905. * extscan_adaptive_dwell_mode Enable adaptive dwell mode
  906. * during ext scan
  907. * @Min: 0
  908. * @Max: 4
  909. * @Default: 1
  910. *
  911. * This ini will set the algo used in dwell time optimization
  912. * during ext scan. see enum scan_dwelltime_adaptive_mode.
  913. * Acceptable values for this:
  914. * 0: Default (Use firmware default mode)
  915. * 1: Conservative optimization
  916. * 2: Moderate optimization
  917. * 3: Aggressive optimization
  918. * 4: Static
  919. *
  920. * Related: None
  921. *
  922. * Supported Feature: Scan
  923. *
  924. * Usage: External
  925. *
  926. * </ini>
  927. */
  928. #define CFG_ADAPTIVE_EXTSCAN_DWELL_MODE CFG_INI_UINT( \
  929. "extscan_adaptive_dwell_mode", \
  930. 0, \
  931. 4, \
  932. 1, \
  933. CFG_VALUE_OR_DEFAULT, \
  934. "ext scan adaptive dwell mode")
  935. /*
  936. * <ini>
  937. * sta_scan_burst_duration - Burst duration in case of split scan.
  938. * @Min: 0
  939. * @Max: 180
  940. * @Default: 0
  941. *
  942. * This ini is used to set burst duration of sta scan requests.
  943. *
  944. * Related: None.
  945. *
  946. * Supported Feature: Concurrency
  947. *
  948. * Usage: External
  949. *
  950. * </ini>
  951. */
  952. #define CFG_STA_SCAN_BURST_DURATION CFG_INI_UINT( \
  953. "sta_scan_burst_duration", \
  954. 0, \
  955. 180, \
  956. 0, \
  957. CFG_VALUE_OR_DEFAULT, \
  958. "sta scan burst duration")
  959. /*
  960. * <ini>
  961. * p2p_scan_burst_duration - Burst duration in case of split scan for p2p scan.
  962. * @Min: 0
  963. * @Max: 180
  964. * @Default: 0
  965. *
  966. * This ini is used to set burst duration of scan for p2p scan requests.
  967. *
  968. * Related: None.
  969. *
  970. * Supported Feature: Concurrency
  971. *
  972. * Usage: External
  973. *
  974. * </ini>
  975. */
  976. #define CFG_P2P_SCAN_BURST_DURATION CFG_INI_UINT( \
  977. "p2p_scan_burst_duration", \
  978. 0, \
  979. 180, \
  980. 0, \
  981. CFG_VALUE_OR_DEFAULT, \
  982. "p2p scan burst duration")
  983. /*
  984. * <ini>
  985. * go_scan_burst_duration - Burst duration in case of split scan when GO is
  986. * active.
  987. * @Min: 0
  988. * @Max: 180
  989. * @Default: 0
  990. *
  991. * This ini is used to set burst duration of scan when GO is active.
  992. *
  993. * Related: None.
  994. *
  995. * Supported Feature: Concurrency
  996. *
  997. * Usage: External
  998. *
  999. * </ini>
  1000. */
  1001. #define CFG_GO_SCAN_BURST_DURATION CFG_INI_UINT( \
  1002. "go_scan_burst_duration", \
  1003. 0, \
  1004. 180, \
  1005. 0, \
  1006. CFG_VALUE_OR_DEFAULT, \
  1007. "go scan burst duration")
  1008. /*
  1009. * <ini>
  1010. * ap_scan_burst_duration - Burst duration in case of split scan when ap
  1011. * is active.
  1012. * @Min: 0
  1013. * @Max: 32
  1014. * @Default: 0
  1015. *
  1016. * This ini is used to set burst duration of scan when SAP is active.
  1017. *
  1018. * Related: None.
  1019. *
  1020. * Supported Feature: Concurrency
  1021. *
  1022. * Usage: External
  1023. *
  1024. * </ini>
  1025. */
  1026. #define CFG_AP_SCAN_BURST_DURATION CFG_INI_UINT( \
  1027. "ap_scan_burst_duration", \
  1028. 0, \
  1029. 32, \
  1030. 0, \
  1031. CFG_VALUE_OR_DEFAULT, \
  1032. "ap scan burst duration")
  1033. /*
  1034. * <ini>
  1035. * gSkipDfsChannelInP2pSearch - Skip DFS Channel in case of P2P Search
  1036. * @Min: 0
  1037. * @Max: 1
  1038. * @Default: 1
  1039. *
  1040. * This ini is used to disable(skip) dfs channel in p2p search.
  1041. * Related: None.
  1042. *
  1043. * Supported Feature: DFS P2P
  1044. *
  1045. * Usage: External
  1046. *
  1047. * <ini>
  1048. */
  1049. #define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH CFG_INI_BOOL( \
  1050. "gSkipDfsChannelInP2pSearch", \
  1051. 1, \
  1052. "skip dfs channel in p2p search")
  1053. /*
  1054. * <ini>
  1055. * gEnableConnectedScan - Will enable or disable scan in connected state
  1056. * This ini is used to enable or disable the scanning in
  1057. * Connected state
  1058. * @Min: 0
  1059. * @Max: 1
  1060. * @Default: 1
  1061. *
  1062. * Related: None
  1063. *
  1064. * Supported Feature: STA
  1065. *
  1066. * Usage: External
  1067. *
  1068. * <ini>
  1069. */
  1070. #define CFG_ENABLE_CONNECTED_SCAN CFG_INI_BOOL( \
  1071. "gEnableConnectedScan", \
  1072. true, \
  1073. "Enable/disable scan in connected state")
  1074. /*
  1075. * <ini>
  1076. * gEnableSNRMonitoring - Enables SNR Monitoring
  1077. * @Min: 0
  1078. * @Max: 1
  1079. * @Default: 0
  1080. *
  1081. * This ini is used to set default snr monitor
  1082. *
  1083. * Related: None
  1084. *
  1085. * Supported Feature: STA
  1086. *
  1087. * Usage: Internal/External
  1088. *
  1089. * </ini>
  1090. */
  1091. #define CFG_ENABLE_SNR_MONITORING CFG_INI_BOOL(\
  1092. "gEnableSNRMonitoring",\
  1093. false,\
  1094. "Enable/Disable SNR Monitoring")
  1095. #define CFG_SCAN_ALL \
  1096. CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
  1097. CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
  1098. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
  1099. CFG(CFG_ENABLE_DFS_SCAN) \
  1100. CFG(CFG_ENABLE_CONNECTED_SCAN) \
  1101. CFG(CFG_INITIAL_NO_DFS_SCAN) \
  1102. CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \
  1103. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
  1104. CFG(CFG_SCAN_NUM_PROBES) \
  1105. CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
  1106. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
  1107. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC) \
  1108. CFG(CFG_HONOUR_NL_SCAN_POLICY_FLAGS) \
  1109. CFG(CFG_IS_BSSID_HINT_PRIORITY) \
  1110. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
  1111. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \
  1112. CFG(CFG_MAX_REST_TIME_CONC) \
  1113. CFG(CFG_MIN_REST_TIME_CONC) \
  1114. CFG(CFG_IDLE_TIME_CONC) \
  1115. CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
  1116. CFG(CFG_SCAN_AGING_TIME) \
  1117. CFG(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE) \
  1118. CFG(CFG_STA_SCAN_BURST_DURATION) \
  1119. CFG(CFG_P2P_SCAN_BURST_DURATION) \
  1120. CFG(CFG_GO_SCAN_BURST_DURATION) \
  1121. CFG(CFG_ENABLE_SNR_MONITORING) \
  1122. CFG(CFG_AP_SCAN_BURST_DURATION) \
  1123. CFG(CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH) \
  1124. CFG_SCAN_PNO
  1125. #endif /* __CONFIG_SCAN_H */