wlan_scan_cfg.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945
  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. * These scan PNO ini params are used only once by HDD to store the
  270. * values in wiphy structure
  271. */
  272. /*
  273. * <ini>
  274. * g_max_sched_scan_plan_iterations - pno sched max scan plan iterations.
  275. * @Min: 1
  276. * @Max: 100
  277. * @Default: 10
  278. *
  279. * This ini is used to set max sched scan plan iterations for pno scan
  280. * (value in seconds).
  281. *
  282. * Related: gPNOScanSupport
  283. *
  284. * Supported Feature: PNO scan
  285. *
  286. * Usage: External
  287. *
  288. * </ini>
  289. */
  290. #define CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS CFG_INI_UINT( \
  291. "g_max_sched_scan_plan_iterations", \
  292. 1, 100, 10, \
  293. CFG_VALUE_OR_DEFAULT, \
  294. "Max sched scan plan iterations")
  295. /*
  296. * <ini>
  297. * g_max_sched_scan_plan_int - pno sched max scan plan interval.
  298. * @Min: 1
  299. * @Max: 7200
  300. * @Default: 3600
  301. *
  302. * This ini is used to set max sched scan plan interval 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_INTERVAL CFG_INI_UINT( \
  314. "g_max_sched_scan_plan_int", \
  315. 1, 7200, 3600, \
  316. CFG_VALUE_OR_DEFAULT, \
  317. "Max sched scan plan interval")
  318. #endif
  319. /*
  320. * <ini>
  321. * gEnableDFSPnoChnlScan - enable dfs channels in PNO scan
  322. * @Min: 0
  323. * @Max: 1
  324. * @Default: 1
  325. *
  326. * This ini is used to enable/disable dfs channels in PNO scan request,
  327. * enabling this ini enables driver to include dfs channels in its
  328. * PNO scan request
  329. * Related: NA
  330. *
  331. * Supported Feature: DFS, PNO
  332. *
  333. * Usage: Internal/External
  334. *
  335. * </ini>
  336. */
  337. #define CFG_ENABLE_DFS_PNO_CHNL_SCAN CFG_INI_BOOL( \
  338. "gEnableDFSPnoChnlScan", \
  339. true, \
  340. "Enable dfs channels in PNO Scan")
  341. #ifdef FEATURE_WLAN_SCAN_PNO
  342. /*
  343. * <ini>
  344. * gPNOScanSupport - Enable or Disable PNO scan
  345. * @Min: 0
  346. * @Max: 1
  347. * @Default: 1
  348. *
  349. * This ini is used to Enable or Disable PNO scan
  350. *
  351. * Related: None
  352. *
  353. * Supported Feature: Scan
  354. *
  355. * Usage: External
  356. *
  357. * </ini>
  358. */
  359. #define CFG_PNO_SCAN_SUPPORT CFG_INI_BOOL( \
  360. "gPNOScanSupport", \
  361. true, \
  362. "Enable/Disable PNO scan")
  363. /*
  364. * <ini>
  365. * gPNOScanTimerRepeatValue - Set PNO scan timer repeat value
  366. * @Min: 0
  367. * @Max: 0xffffffff
  368. * @Default: 30
  369. *
  370. * This ini is used by firmware to set fast scan max cycles
  371. * equal to gPNOScanTimerRepeatValue. Taking power consumption
  372. * into account firmware after gPNOScanTimerRepeatValue times
  373. * fast_scan_period switches to slow_scan_period.
  374. *
  375. * Usage: External
  376. *
  377. * </ini>
  378. */
  379. #define CFG_PNO_SCAN_TIMER_REPEAT_VALUE CFG_INI_UINT( \
  380. "gPNOScanTimerRepeatValue", \
  381. 0, \
  382. 0xffffffff, \
  383. 30, \
  384. CFG_VALUE_OR_DEFAULT, \
  385. "PNO scan timer repeat value")
  386. /*
  387. * <ini>
  388. * gPNOSlowScanMultiplier - Set PNO slow scan multiplier
  389. * @Min: 0
  390. * @Max: 30
  391. * @Default: 6
  392. *
  393. * This ini is used by firmware to set slow scan period
  394. * as gPNOSlowScanMultiplier times fast_scan_period.
  395. *
  396. * Related: None
  397. *
  398. * Supported Feature: Scan
  399. *
  400. * Usage: External
  401. *
  402. * </ini>
  403. */
  404. #define CFG_PNO_SLOW_SCAN_MULTIPLIER CFG_INI_UINT( \
  405. "gPNOSlowScanMultiplier", \
  406. 0, \
  407. 30, \
  408. 6, \
  409. CFG_VALUE_OR_DEFAULT, \
  410. "PNO slow scan multiplier")
  411. #endif
  412. /*
  413. * <ini>
  414. * gPNOChannelPrediction - Enable/disable the PNO channel
  415. * prediction feature.
  416. * @Min: 0
  417. * @Max: 1
  418. * @Default: 0
  419. *
  420. * In current PNO implementation, scan is always done until all configured
  421. * channels are scanned. If we can determine DUT is stationary based on
  422. * scanning a subset of channels, we may cancel the remaining channels.
  423. * Hence, we can save additional power consumption.
  424. *
  425. * Related: None
  426. *
  427. * Supported Feature: Scan
  428. *
  429. * Usage: External
  430. *
  431. * </ini>
  432. */
  433. #define CFG_PNO_CHANNEL_PREDICTION CFG_INI_BOOL( \
  434. "gPNOChannelPrediction", \
  435. false, \
  436. "enable/disable PNO channel prediction feature")
  437. /*
  438. * <ini>
  439. * gTopKNumOfChannels - top K number of channels are used for tanimoto distance
  440. * @Min: 1
  441. * @Max: 5
  442. * @Default: 3
  443. *
  444. * These are the top channels on which the probability of finding the AP's is
  445. * extremely high. This number is intended for tweaking the internal algorithm
  446. * for experiments. This should not be changed externally.
  447. *
  448. * Related: None
  449. *
  450. * Supported Feature: Scan
  451. *
  452. * Usage: External
  453. *
  454. */
  455. #define CFG_TOP_K_NUM_OF_CHANNELS CFG_INI_UINT( \
  456. "gTopKNumOfChannels", \
  457. 1, \
  458. 5, \
  459. 3, \
  460. CFG_VALUE_OR_DEFAULT, \
  461. "Top K number of channels")
  462. /*
  463. * <ini>
  464. * gStationaryThreshold - STA threshold value to determine if it is stationary
  465. * @Min: 0
  466. * @Max: 100
  467. * @Default: 10
  468. *
  469. * This is the threshold value to determine that the STA is
  470. * stationary. If the tanimoto distance is less than this
  471. * value, then the device is considered to be stationary.
  472. * This parameter is intended to tweak the internal algorithm
  473. * for experiments. This should not be changed externally.
  474. *
  475. *
  476. * Related: None
  477. *
  478. * Supported Feature: Scan
  479. *
  480. * Usage: External
  481. *
  482. * </ini>
  483. */
  484. #define CFG_STATIONARY_THRESHOLD CFG_INI_UINT( \
  485. "gStationaryThreshold", \
  486. 0, \
  487. 100, \
  488. 10, \
  489. CFG_VALUE_OR_DEFAULT, \
  490. "Threshold to determine if sta is stationary")
  491. /*
  492. * <ini>
  493. * gChPredictionFullScanMs - Set periodic timer for channel prediction
  494. * @Min: 3000
  495. * @Max: 0x7fffffff
  496. * @Default: 60000
  497. *
  498. * This ini is used to set the periodic timer upon which
  499. * a full scan needs to be triggered when PNO channel
  500. * prediction feature is enabled. This parameter is intended
  501. * to tweak the internal algortihm for experiments.
  502. *
  503. * Related: None
  504. *
  505. * Supported Feature: Scan
  506. *
  507. * Usage: Internal
  508. *
  509. * </ini>
  510. */
  511. #define CFG_CHANNEL_PREDICTION_SCAN_TIMER CFG_INI_UINT( \
  512. "gChPredictionFullScanMs", \
  513. 3000, \
  514. 0x7fffffff, \
  515. 60000, \
  516. CFG_VALUE_OR_DEFAULT, \
  517. "Timer value for channel prediction")
  518. /*
  519. * <ini>
  520. * pnoscan_adaptive_dwell_mode - Enable adaptive dwell mode
  521. * during pno scan
  522. * @Min: 0
  523. * @Max: 4
  524. * @Default: 1
  525. *
  526. * This ini will set the algo used in dwell time optimization
  527. * during pno scan. see enum scan_dwelltime_adaptive_mode.
  528. * Acceptable values for this:
  529. * 0: Default (Use firmware default mode)
  530. * 1: Conservative optimization
  531. * 2: Moderate optimization
  532. * 3: Aggressive optimization
  533. * 4: Static
  534. *
  535. * Related: None
  536. *
  537. * Supported Feature: Scan
  538. *
  539. * Usage: External
  540. *
  541. * </ini>
  542. */
  543. #define CFG_ADAPTIVE_PNOSCAN_DWELL_MODE CFG_INI_UINT( \
  544. "pnoscan_adaptive_dwell_mode", \
  545. 0, \
  546. 4, \
  547. 1, \
  548. CFG_VALUE_OR_DEFAULT, \
  549. "Algorithm used in dwell time optimization")
  550. /*
  551. * <ini>
  552. * gScanBackoffMultiplier - For NLO/PNO, multiply fast scan period by this every
  553. * max cycles
  554. * @Min: 0
  555. * @Max: 255
  556. * @Default: 0
  557. *
  558. * For Network Listen Offload and Perfered Network Offload, multiply the fast
  559. * scan period by this value after max cycles have occurred. Setting this to 0
  560. * disables the feature.
  561. *
  562. * @E.g.
  563. * # Disable scan backoff multiplier
  564. * gScanBackoffMultiplier=0
  565. * # Effectively the same
  566. * gScanBackoffMultiplier=1
  567. * # Double the scan period after each max cycles have occurred
  568. * gScanBackoffMultiplier=2
  569. *
  570. * Related: NLO, PNO
  571. *
  572. * Usage: Internal/External
  573. *
  574. * </ini>
  575. */
  576. #define CFG_SCAN_BACKOFF_MULTIPLIER CFG_INI_UINT( \
  577. "gScanBackoffMultiplier", \
  578. 0, \
  579. 255, \
  580. 0, \
  581. CFG_VALUE_OR_DEFAULT, \
  582. "Scan backoff multiplier")
  583. /*
  584. * <ini>
  585. * mawc_nlo_enabled - For NLO/PNO, enable MAWC based scan
  586. * @Min: 0
  587. * @Max: 1
  588. * @Default: 1
  589. *
  590. * Enable/Disable the Motion Aided Wireless Connectivity
  591. * based NLO using this parameter
  592. *
  593. * Related: NLO, PNO
  594. *
  595. * Usage: Internal/External
  596. *
  597. * </ini>
  598. */
  599. #define CFG_MAWC_NLO_ENABLED CFG_INI_BOOL( \
  600. "mawc_nlo_enabled", \
  601. 1, \
  602. "Enable MAWC based scan")
  603. /*
  604. * <ini>
  605. * mawc_nlo_exp_backoff_ratio - Exponential back off ratio
  606. * @Min: 0
  607. * @Max: 300
  608. * @Default: 3
  609. *
  610. * Configure the exponential back off ratio using this
  611. * parameter for MAWC based NLO
  612. * ratio of exponential backoff, next = current + current*ratio/100
  613. *
  614. * Related: NLO, PNO
  615. *
  616. * Usage: Internal/External
  617. *
  618. * </ini>
  619. */
  620. #define CFG_MAWC_NLO_EXP_BACKOFF_RATIO CFG_INI_UINT( \
  621. "mawc_nlo_exp_backoff_ratio", \
  622. 0, \
  623. 300, \
  624. 3, \
  625. CFG_VALUE_OR_DEFAULT, \
  626. "MWAC based NLO exponential ratio")
  627. /*
  628. * <ini>
  629. * mawc_nlo_init_scan_interval - Initial Scan Interval
  630. * @Min: 1000
  631. * @Max: 0xFFFFFFFF
  632. * @Default: 10000
  633. *
  634. * Configure the initial scan interval using this
  635. * parameter for MAWC based NLO (Units in Milliseconds)
  636. *
  637. * Related: NLO, PNO
  638. *
  639. * Usage: Internal/External
  640. *
  641. * </ini>
  642. */
  643. #define CFG_MAWC_NLO_INIT_SCAN_INTERVAL CFG_INI_UINT( \
  644. "mawc_nlo_init_scan_interval", \
  645. 1000, \
  646. 0xFFFFFFFF, \
  647. 10000, \
  648. CFG_VALUE_OR_DEFAULT, \
  649. "Initial Scan Interval")
  650. /*
  651. * <ini>
  652. * mawc_nlo_max_scan_interval - Maximum Scan Interval
  653. * @Min: 1000
  654. * @Max: 0xFFFFFFFF
  655. * @Default: 60000
  656. *
  657. * Configure the maximum scan interval using this
  658. * parameter for MAWC based NLO (Units in Milliseconds)
  659. *
  660. * Related: NLO, PNO
  661. *
  662. * Usage: Internal/External
  663. *
  664. * </ini>
  665. */
  666. #define CFG_MAWC_NLO_MAX_SCAN_INTERVAL CFG_INI_UINT( \
  667. "mawc_nlo_max_scan_interval", \
  668. 1000, \
  669. 0xFFFFFFFF, \
  670. 60000, \
  671. CFG_VALUE_OR_DEFAULT, \
  672. "Maximum Scan Interval")
  673. #ifdef FEATURE_WLAN_SCAN_PNO
  674. #define CFG_SCAN_PNO \
  675. CFG(CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS) \
  676. CFG(CFG_MAX_SCHED_SCAN_PLAN_INTERVAL) \
  677. CFG(CFG_PNO_SCAN_SUPPORT) \
  678. CFG(CFG_PNO_SCAN_TIMER_REPEAT_VALUE) \
  679. CFG(CFG_PNO_SLOW_SCAN_MULTIPLIER)
  680. #else
  681. #define CFG_SCAN_PNO
  682. #endif /* FEATURE_WLAN_SCAN_PNO */
  683. /*
  684. * <ini>
  685. * gActiveMaxChannelTimeConc - Maximum active scan time in milliseconds.
  686. * @Min: 0
  687. * @Max: 10000
  688. * @Default: 40
  689. *
  690. * This ini is used to set maximum active scan time in STA+SAP concurrent
  691. * mode.
  692. *
  693. * Related: None.
  694. *
  695. * Supported Feature: Concurrency
  696. *
  697. * Usage: Internal/External
  698. *
  699. * </ini>
  700. */
  701. #define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
  702. "gActiveMaxChannelTimeConc",\
  703. 0, 10000, MCL_OR_WIN_VALUE(40, 0),\
  704. CFG_VALUE_OR_DEFAULT, \
  705. "active scan time in STA+SAP concurrent")
  706. /*
  707. * <ini>
  708. * gPassiveMaxChannelTimeConc - Maximum passive scan time in milliseconds.
  709. * @Min: 0
  710. * @Max: 10000
  711. * @Default: 110
  712. *
  713. * This ini is used to set maximum passive scan time in STA+SAP concurrent
  714. * mode.
  715. *
  716. * Related: None.
  717. *
  718. * Supported Feature: Concurrency
  719. *
  720. * Usage: Internal/External
  721. *
  722. * </ini>
  723. */
  724. #define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC CFG_INI_UINT(\
  725. "gPassiveMaxChannelTimeConc",\
  726. 0, 10000, MCL_OR_WIN_VALUE(110, 0),\
  727. CFG_VALUE_OR_DEFAULT, \
  728. "Set priority for connection with bssid_hint")
  729. /*
  730. * <ini>
  731. * gRestTimeConc - Rest time before moving to a new channel to scan.
  732. * @Min: 0
  733. * @Max: 10000
  734. * @Default: 100
  735. *
  736. * This ini is used to configure rest time.
  737. *
  738. * Related: None.
  739. *
  740. * Supported Feature: Concurrency
  741. *
  742. * Usage: Internal/External
  743. *
  744. * </ini>
  745. */
  746. #define CFG_MAX_REST_TIME_CONC CFG_INI_UINT(\
  747. "nRestTimeConc",\
  748. 0, 10000, MCL_OR_WIN_VALUE(100, 0),\
  749. CFG_VALUE_OR_DEFAULT, \
  750. "Rest time before moving to a new channel")
  751. /*
  752. * <ini>
  753. * min_rest_time_conc - Mininum time spent on home channel before moving to a
  754. * new channel to scan.
  755. * @Min: 0
  756. * @Max: 50
  757. * @Default: 50
  758. *
  759. * This ini is used to configure minimum time spent on home channel before
  760. * moving to a new channel to scan.
  761. *
  762. * Related: None.
  763. *
  764. * Supported Feature: Concurrency
  765. *
  766. * Usage: Internal/External
  767. *
  768. * </ini>
  769. */
  770. #define CFG_MIN_REST_TIME_CONC CFG_INI_UINT(\
  771. "min_rest_time_conc",\
  772. 0, 50, MCL_OR_WIN_VALUE(50, 0),\
  773. CFG_VALUE_OR_DEFAULT, \
  774. "minimum time spent on home channel")
  775. /*
  776. * <ini>
  777. * wake_lock_in_user_scan - use wake lock during user scan
  778. * @Min: 0
  779. * @Max: 1
  780. * @Default: 0
  781. *
  782. * This ini is used to define if wake lock is held used during user scan req
  783. *
  784. * Related: Scan
  785. *
  786. * Usage: Internal/External
  787. *
  788. * </ini>
  789. */
  790. #define CFG_ENABLE_WAKE_LOCK_IN_SCAN CFG_INI_BOOL( \
  791. "wake_lock_in_user_scan", \
  792. false, \
  793. "use wake lock during scan")
  794. /*
  795. * <ini>
  796. * gIdleTimeConc - Data inactivity time in msec.
  797. * @Min: 0
  798. * @Max: 25
  799. * @Default: 25
  800. *
  801. * This ini is used to configure data inactivity time in msec on bss channel
  802. * that will be used by scan engine in firmware.
  803. * For example if this value is 25ms then firmware will check for data
  804. * inactivity every 25ms till gRestTimeConc is reached.
  805. * If inactive then scan engine will move from home channel to scan the next
  806. * frequency.
  807. *
  808. * Related: None.
  809. *
  810. * Supported Feature: Concurrency
  811. *
  812. * Usage: Internal/External
  813. *
  814. * </ini>
  815. */
  816. #define CFG_IDLE_TIME_CONC CFG_INI_UINT(\
  817. "gIdleTimeConc",\
  818. 0, 25, MCL_OR_WIN_VALUE(25, 0),\
  819. CFG_VALUE_OR_DEFAULT, \
  820. "data inactivity time on bss channel")
  821. /*
  822. * <ini>
  823. * gEnableMacAddrSpoof - Enable mac address randomization feature.
  824. * @Min: 0
  825. * @Max: 1
  826. * @Default: 1
  827. *
  828. * This ini is used to enable/disable mac address randomization for scan.
  829. *
  830. * Supported Feature: SCAN
  831. *
  832. *
  833. * Usage: Internal/External
  834. *
  835. * </ini>
  836. */
  837. #define CFG_ENABLE_MAC_ADDR_SPOOFING CFG_INI_BOOL( \
  838. "gEnableMacAddrSpoof", \
  839. true, \
  840. "Enable mac spoofing")
  841. /*
  842. * <ini>
  843. * gScanAgingTime - Set scan aging time
  844. * @Min: 0
  845. * @Max: 200
  846. * @Default: 30
  847. *
  848. * This ini is used to set scan aging timeout value
  849. * in secs. For example after 30 secs the bss results
  850. * greater than 30secs age will be flushed.
  851. *
  852. * Related: None
  853. *
  854. * Supported Feature: Scan
  855. *
  856. * Usage: External
  857. *
  858. * </ini>
  859. */
  860. #ifdef QCA_WIFI_NAPIER_EMULATION
  861. #define CFG_SCAN_AGING_TIME_DEFAULT (90)
  862. #else
  863. #define CFG_SCAN_AGING_TIME_DEFAULT (30)
  864. #endif
  865. #define CFG_SCAN_AGING_TIME CFG_INI_UINT( \
  866. "gScanAgingTime", \
  867. 0, \
  868. 200, \
  869. CFG_SCAN_AGING_TIME_DEFAULT, \
  870. CFG_VALUE_OR_DEFAULT, \
  871. "scan aging time")
  872. #define CFG_SCAN_ALL \
  873. CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
  874. CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
  875. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
  876. CFG(CFG_ENABLE_DFS_SCAN) \
  877. CFG(CFG_INITIAL_NO_DFS_SCAN) \
  878. CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \
  879. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
  880. CFG(CFG_SCAN_NUM_PROBES) \
  881. CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
  882. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
  883. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC) \
  884. CFG(CFG_IS_BSSID_HINT_PRIORITY) \
  885. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
  886. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \
  887. CFG(CFG_MAX_REST_TIME_CONC) \
  888. CFG(CFG_MIN_REST_TIME_CONC) \
  889. CFG(CFG_IDLE_TIME_CONC) \
  890. CFG(CFG_ENABLE_DFS_PNO_CHNL_SCAN) \
  891. CFG(CFG_PNO_CHANNEL_PREDICTION) \
  892. CFG(CFG_TOP_K_NUM_OF_CHANNELS) \
  893. CFG(CFG_STATIONARY_THRESHOLD) \
  894. CFG(CFG_CHANNEL_PREDICTION_SCAN_TIMER) \
  895. CFG(CFG_ADAPTIVE_PNOSCAN_DWELL_MODE) \
  896. CFG(CFG_SCAN_BACKOFF_MULTIPLIER) \
  897. CFG(CFG_MAWC_NLO_ENABLED) \
  898. CFG(CFG_MAWC_NLO_EXP_BACKOFF_RATIO) \
  899. CFG(CFG_MAWC_NLO_INIT_SCAN_INTERVAL) \
  900. CFG(CFG_MAWC_NLO_MAX_SCAN_INTERVAL) \
  901. CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
  902. CFG(CFG_SCAN_AGING_TIME) \
  903. CFG_SCAN_PNO
  904. #endif /* __CONFIG_SCAN_H */