wlan_scan_cfg.h 32 KB

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