cfg_scan.h 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480
  1. /*
  2. * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022 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. */
  45. enum scan_mode_6ghz {
  46. SCAN_MODE_6G_NO_CHANNEL,
  47. SCAN_MODE_6G_PSC_CHANNEL,
  48. SCAN_MODE_6G_ALL_CHANNEL,
  49. SCAN_MODE_6G_RNR_ONLY,
  50. SCAN_MODE_6G_PSC_DUTY_CYCLE,
  51. SCAN_MODE_6G_ALL_DUTY_CYCLE,
  52. SCAN_MODE_6G_MAX = SCAN_MODE_6G_ALL_DUTY_CYCLE,
  53. };
  54. /*
  55. * <ini>
  56. * drop_bcn_on_chan_mismatch - drop the beacon for chan mismatch
  57. * @Min: 0
  58. * @Max: 1
  59. * @Default: 1
  60. *
  61. * This ini is used to decide drop the beacon or not if channel received
  62. * in metadata doesn't match the one in beacon.
  63. *
  64. * Related: None
  65. *
  66. * Usage: External
  67. *
  68. * </ini>
  69. */
  70. #define CFG_DROP_BCN_ON_CHANNEL_MISMATCH CFG_INI_BOOL(\
  71. "drop_bcn_on_chan_mismatch",\
  72. true,\
  73. "drop bcn on channel mismatch")
  74. /*
  75. * <ini>
  76. * drop_bcn_on_invalid_freq - drop the beacon or probe resp with invalid freq
  77. * @Min: 0
  78. * @Max: 1
  79. * @Default: 1
  80. *
  81. * This ini is used to decide whether to drop the beacon/probe resp or not
  82. * if channel received in DS param, HT info and HE IE is invalid.
  83. *
  84. * Related: None
  85. *
  86. * Usage: External
  87. *
  88. * </ini>
  89. */
  90. #define CFG_DROP_BCN_ON_INVALID_FREQ CFG_INI_BOOL(\
  91. "drop_bcn_on_invalid_freq",\
  92. true,\
  93. "drop bcn on invalid freq in HT, DS, HE IE")
  94. /*
  95. * <ini>
  96. * gActiveMaxChannelTime - Set max channel time for active scan
  97. * @Min: 0
  98. * @Max: 10000
  99. * @Default: 40
  100. *
  101. * This ini is used to set maximum channel time in msecs spent in
  102. * active scan
  103. *
  104. * Related: None
  105. *
  106. * Usage: External
  107. *
  108. * </ini>
  109. */
  110. #define CFG_ACTIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
  111. "gActiveMaxChannelTime",\
  112. 0, 10000, PLATFORM_VALUE(40, 105),\
  113. CFG_VALUE_OR_DEFAULT, "active dwell time")
  114. /*
  115. * <ini>
  116. * gEnableDFSChnlScan - Enable/Disable scan on DFS channels
  117. * @Min: 0
  118. * @Max: 1
  119. * @Default: 1
  120. *
  121. * This ini is used to enable/disable scan on DFS channels.
  122. *
  123. * Related: Scan
  124. *
  125. * Usage: External
  126. *
  127. * </ini>
  128. */
  129. #define CFG_ENABLE_DFS_SCAN CFG_INI_BOOL( \
  130. "gEnableDFSChnlScan", \
  131. true, \
  132. "enable dfs scan")
  133. /*
  134. * <ini>
  135. * gInitialScanNoDFSChnl - Exclude DFS channels in first scan
  136. * @Min: 0
  137. * @Max: 1
  138. * @Default: 0
  139. *
  140. * This ini is used to enable/disable scan on DFS channels, in first scan only
  141. *
  142. * Related: Scan
  143. *
  144. * Usage: External
  145. *
  146. * </ini>
  147. */
  148. #define CFG_INITIAL_NO_DFS_SCAN CFG_INI_BOOL( \
  149. "gInitialScanNoDFSChnl", \
  150. false, \
  151. "disable initial dfs scan")
  152. /*
  153. * <ini>
  154. * active_max_channel_time_2g - Set max time for active 2G channel scan
  155. * @Min: 0
  156. * @Max: 10000
  157. * @Default: 80
  158. *
  159. * This ini is used to set maximum time in msecs spent in active 2G channel scan
  160. * if it's not zero, in case of zero, CFG_ACTIVE_MAX_CHANNEL_TIME is used for 2G
  161. * channels also.
  162. *
  163. * Related: None
  164. *
  165. * Usage: External
  166. *
  167. * </ini>
  168. */
  169. #define CFG_ACTIVE_MAX_2G_CHANNEL_TIME CFG_INI_UINT(\
  170. "active_max_channel_time_2g",\
  171. 0, 10000, PLATFORM_VALUE(80, 0),\
  172. CFG_VALUE_OR_DEFAULT, "active dwell time for 2G channels")
  173. /*
  174. * <ini>
  175. * min_channel_time_6g - Set min dwell time for 6G channels scan
  176. * @Min: 5
  177. * @Max: 60
  178. * @Default: 25
  179. *
  180. * This ini is used to set minimum time in msecs spent in 6G channels scan.
  181. * Firmware will park on the 6G channel for this duration and if no FILS
  182. * discovery, Beacon, Probe resp is received it will move to new channel after
  183. * this duration. If found , it will wait for "active_max_channel_time_6g"
  184. * duration
  185. *
  186. * Related: active_max_channel_time_6g
  187. *
  188. * Supported Feature: Scan
  189. *
  190. * Usage: External
  191. *
  192. * </ini>
  193. */
  194. #define CFG_MIN_6G_CHANNEL_TIME CFG_INI_UINT(\
  195. "min_dwell_time_6g",\
  196. 5, 60, 25,\
  197. CFG_VALUE_OR_DEFAULT, "min dwell time for 6G channels")
  198. /*
  199. * <ini>
  200. * active_max_channel_time_6g - Set max time for active 6G channel scan
  201. * @Min: 0
  202. * @Max: 10000
  203. * @Default: 60
  204. *
  205. * This ini is used to set maximum time in msecs spent in active 6G channel scan
  206. *
  207. *
  208. * Related: None
  209. *
  210. * Supported Feature: Scan
  211. *
  212. * Usage: External
  213. *
  214. * </ini>
  215. */
  216. #define CFG_ACTIVE_MAX_6G_CHANNEL_TIME CFG_INI_UINT(\
  217. "active_max_channel_time_6g",\
  218. 0, 10000, 60,\
  219. CFG_VALUE_OR_DEFAULT, "max active dwell time for 6G channels")
  220. /*
  221. * <ini>
  222. * passive_max_channel_time_6g - Set max time for passive 6G channel scan
  223. * @Min: 0
  224. * @Max: 10000
  225. * @Default: 60
  226. *
  227. * This ini is used to set maximum time in msecs spent in passive 6G chan scan
  228. *
  229. * Related: None
  230. *
  231. * Supported Feature: Scan
  232. *
  233. * Usage: External
  234. *
  235. * </ini>
  236. */
  237. #define CFG_PASSIVE_MAX_6G_CHANNEL_TIME CFG_INI_UINT(\
  238. "passive_max_channel_time_6g",\
  239. 0, 10000, 60,\
  240. CFG_VALUE_OR_DEFAULT, "max passive dwell time for 6G channels")
  241. /*
  242. * <ini>
  243. * active_max_channel_time_6g_conc - Set max time for active 6G
  244. * channel scan when associated to AP.
  245. * @Min: 0
  246. * @Max: 10000
  247. * @Default: 40
  248. *
  249. * This ini is used to set maximum time in msecs spent in
  250. * active 6G channel scan
  251. *
  252. * Related: None
  253. *
  254. * Supported Feature: Scan
  255. *
  256. * Usage: External
  257. *
  258. * </ini>
  259. */
  260. #define CFG_ACTIVE_MAX_6G_CHANNEL_TIME_CONC CFG_INI_UINT(\
  261. "active_max_channel_time_6g_conc",\
  262. 0, 10000, 40,\
  263. CFG_VALUE_OR_DEFAULT, "active conc dwell time for 6G channels")
  264. /*
  265. * <ini>
  266. * passive_max_channel_time_6g_conc - Set max time for passive 6G
  267. * channel scan when associated to AP.
  268. * @Min: 0
  269. * @Max: 10000
  270. * @Default: 40
  271. *
  272. * This ini is used to set maximum time in msecs spent in
  273. * passive 6G chan scan
  274. *
  275. * Related: None
  276. *
  277. * Supported Feature: Scan
  278. *
  279. * Usage: External
  280. *
  281. * </ini>
  282. */
  283. #define CFG_PASSIVE_MAX_6G_CHANNEL_TIME_CONC CFG_INI_UINT(\
  284. "passive_max_channel_time_6g_conc",\
  285. 0, 10000, 40,\
  286. CFG_VALUE_OR_DEFAULT,\
  287. "passive conc dwell time for 6G channels")
  288. /*
  289. * <ini>
  290. * gPassiveMaxChannelTime/RoamScan_PassiveCH_DwellTime - Set max channel time
  291. * 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 RoamScan_PassiveCH_DwellTime",\
  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 conneciton
  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 conneciton
  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 algortihm 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 Perfered 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 - Mininum 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. #define CFG_SCAN_ALL \
  1381. CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
  1382. CFG(CFG_DROP_BCN_ON_INVALID_FREQ) \
  1383. CFG(CFG_ENABLE_WAKE_LOCK_IN_SCAN) \
  1384. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
  1385. CFG(CFG_ENABLE_DFS_SCAN) \
  1386. CFG(CFG_ENABLE_CONNECTED_SCAN) \
  1387. CFG(CFG_INITIAL_NO_DFS_SCAN) \
  1388. CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \
  1389. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
  1390. CFG(CFG_MIN_6G_CHANNEL_TIME) \
  1391. CFG(CFG_ACTIVE_MAX_6G_CHANNEL_TIME) \
  1392. CFG(CFG_PASSIVE_MAX_6G_CHANNEL_TIME) \
  1393. CFG(CFG_ACTIVE_MAX_6G_CHANNEL_TIME_CONC) \
  1394. CFG(CFG_PASSIVE_MAX_6G_CHANNEL_TIME_CONC) \
  1395. CFG(CFG_SCAN_NUM_PROBES) \
  1396. CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
  1397. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
  1398. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC) \
  1399. CFG(CFG_HONOUR_NL_SCAN_POLICY_FLAGS) \
  1400. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME_CONC) \
  1401. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME_CONC) \
  1402. CFG(CFG_MAX_REST_TIME_CONC) \
  1403. CFG(CFG_MIN_REST_TIME_CONC) \
  1404. CFG(CFG_IDLE_TIME_CONC) \
  1405. CFG(CFG_CHAN_LIST_TRIM_CONC) \
  1406. CFG(CFG_ENABLE_MAC_ADDR_SPOOFING) \
  1407. CFG(CFG_SCAN_AGING_TIME) \
  1408. CFG(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE) \
  1409. CFG(CFG_STA_SCAN_BURST_DURATION) \
  1410. CFG(CFG_P2P_SCAN_BURST_DURATION) \
  1411. CFG(CFG_GO_SCAN_BURST_DURATION) \
  1412. CFG(CFG_ENABLE_SNR_MONITORING) \
  1413. CFG(CFG_AP_SCAN_BURST_DURATION) \
  1414. CFG(CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH) \
  1415. CFG(CFG_6GHZ_SCAN_MODE) \
  1416. CFG(CFG_6GHZ_SCAN_MODE_DUTY_CYCLE) \
  1417. CFG(CFG_SCAN_ALLOW_BSS_WITH_CORRUPTED_IE) \
  1418. CFG_SCAN_PNO
  1419. #endif /* __CONFIG_SCAN_H */