wlan_scan_cfg.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098
  1. /*
  2. * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * DOC: This file contains centralized definitions of SCAN component
  20. */
  21. #ifndef __CONFIG_SCAN_H
  22. #define __CONFIG_SCAN_H
  23. #include "cfg_define.h"
  24. /*
  25. * <ini>
  26. * drop_bcn_on_chan_mismatch - drop the beacon for chan mismatch
  27. * @Min: 0
  28. * @Max: 1
  29. * @Default: 1
  30. *
  31. * This ini is used to decide drop the beacon or not if channel received
  32. * in metadata doesn't match the one in beacon.
  33. *
  34. * Related: None
  35. *
  36. * Usage: External
  37. *
  38. * </ini>
  39. */
  40. #define CFG_DROP_BCN_ON_CHANNEL_MISMATCH CFG_INI_BOOL(\
  41. "drop_bcn_on_chan_mismatch",\
  42. true,\
  43. "drop bcn on channel mismatch")
  44. /*
  45. * <ini>
  46. * gActiveMaxChannelTime - Set max channel time for active scan
  47. * @Min: 0
  48. * @Max: 10000
  49. * @Default: 40
  50. *
  51. * This ini is used to set maximum channel time in msecs spent in
  52. * active scan
  53. *
  54. * Related: None
  55. *
  56. * Usage: External
  57. *
  58. * </ini>
  59. */
  60. #define CFG_ACTIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
  61. "gActiveMaxChannelTime",\
  62. 0, 10000, MCL_OR_WIN_VALUE(40, 105),\
  63. CFG_VALUE_OR_DEFAULT, "active dwell time")
  64. /*
  65. * <ini>
  66. * gEnableDFSChnlScan - Enable/Disable scan on DFS channels
  67. * @Min: 0
  68. * @Max: 1
  69. * @Default: 1
  70. *
  71. * This ini is used to enable/disable scan on DFS channels.
  72. *
  73. * Related: Scan
  74. *
  75. * Usage: External
  76. *
  77. * </ini>
  78. */
  79. #define CFG_ENABLE_DFS_SCAN CFG_INI_BOOL( \
  80. "gEnableDFSChnlScan", \
  81. true, \
  82. "enable dfs scan")
  83. /*
  84. * <ini>
  85. * gInitialScanNoDFSChnl - Exclude DFS channels in first scan
  86. * @Min: 0
  87. * @Max: 1
  88. * @Default: 0
  89. *
  90. * This ini is used to enable/disable scan on DFS channels, in first scan only
  91. *
  92. * Related: Scan
  93. *
  94. * Usage: External
  95. *
  96. * </ini>
  97. */
  98. #define CFG_INITIAL_NO_DFS_SCAN CFG_INI_BOOL( \
  99. "gInitialScanNoDFSChnl", \
  100. false, \
  101. "disable initial dfs scan")
  102. /*
  103. * <ini>
  104. * active_max_channel_time_2g - Set max time for active 2G channel scan
  105. * @Min: 0
  106. * @Max: 10000
  107. * @Default: 80
  108. *
  109. * This ini is used to set maximum time in msecs spent in active 2G channel scan
  110. * if it's not zero, in case of zero, CFG_ACTIVE_MAX_CHANNEL_TIME is used for 2G
  111. * channels also.
  112. *
  113. * Related: None
  114. *
  115. * Usage: External
  116. *
  117. * </ini>
  118. */
  119. #define CFG_ACTIVE_MAX_2G_CHANNEL_TIME CFG_INI_UINT(\
  120. "active_max_channel_time_2g",\
  121. 0, 10000, MCL_OR_WIN_VALUE(80, 0),\
  122. CFG_VALUE_OR_DEFAULT, "active dwell time for 2G channels")
  123. /*
  124. * <ini>
  125. * gPassiveMaxChannelTime - Set max channel time for passive scan
  126. * @Min: 0
  127. * @Max: 10000
  128. * @Default: 110
  129. *
  130. * This ini is used to set maximum channel time in msecs spent in
  131. * passive scan
  132. *
  133. * Related: None
  134. *
  135. * Usage: External
  136. *
  137. * </ini>
  138. */
  139. #define CFG_PASSIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
  140. "gPassiveMaxChannelTime",\
  141. 0, 10000, MCL_OR_WIN_VALUE(100, 300),\
  142. CFG_VALUE_OR_DEFAULT, "passive dwell time")
  143. /*
  144. * <ini>
  145. * gScanNumProbes - Set the number of probes on each channel for active scan
  146. * @Min: 0
  147. * @Max: 20
  148. * @Default: 0
  149. *
  150. * This ini is used to set number of probes on each channel for
  151. * active scan
  152. */
  153. #define CFG_SCAN_NUM_PROBES CFG_INI_UINT(\
  154. "gScanNumProbes",\
  155. 0, 20, MCL_OR_WIN_VALUE(0, 2),\
  156. CFG_VALUE_OR_DEFAULT,\
  157. "number of probes on each channel")
  158. /*
  159. * <ini>
  160. * gScanProbeRepeatTime - Set the probe repeat time on each channel
  161. * @Min: 0
  162. * @Max: 30
  163. * @Default: 0
  164. *
  165. * This ini is used to set probe repeat time on each channel for
  166. * active scan
  167. *
  168. * Related: None
  169. *
  170. * Supported Feature: Scan
  171. *
  172. * Usage: External
  173. *
  174. * </ini>
  175. */
  176. #define CFG_SCAN_PROBE_REPEAT_TIME CFG_INI_UINT(\
  177. "gScanProbeRepeatTime",\
  178. 0, 30, MCL_OR_WIN_VALUE(20, 50),\
  179. CFG_VALUE_OR_DEFAULT,\
  180. "probe repeat time on each channel")
  181. /*
  182. * <ini>
  183. * hostscan_adaptive_dwell_mode - Enable adaptive dwell mode
  184. * during host scan with conneciton
  185. * @Min: 0
  186. * @Max: 4
  187. * @Default: 2
  188. *
  189. * This ini will set the algo used in dwell time optimization
  190. * during host scan with connection.
  191. * See enum wmi_dwelltime_adaptive_mode.
  192. * Acceptable values for this:
  193. * 0: Default (Use firmware default mode)
  194. * 1: Conservative optimization
  195. * 2: Moderate optimization
  196. * 3: Aggressive optimization
  197. * 4: Static
  198. *
  199. * Related: None
  200. *
  201. * Supported Feature: Scan
  202. *
  203. * Usage: External
  204. *
  205. * </ini>
  206. */
  207. #define CFG_ADAPTIVE_SCAN_DWELL_MODE CFG_INI_UINT(\
  208. "hostscan_adaptive_dwell_mode",\
  209. 0, 4, MCL_OR_WIN_VALUE(2, 0),\
  210. CFG_VALUE_OR_DEFAULT,\
  211. "Enable adaptive dwell mode")
  212. /*
  213. * <ini>
  214. * hostscan_adaptive_dwell_mode_no_conn - Enable adaptive dwell mode
  215. * during host scan without conneciton
  216. * @Min: 0
  217. * @Max: 4
  218. * @Default: 4
  219. *
  220. * This ini will set the algo used in dwell time optimization
  221. * during host scan with connection.
  222. * See enum wmi_dwelltime_adaptive_mode.
  223. * Acceptable values for this:
  224. * 0: Default (Use firmware default mode)
  225. * 1: Conservative optimization
  226. * 2: Moderate optimization
  227. * 3: Aggressive optimization
  228. * 4: Static
  229. *
  230. * Related: None
  231. *
  232. * Supported Feature: Scan
  233. *
  234. * Usage: External
  235. *
  236. * </ini>
  237. */
  238. #define CFG_ADAPTIVE_SCAN_DWELL_MODE_NC CFG_INI_UINT(\
  239. "hostscan_adaptive_dwell_mode_no_conn",\
  240. 0, 4, MCL_OR_WIN_VALUE(4, 0),\
  241. CFG_VALUE_OR_DEFAULT,\
  242. "Enable adaptive dwell mode without connection")
  243. /*
  244. * <ini>
  245. * is_bssid_hint_priority - Set priority for connection with bssid_hint
  246. * BSSID.
  247. * @Min: 0
  248. * @Max: 1
  249. * @Default: 1
  250. *
  251. * This ini is used to give priority to BSS for connection which comes
  252. * as part of bssid_hint
  253. *
  254. * Related: None
  255. *
  256. * Supported Feature: STA
  257. *
  258. * Usage: External
  259. *
  260. * </ini>
  261. */
  262. #define CFG_IS_BSSID_HINT_PRIORITY CFG_INI_UINT(\
  263. "is_bssid_hint_priority",\
  264. 0, 1, 0,\
  265. CFG_VALUE_OR_DEFAULT, \
  266. "Set priority for connection with bssid_hint")
  267. #ifdef FEATURE_WLAN_SCAN_PNO
  268. /*
  269. * <ini>
  270. * g_max_sched_scan_plan_iterations - pno sched max scan plan iterations.
  271. * @Min: 1
  272. * @Max: 100
  273. * @Default: 10
  274. *
  275. * This ini is used to set max sched scan plan iterations for pno scan
  276. * (value in seconds).
  277. *
  278. * Related: gPNOScanSupport
  279. *
  280. * Supported Feature: PNO scan
  281. *
  282. * Usage: External
  283. *
  284. * </ini>
  285. */
  286. #define CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS CFG_INI_UINT( \
  287. "g_max_sched_scan_plan_iterations", \
  288. 1, 100, 10, \
  289. CFG_VALUE_OR_DEFAULT, \
  290. "Max sched scan plan iterations")
  291. /*
  292. * <ini>
  293. * g_max_sched_scan_plan_int - pno sched max scan plan interval.
  294. * @Min: 1
  295. * @Max: 7200
  296. * @Default: 3600
  297. *
  298. * This ini is used to set max sched scan plan interval for pno scan
  299. * (value in seconds).
  300. *
  301. * Related: gPNOScanSupport
  302. *
  303. * Supported Feature: PNO scan
  304. *
  305. * Usage: External
  306. *
  307. * </ini>
  308. */
  309. #define CFG_MAX_SCHED_SCAN_PLAN_INTERVAL CFG_INI_UINT( \
  310. "g_max_sched_scan_plan_int", \
  311. 1, 7200, 3600, \
  312. CFG_VALUE_OR_DEFAULT, \
  313. "Max sched scan plan interval")
  314. /*
  315. * <ini>
  316. * gEnableDFSPnoChnlScan - enable dfs channels in PNO scan
  317. * @Min: 0
  318. * @Max: 1
  319. * @Default: 1
  320. *
  321. * This ini is used to enable/disable dfs channels in PNO scan request,
  322. * enabling this ini enables driver to include dfs channels in its
  323. * PNO scan request
  324. * Related: NA
  325. *
  326. * Supported Feature: DFS, PNO
  327. *
  328. * Usage: Internal/External
  329. *
  330. * </ini>
  331. */
  332. #define CFG_ENABLE_DFS_PNO_CHNL_SCAN CFG_INI_BOOL( \
  333. "gEnableDFSPnoChnlScan", \
  334. true, \
  335. "Enable dfs channels in PNO Scan")
  336. /*
  337. * <ini>
  338. * gPNOScanSupport - Enable or Disable PNO scan
  339. * @Min: 0
  340. * @Max: 1
  341. * @Default: 1
  342. *
  343. * This ini is used to Enable or Disable PNO scan
  344. *
  345. * Related: None
  346. *
  347. * Supported Feature: Scan
  348. *
  349. * Usage: External
  350. *
  351. * </ini>
  352. */
  353. #define CFG_PNO_SCAN_SUPPORT CFG_INI_BOOL( \
  354. "gPNOScanSupport", \
  355. true, \
  356. "Enable/Disable PNO scan")
  357. /*
  358. * <ini>
  359. * gPNOScanTimerRepeatValue - Set PNO scan timer repeat value
  360. * @Min: 0
  361. * @Max: 0xffffffff
  362. * @Default: 30
  363. *
  364. * This ini is used by firmware to set fast scan max cycles
  365. * equal to gPNOScanTimerRepeatValue. Taking power consumption
  366. * into account firmware after gPNOScanTimerRepeatValue times
  367. * fast_scan_period switches to slow_scan_period.
  368. *
  369. * Usage: External
  370. *
  371. * </ini>
  372. */
  373. #define CFG_PNO_SCAN_TIMER_REPEAT_VALUE CFG_INI_UINT( \
  374. "gPNOScanTimerRepeatValue", \
  375. 0, \
  376. 0xffffffff, \
  377. 30, \
  378. CFG_VALUE_OR_DEFAULT, \
  379. "PNO scan timer repeat value")
  380. /*
  381. * <ini>
  382. * gPNOSlowScanMultiplier - Set PNO slow scan multiplier
  383. * @Min: 0
  384. * @Max: 30
  385. * @Default: 6
  386. *
  387. * This ini is used by firmware to set slow scan period
  388. * as gPNOSlowScanMultiplier times fast_scan_period.
  389. *
  390. * Related: None
  391. *
  392. * Supported Feature: Scan
  393. *
  394. * Usage: External
  395. *
  396. * </ini>
  397. */
  398. #define CFG_PNO_SLOW_SCAN_MULTIPLIER CFG_INI_UINT( \
  399. "gPNOSlowScanMultiplier", \
  400. 0, \
  401. 30, \
  402. 6, \
  403. CFG_VALUE_OR_DEFAULT, \
  404. "PNO slow scan multiplier")
  405. /*
  406. * <ini>
  407. * gPNOChannelPrediction - Enable/disable the PNO channel
  408. * prediction feature.
  409. * @Min: 0
  410. * @Max: 1
  411. * @Default: 0
  412. *
  413. * In current PNO implementation, scan is always done until all configured
  414. * channels are scanned. If we can determine DUT is stationary based on
  415. * scanning a subset of channels, we may cancel the remaining channels.
  416. * Hence, we can save additional power consumption.
  417. *
  418. * Related: None
  419. *
  420. * Supported Feature: Scan
  421. *
  422. * Usage: External
  423. *
  424. * </ini>
  425. */
  426. #define CFG_PNO_CHANNEL_PREDICTION CFG_INI_BOOL( \
  427. "gPNOChannelPrediction", \
  428. false, \
  429. "enable/disable PNO channel prediction feature")
  430. /*
  431. * <ini>
  432. * gTopKNumOfChannels - top K number of channels are used for tanimoto distance
  433. * @Min: 1
  434. * @Max: 5
  435. * @Default: 3
  436. *
  437. * These are the top channels on which the probability of finding the AP's is
  438. * extremely high. This number is intended for tweaking the internal algorithm
  439. * for experiments. This should not be changed externally.
  440. *
  441. * Related: None
  442. *
  443. * Supported Feature: Scan
  444. *
  445. * Usage: External
  446. *
  447. * </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: Internal/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. #define CFG_SCAN_ALL \
  1027. CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
  1028. CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
  1029. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
  1030. CFG(CFG_ENABLE_DFS_SCAN) \
  1031. CFG(CFG_INITIAL_NO_DFS_SCAN) \
  1032. CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \
  1033. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
  1034. CFG(CFG_SCAN_NUM_PROBES) \
  1035. CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
  1036. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
  1037. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC) \
  1038. CFG(CFG_IS_BSSID_HINT_PRIORITY) \
  1039. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
  1040. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \
  1041. CFG(CFG_MAX_REST_TIME_CONC) \
  1042. CFG(CFG_MIN_REST_TIME_CONC) \
  1043. CFG(CFG_IDLE_TIME_CONC) \
  1044. CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
  1045. CFG(CFG_SCAN_AGING_TIME) \
  1046. CFG(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE) \
  1047. CFG(CFG_STA_SCAN_BURST_DURATION) \
  1048. CFG(CFG_P2P_SCAN_BURST_DURATION) \
  1049. CFG(CFG_GO_SCAN_BURST_DURATION) \
  1050. CFG(CFG_AP_SCAN_BURST_DURATION) \
  1051. CFG(CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH) \
  1052. CFG_SCAN_PNO
  1053. #endif /* __CONFIG_SCAN_H */