wlan_scan_cfg.h 26 KB

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