cfg_scan.h 35 KB

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