wlan_scan_cfg.h 26 KB

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