cfg_scan.h 34 KB

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