cfg_scan.h 33 KB

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