cfg_mlme_lfr.h 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187
  1. /*
  2. * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * DOC: This file contains configuration definitions for MLME LFR.
  20. */
  21. #ifndef CFG_MLME_LFR_H__
  22. #define CFG_MLME_LFR_H__
  23. /*
  24. * <ini>
  25. * mawc_roam_enabled - Enable/Disable MAWC during roaming
  26. * @Min: 0 - Disabled
  27. * @Max: 1 - Enabled
  28. * @Default: 0
  29. *
  30. * This ini is used to control MAWC during roaming.
  31. *
  32. * Related: MAWCEnabled.
  33. *
  34. * Supported Feature: MAWC Roaming
  35. *
  36. * Usage: Internal/External
  37. *
  38. * </ini>
  39. */
  40. #define CFG_LFR_MAWC_ROAM_ENABLED CFG_INI_BOOL( \
  41. "mawc_roam_enabled", \
  42. 0, \
  43. "Enable/Disable MAWC during roaming")
  44. /*
  45. * <ini>
  46. * mawc_roam_traffic_threshold - Configure traffic threshold
  47. * @Min: 0
  48. * @Max: 0xFFFFFFFF
  49. * @Default: 300
  50. *
  51. * This ini is used to configure the data traffic load in kbps to
  52. * register CMC.
  53. *
  54. * Related: mawc_roam_enabled.
  55. *
  56. * Supported Feature: MAWC Roaming
  57. *
  58. * Usage: Internal/External
  59. *
  60. * </ini>
  61. */
  62. #define CFG_LFR_MAWC_ROAM_TRAFFIC_THRESHOLD CFG_INI_UINT( \
  63. "mawc_roam_traffic_threshold", \
  64. 0, \
  65. 0xFFFFFFFF, \
  66. 300, \
  67. CFG_VALUE_OR_DEFAULT, \
  68. "Configure traffic threshold")
  69. /*
  70. * <ini>
  71. * mawc_roam_ap_rssi_threshold - Best AP RSSI threshold
  72. * @Min: -120
  73. * @Max: 0
  74. * @Default: -66
  75. *
  76. * This ini is used to specify the RSSI threshold to scan for the AP.
  77. *
  78. * Related: mawc_roam_enabled.
  79. *
  80. * Supported Feature: MAWC Roaming
  81. *
  82. * Usage: Internal/External
  83. *
  84. * </ini>
  85. */
  86. #define CFG_LFR_MAWC_ROAM_AP_RSSI_THRESHOLD CFG_INI_INT( \
  87. "mawc_roam_ap_rssi_threshold", \
  88. -120, \
  89. 0, \
  90. -66, \
  91. CFG_VALUE_OR_DEFAULT, \
  92. "Best AP RSSI threshold")
  93. /*
  94. * <ini>
  95. * mawc_roam_rssi_high_adjust - Adjust MAWC roam high RSSI
  96. * @Min: 3
  97. * @Max: 5
  98. * @Default: 5
  99. *
  100. * This ini is used for high RSSI threshold adjustment in stationary state
  101. * to suppress the scan.
  102. *
  103. * Related: mawc_roam_enabled.
  104. *
  105. * Supported Feature: MAWC Roaming
  106. *
  107. * Usage: Internal/External
  108. *
  109. * </ini>
  110. */
  111. #define CFG_LFR_MAWC_ROAM_RSSI_HIGH_ADJUST CFG_INI_UINT( \
  112. "mawc_roam_ap_rssi_threshold", \
  113. 3, \
  114. 5, \
  115. 5, \
  116. CFG_VALUE_OR_DEFAULT, \
  117. "Adjust MAWC roam high RSSI")
  118. /*
  119. * <ini>
  120. * mawc_roam_rssi_low_adjust - Adjust MAWC roam low RSSI
  121. * @Min: 3
  122. * @Max: 5
  123. * @Default: 5
  124. *
  125. * This ini is used for low RSSI threshold adjustment in stationary state
  126. * to suppress the scan.
  127. *
  128. * Related: mawc_roam_enabled.
  129. *
  130. * Supported Feature: MAWC Roaming
  131. *
  132. * Usage: Internal/External
  133. *
  134. * </ini>
  135. */
  136. #define CFG_LFR_MAWC_ROAM_RSSI_LOW_ADJUST CFG_INI_UINT( \
  137. "mawc_roam_rssi_low_adjust", \
  138. 3, \
  139. 5, \
  140. 5, \
  141. CFG_VALUE_OR_DEFAULT, \
  142. "Adjust MAWC roam low RSSI")
  143. /*
  144. * <ini>
  145. * rssi_abs_thresh - The min RSSI of the candidate AP to consider roam
  146. * @Min: -96
  147. * @Max: 0
  148. * @Default: 0
  149. *
  150. * The RSSI value of the candidate AP should be higher than rssi_abs_thresh
  151. * to roam to the AP. 0 means no absolute minimum RSSI is required.
  152. *
  153. * Related: None
  154. *
  155. * Supported Feature: Roaming
  156. *
  157. * Usage: External
  158. *
  159. * </ini>
  160. */
  161. #define CFG_LFR_ROAM_RSSI_ABS_THRESHOLD CFG_INI_INT( \
  162. "rssi_abs_thresh", \
  163. -96, \
  164. 0, \
  165. 0, \
  166. CFG_VALUE_OR_DEFAULT, \
  167. "The min RSSI of the candidate AP to consider roam")
  168. /*
  169. * <ini>
  170. * lookup_threshold_5g_offset - Lookup threshold offset for 5G band
  171. * @Min: -120
  172. * @Max: 120
  173. * @Default: 0
  174. *
  175. * This ini is used to set the 5G band lookup threshold for roaming.
  176. * It depends on another INI which is gNeighborLookupThreshold.
  177. * gNeighborLookupThreshold is a legacy INI item which will be used to
  178. * set the RSSI lookup threshold for both 2G and 5G bands. If the
  179. * user wants to setup a different threshold for a 5G band, then user
  180. * can use this offset value which will be summed up to the value of
  181. * gNeighborLookupThreshold and used for 5G
  182. * e.g: gNeighborLookupThreshold = -76dBm
  183. * lookup_threshold_5g_offset = 6dBm
  184. * Then the 5G band will be configured to -76+6 = -70dBm
  185. * A default value of Zero to lookup_threshold_5g_offset will keep the
  186. * thresholds same for both 2G and 5G bands
  187. *
  188. * Related: gNeighborLookupThreshold
  189. *
  190. * Supported Feature: Roaming
  191. *
  192. * Usage: Internal/External
  193. *
  194. * </ini>
  195. */
  196. #define CFG_LFR_5G_RSSI_THRESHOLD_OFFSET CFG_INI_INT( \
  197. "lookup_threshold_5g_offset", \
  198. -120, \
  199. 120, \
  200. 0, \
  201. CFG_VALUE_OR_DEFAULT, \
  202. "Lookup threshold offset for 5G band")
  203. /*
  204. * <ini>
  205. * gEnableFastRoamInConcurrency - Enable LFR roaming on STA during concurrency
  206. * @Min: 0
  207. * @Max: 1
  208. * @Default: 1
  209. *
  210. * This INI is used to enable Legacy fast roaming(LFR) on STA link during
  211. * concurrent sessions.
  212. *
  213. * Related: None
  214. *
  215. * Supported Feature: Roaming
  216. *
  217. * Usage: External
  218. *
  219. * </ini>
  220. */
  221. #define CFG_LFR_ENABLE_FAST_ROAM_IN_CONCURRENCY CFG_INI_BOOL( \
  222. "gEnableFastRoamInConcurrency", \
  223. 1, \
  224. "Enable LFR roaming on STA during concurrency")
  225. /*
  226. * <ini>
  227. * gRoamOffloadEnabled - enable/disable roam offload feature
  228. * @Min: 0
  229. * @Max: 1
  230. * @Default: 1
  231. *
  232. * This INI is used to enable/disable roam offload feature
  233. *
  234. * Related: None
  235. *
  236. * Supported Feature: Roaming
  237. *
  238. * Usage: External
  239. *
  240. * </ini>
  241. */
  242. #define CFG_LFR3_ROAMING_OFFLOAD CFG_INI_BOOL( \
  243. "gRoamOffloadEnabled", \
  244. 1, \
  245. "enable roam offload")
  246. /*
  247. * <ini>
  248. * gEnableEarlyStopScan - Set early stop scan
  249. * @Min: 0
  250. * @Max: 1
  251. * @Default: 0
  252. *
  253. * This ini is used to set early stop scan. Early stop
  254. * scan is a feature for roaming to stop the scans at
  255. * an early stage as soon as we find a better AP to roam.
  256. * This would make the roaming happen quickly.
  257. *
  258. * Related: None
  259. *
  260. * Supported Feature: LFR Scan
  261. *
  262. * Usage: External
  263. *
  264. * </ini>
  265. */
  266. #define CFG_LFR_EARLY_STOP_SCAN_ENABLE CFG_INI_BOOL( \
  267. "gEnableEarlyStopScan", \
  268. 0, \
  269. "Set early stop scan")
  270. /*
  271. * <ini>
  272. * gEarlyStopScanMinThreshold - Set early stop scan min
  273. * threshold
  274. * @Min: -80
  275. * @Max: -70
  276. * @Default: -73
  277. *
  278. * This ini is used to set the early stop scan minimum
  279. * threshold. Early stop scan minimum threshold is the
  280. * minimum threshold to be considered for stopping the
  281. * scan. The algorithm starts with a scan on the greedy
  282. * channel list with the maximum threshold and steps down
  283. * the threshold by 20% for each further channel. It can
  284. * step down on each channel but cannot go lower than the
  285. * minimum threshold.
  286. *
  287. * Related: None
  288. *
  289. * Supported Feature: Scan
  290. *
  291. * Usage: External
  292. *
  293. * </ini>
  294. */
  295. #define CFG_LFR_EARLY_STOP_SCAN_MIN_THRESHOLD CFG_INI_INT( \
  296. "gEarlyStopScanMinThreshold", \
  297. -80, \
  298. -70, \
  299. -73, \
  300. CFG_VALUE_OR_DEFAULT, \
  301. "Set early stop scan min")
  302. /*
  303. * <ini>
  304. * gEarlyStopScanMaxThreshold - Set early stop scan max
  305. * threshold
  306. * @Min: -60
  307. * @Max: -40
  308. * @Default: -43
  309. *
  310. * This ini is used to set the the early stop scan maximum
  311. * threshold at which the candidate AP should be to be
  312. * qualified as a potential roam candidate and good enough
  313. * to stop the roaming scan.
  314. *
  315. * Related: None
  316. *
  317. * Supported Feature: Scan
  318. *
  319. * Usage: External
  320. *
  321. * </ini>
  322. */
  323. #define CFG_LFR_EARLY_STOP_SCAN_MAX_THRESHOLD CFG_INI_INT( \
  324. "gEarlyStopScanMaxThreshold", \
  325. -60, \
  326. -40, \
  327. -43, \
  328. CFG_VALUE_OR_DEFAULT, \
  329. "Set early stop scan max")
  330. /*
  331. * <ini>
  332. * gFirstScanBucketThreshold - Set first scan bucket
  333. * threshold
  334. * @Min: -50
  335. * @Max: -30
  336. * @Default: -30
  337. *
  338. * This ini will configure the first scan bucket
  339. * threshold to the mentioned value and all the AP's which
  340. * have RSSI under this threshold will fall under this
  341. * bucket. This configuration item used to tweak and
  342. * test the input for internal algorithm.
  343. *
  344. * Related: None
  345. *
  346. * Supported Feature: Scan
  347. *
  348. * Usage: Internal
  349. *
  350. * </ini>
  351. */
  352. #define CFG_LFR_FIRST_SCAN_BUCKET_THRESHOLD CFG_INI_INT( \
  353. "gFirstScanBucketThreshold", \
  354. -50, \
  355. -30, \
  356. -30, \
  357. CFG_VALUE_OR_DEFAULT, \
  358. "Set first scan bucket")
  359. /*
  360. * <ini>
  361. * gLFRSubnetDetectionEnable - Enable LFR3 subnet detection
  362. * @Min: 0
  363. * @Max: 1
  364. * @Default: 1
  365. *
  366. * Enable IP subnet detection during legacy fast roming version 3. Legacy fast
  367. * roaming could roam across IP subnets without host processors' knowledge.
  368. * This feature enables firmware to wake up the host processor if it
  369. * successfully determines change in the IP subnet. Change in IP subnet could
  370. * potentially cause disruption in IP connnectivity if IP address is not
  371. * refreshed.
  372. *
  373. * Related: None
  374. *
  375. * Supported Feature: Roaming
  376. *
  377. * Usage: External
  378. *
  379. * </ini>
  380. */
  381. #define CFG_LFR3_ENABLE_SUBNET_DETECTION CFG_INI_BOOL( \
  382. "gLFRSubnetDetectionEnable", \
  383. 1, \
  384. "Set early stop scan")
  385. /*
  386. * <ini>
  387. * gtraffic_threshold - Dense traffic threshold
  388. * @Min: 0
  389. * @Max: 0xffffffff
  390. * @Default: 400
  391. *
  392. * Dense traffic threshold
  393. * traffic threshold required for dense roam scan
  394. * Measured in kbps
  395. *
  396. * Related: None
  397. *
  398. * Supported Feature: Roaming
  399. *
  400. * Usage: External
  401. *
  402. * </ini>
  403. */
  404. #define CFG_LFR_ROAM_DENSE_TRAFFIC_THRESHOLD CFG_INI_UINT( \
  405. "gtraffic_threshold", \
  406. 0, \
  407. 0xffffffff, \
  408. 400, \
  409. CFG_VALUE_OR_DEFAULT, \
  410. "Dense traffic threshold")
  411. /*
  412. * <ini>
  413. * groam_dense_rssi_thresh_offset - Sets dense roam RSSI threshold diff
  414. * @Min: 0
  415. * @Max: 20
  416. * @Default: 10
  417. *
  418. * This INI is used to set offset value from normal RSSI threshold to dense
  419. * RSSI threshold FW will optimize roaming based on new RSSI threshold once
  420. * it detects dense environment.
  421. *
  422. * Related: None
  423. *
  424. * Supported Feature: Roaming
  425. *
  426. * Usage: External
  427. *
  428. * </ini>
  429. */
  430. #define CFG_LFR_ROAM_DENSE_RSSI_THRE_OFFSET CFG_INI_UINT( \
  431. "groam_dense_rssi_thresh_offset", \
  432. 0, \
  433. 20, \
  434. 10, \
  435. CFG_VALUE_OR_DEFAULT, \
  436. "Dense traffic threshold")
  437. /*
  438. * <ini>
  439. * groam_dense_min_aps - Sets minimum number of AP for dense roam
  440. * @Min: 1
  441. * @Max: 5
  442. * @Default: 3
  443. *
  444. * Minimum number of APs required for dense roam. FW will consider
  445. * environment as dense once it detects #APs operating is more than
  446. * groam_dense_min_aps.
  447. *
  448. * Related: None
  449. *
  450. * Supported Feature: Roaming
  451. *
  452. * Usage: External
  453. *
  454. * </ini>
  455. */
  456. #define CFG_LFR_ROAM_DENSE_MIN_APS CFG_INI_UINT( \
  457. "groam_dense_min_aps", \
  458. 1, \
  459. 5, \
  460. 3, \
  461. CFG_VALUE_OR_DEFAULT, \
  462. "Sets minimum number of AP for dense roam")
  463. /*
  464. * <ini>
  465. * roam_bg_scan_bad_rssi_thresh - RSSI threshold for background roam
  466. * @Min: -96
  467. * @Max: 0
  468. * @Default: -76
  469. *
  470. * If the DUT is connected to an AP with weak signal, then the bad RSSI
  471. * threshold will be used as an opportunity to use the scan results
  472. * from other scan clients and try to roam if there is a better AP
  473. * available in the environment.
  474. *
  475. * Related: None
  476. *
  477. * Supported Feature: Roaming
  478. *
  479. * Usage: External
  480. *
  481. * </ini>
  482. */
  483. #define CFG_LFR_ROAM_BG_SCAN_BAD_RSSI_THRESHOLD CFG_INI_INT( \
  484. "roam_bg_scan_bad_rssi_thresh", \
  485. -96, \
  486. 0, \
  487. -76, \
  488. CFG_VALUE_OR_DEFAULT, \
  489. "RSSI threshold for background roam")
  490. /*
  491. * <ini>
  492. * roam_bg_scan_client_bitmap - Bitmap used to identify the scan clients
  493. * @Min: 0
  494. * @Max: 0x7FF
  495. * @Default: 0x424
  496. *
  497. * This bitmap is used to define the client scans that need to be used
  498. * by the roaming module to perform a background roaming.
  499. * Currently supported bit positions are as follows:
  500. * Bit 0 is reserved in the firmware.
  501. * WMI_SCAN_CLIENT_NLO - 1
  502. * WMI_SCAN_CLIENT_EXTSCAN - 2
  503. * WMI_SCAN_CLIENT_ROAM - 3
  504. * WMI_SCAN_CLIENT_P2P - 4
  505. * WMI_SCAN_CLIENT_LPI - 5
  506. * WMI_SCAN_CLIENT_NAN - 6
  507. * WMI_SCAN_CLIENT_ANQP - 7
  508. * WMI_SCAN_CLIENT_OBSS - 8
  509. * WMI_SCAN_CLIENT_PLM - 9
  510. * WMI_SCAN_CLIENT_HOST - 10
  511. *
  512. * Related: None
  513. *
  514. * Supported Feature: Roaming
  515. *
  516. * Usage: External
  517. *
  518. * </ini>
  519. */
  520. #define CFG_LFR_ROAM_BG_SCAN_CLIENT_BITMAP CFG_INI_UINT( \
  521. "roam_bg_scan_client_bitmap", \
  522. 0, \
  523. 0x7FF, \
  524. 0x424, \
  525. CFG_VALUE_OR_DEFAULT, \
  526. "Bitmap used to identify the scan clients")
  527. /*
  528. * <ini>
  529. * roam_bad_rssi_thresh_offset_2g - RSSI threshold offset for 2G to 5G roam
  530. * @Min: 0
  531. * @Max: 86
  532. * @Default: 40
  533. *
  534. * If the DUT is connected to an AP with weak signal in 2G band, then the
  535. * bad RSSI offset for 2g would be used as offset from the bad RSSI
  536. * threshold configured and then use the resulting rssi for an opportunity
  537. * to use the scan results from other scan clients and try to roam to
  538. * 5G Band ONLY if there is a better AP available in the environment.
  539. *
  540. * For example if the roam_bg_scan_bad_rssi_thresh is -76 and
  541. * roam_bad_rssi_thresh_offset_2g is 40 then the difference of -36 would be
  542. * used as a trigger to roam to a 5G AP if DUT initially connected to a 2G AP
  543. *
  544. * Related: roam_bg_scan_bad_rssi_thresh
  545. *
  546. * Supported Feature: Roaming
  547. *
  548. * Usage: External
  549. *
  550. * </ini>
  551. */
  552. #define CFG_LFR_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G CFG_INI_UINT( \
  553. "roam_bad_rssi_thresh_offset_2g", \
  554. 0, \
  555. 86, \
  556. 40, \
  557. CFG_VALUE_OR_DEFAULT, \
  558. "RSSI threshold offset for 2G to 5G roam")
  559. /*
  560. * <ini>
  561. * roamscan_adaptive_dwell_mode - Sets dwell time adaptive mode
  562. * @Min: 0
  563. * @Max: 4
  564. * @Default: 1
  565. *
  566. * This parameter will set the algo used in dwell time optimization during
  567. * roam scan. see enum scan_dwelltime_adaptive_mode.
  568. * Acceptable values for this:
  569. * 0: Default (Use firmware default mode)
  570. * 1: Conservative optimization
  571. * 2: Moderate optimization
  572. * 3: Aggressive optimization
  573. * 4: Static
  574. *
  575. * Related: None
  576. *
  577. * Supported Feature: Roaming
  578. *
  579. * Usage: External
  580. *
  581. * </ini>
  582. */
  583. #define CFG_LFR_ADAPTIVE_ROAMSCAN_DWELL_MODE CFG_INI_UINT( \
  584. "roamscan_adaptive_dwell_mode", \
  585. 0, \
  586. 4, \
  587. 1, \
  588. CFG_VALUE_OR_DEFAULT, \
  589. "Sets dwell time adaptive mode")
  590. /*
  591. * <ini>
  592. * gper_roam_enabled - To enabled/disable PER based roaming in FW
  593. * @Min: 0
  594. * @Max: 3
  595. * @Default: 3
  596. *
  597. * This ini is used to enable/disable Packet error based roaming, enabling this
  598. * will cause DUT to monitor Tx and Rx traffic and roam to a better candidate
  599. * if current is not good enough.
  600. *
  601. * Values supported:
  602. * 0: disabled
  603. * 1: enabled for Rx traffic
  604. * 2: enabled for Tx traffic
  605. * 3: enabled for Tx and Rx traffic
  606. *
  607. * Related: gper_roam_high_rate_th, gper_roam_low_rate_th,
  608. * gper_roam_th_percent, gper_roam_rest_time
  609. *
  610. * Supported Feature: LFR-3.0
  611. *
  612. * Usage: Internal
  613. *
  614. * </ini>
  615. */
  616. #define CFG_LFR_PER_ROAM_ENABLE CFG_INI_UINT( \
  617. "gper_roam_enabled", \
  618. 0, \
  619. 3, \
  620. 3, \
  621. CFG_VALUE_OR_DEFAULT, \
  622. "To enabled/disable PER based roaming in FW")
  623. /*
  624. * <ini>
  625. * gper_roam_high_rate_th - Rate at which PER based roam will stop
  626. * @Min: 1 Mbps
  627. * @Max: 0xffffffff
  628. * @Default: 40 Mbps
  629. *
  630. * This ini is used to define the data rate in mbps*10 at which FW will stop
  631. * monitoring the traffic for PER based roam.
  632. *
  633. * Related: gper_roam_enabled, gper_roam_low_rate_th,
  634. * gper_roam_th_percent, gper_roam_rest_time
  635. *
  636. * Supported Feature: LFR-3.0
  637. *
  638. * Usage: Internal
  639. *
  640. * </ini>
  641. */
  642. #define CFG_LFR_PER_ROAM_CONFIG_HIGH_RATE_TH CFG_INI_UINT( \
  643. "gper_roam_high_rate_th", \
  644. 10, \
  645. 0xffffffff, \
  646. 400, \
  647. CFG_VALUE_OR_DEFAULT, \
  648. "Rate at which PER based roam will stop")
  649. /*
  650. * <ini>
  651. * gper_roam_low_rate_th - Rate at which FW starts considering traffic for PER
  652. * based roam.
  653. *
  654. * @Min: 1 Mbps
  655. * @Max: 0xffffffff
  656. * @Default: 20 Mbps
  657. *
  658. * This ini is used to define the rate in mbps*10 at which FW starts considering
  659. * traffic for PER based roam, if gper_roam_th_percent of data is below this
  660. * rate, FW will issue a roam scan.
  661. *
  662. * Related: gper_roam_enabled, gper_roam_high_rate_th,
  663. * gper_roam_th_percent, gper_roam_rest_time
  664. *
  665. * Supported Feature: LFR-3.0
  666. *
  667. * Usage: Internal
  668. *
  669. * </ini>
  670. */
  671. #define CFG_LFR_PER_ROAM_CONFIG_LOW_RATE_TH CFG_INI_UINT( \
  672. "gper_roam_low_rate_th", \
  673. 10, \
  674. 0xffffffff, \
  675. 200, \
  676. CFG_VALUE_OR_DEFAULT, \
  677. "Rate at which FW starts considering traffic for PER")
  678. /*
  679. * <ini>
  680. * gper_roam_th_percent - Percentage at which FW will issue a roam scan if
  681. * traffic is below gper_roam_low_rate_th rate.
  682. *
  683. * @Min: 10%
  684. * @Max: 100%
  685. * @Default: 60%
  686. *
  687. * This ini is used to define the percentage at which FW will issue a roam scan
  688. * if traffic is below gper_roam_low_rate_th rate.
  689. *
  690. * Related: gper_roam_enabled, gper_roam_high_rate_th,
  691. * gper_roam_high_rate_th, gper_roam_rest_time
  692. *
  693. * Supported Feature: LFR-3.0
  694. *
  695. * Usage: Internal
  696. *
  697. * </ini>
  698. */
  699. #define CFG_LFR_PER_ROAM_CONFIG_RATE_TH_PERCENT CFG_INI_UINT( \
  700. "gper_roam_th_percent", \
  701. 10, \
  702. 100, \
  703. 60, \
  704. CFG_VALUE_OR_DEFAULT, \
  705. "Percentage at which FW will issue a roam scan")
  706. /*
  707. * <ini>
  708. * gper_roam_rest_time - Time for which FW will wait once it issues a
  709. * roam scan.
  710. *
  711. * @Min: 10 seconds
  712. * @Max: 3600 seconds
  713. * @Default: 300 seconds
  714. *
  715. * This ini is used to define the time for which FW will wait once it issues a
  716. * PER based roam scan.
  717. *
  718. * Related: gper_roam_enabled, gper_roam_high_rate_th,
  719. * gper_roam_high_rate_th, gper_roam_th_percent
  720. *
  721. * Supported Feature: LFR-3.0
  722. *
  723. * Usage: Internal
  724. *
  725. * </ini>
  726. */
  727. #define CFG_LFR_PER_ROAM_REST_TIME CFG_INI_UINT( \
  728. "gper_roam_rest_time", \
  729. 10, \
  730. 3600, \
  731. 300, \
  732. CFG_VALUE_OR_DEFAULT, \
  733. "Time for which FW will wait once it issues a roam scan")
  734. /*
  735. * <ini>
  736. * gper_roam_mon_time - Minimum time required in seconds to
  737. * be considered as valid scenario for PER based roam
  738. * @Min: 5
  739. * @Max: 25
  740. * @Default: 25
  741. *
  742. * This ini is used to define minimum time in seconds for which DUT has
  743. * collected the PER stats before it can consider the stats hysteresis to be
  744. * valid for PER based scan.
  745. * DUT collects following information during this period:
  746. * 1. % of packets below gper_roam_low_rate_th
  747. * 2. # packets above gper_roam_high_rate_th
  748. * if DUT gets (1) greater than gper_roam_th_percent and (2) is zero during
  749. * this period, it triggers PER based roam scan.
  750. *
  751. * Related: gper_roam_enabled, gper_roam_high_rate_th, gper_roam_low_rate_th,
  752. * gper_roam_th_percent, gper_roam_rest_time
  753. *
  754. * Supported Feature: LFR-3.0
  755. *
  756. * Usage: Internal
  757. *
  758. * </ini>
  759. */
  760. #define CFG_LFR_PER_ROAM_MONITOR_TIME CFG_INI_UINT( \
  761. "gper_roam_mon_time", \
  762. 5, \
  763. 25, \
  764. 25, \
  765. CFG_VALUE_OR_DEFAULT, \
  766. "Minimum time to be considered as valid scenario for PER based roam")
  767. /*
  768. * <ini>
  769. * gper_min_rssi_threshold_for_roam - Minimum roamable AP RSSI for
  770. * candidate selection for PER based roam
  771. * @Min: 0
  772. * @Max: 96
  773. * @Default: 83
  774. *
  775. * Minimum roamable AP RSSI for candidate selection for PER based roam
  776. *
  777. * Related: gper_roam_enabled, gper_roam_high_rate_th, gper_roam_low_rate_th,
  778. * gper_roam_th_percent, gper_roam_rest_time
  779. *
  780. * Supported Feature: LFR-3.0
  781. *
  782. * Usage: Internal
  783. *
  784. * </ini>
  785. */
  786. #define CFG_LFR_PER_ROAM_MIN_CANDIDATE_RSSI CFG_INI_UINT( \
  787. "gper_min_rssi_threshold_for_roam", \
  788. 10, \
  789. 96, \
  790. 83, \
  791. CFG_VALUE_OR_DEFAULT, \
  792. "Minimum roamable AP RSSI for candidate selection for PER based roam")
  793. /*
  794. * <ini>
  795. * groam_disallow_duration - disallow duration before roaming
  796. * @Min: 0
  797. * @Max: 3600
  798. * @Default: 30
  799. *
  800. * This ini is used to configure how long LCA[Last Connected AP] AP will
  801. * be disallowed before it can be a roaming candidate again, in units of
  802. * seconds.
  803. *
  804. * Related: LFR
  805. *
  806. * Usage: Internal
  807. *
  808. * </ini>
  809. */
  810. #define CFG_LFR3_ROAM_DISALLOW_DURATION CFG_INI_UINT( \
  811. "groam_disallow_duration", \
  812. 0, \
  813. 3600, \
  814. 30, \
  815. CFG_VALUE_OR_DEFAULT, \
  816. "disallow duration before roaming")
  817. /*
  818. * <ini>
  819. * grssi_channel_penalization - RSSI penalization
  820. * @Min: 0
  821. * @Max: 15
  822. * @Default: 5
  823. *
  824. * This ini is used to configure RSSI that will be penalized if candidate(s)
  825. * are found to be in the same channel as disallowed AP's, in units of db.
  826. *
  827. * Related: LFR
  828. *
  829. * Usage: Internal
  830. *
  831. * </ini>
  832. */
  833. #define CFG_LFR3_ROAM_RSSI_CHANNEL_PENALIZATION CFG_INI_UINT( \
  834. "grssi_channel_penalization", \
  835. 0, \
  836. 15, \
  837. 5, \
  838. CFG_VALUE_OR_DEFAULT, \
  839. "RSSI penalization")
  840. /*
  841. * <ini>
  842. * groam_num_disallowed_aps - Max number of AP's to maintain in LCA list
  843. * @Min: 0
  844. * @Max: 8
  845. * @Default: 3
  846. *
  847. * This ini is used to set the maximum number of AP's to be maintained
  848. * in LCA [Last Connected AP] list.
  849. *
  850. * Related: LFR
  851. *
  852. * Usage: Internal
  853. *
  854. * </ini>
  855. */
  856. #define CFG_LFR3_ROAM_NUM_DISALLOWED_APS CFG_INI_UINT( \
  857. "groam_num_disallowed_aps", \
  858. 0, \
  859. 8, \
  860. 3, \
  861. CFG_VALUE_OR_DEFAULT, \
  862. "Max number of AP's to maintain in LCA list")
  863. /*
  864. * <ini>
  865. * enable_5g_band_pref - Enable preference for 5G from INI.
  866. * @Min: 0
  867. * @Max: 1
  868. * @Default: 0
  869. * This ini is used to enable 5G preference parameters.
  870. *
  871. * Related: 5g_rssi_boost_threshold, 5g_rssi_boost_factor, 5g_max_rssi_boost
  872. * 5g_rssi_penalize_threshold, 5g_rssi_penalize_factor, 5g_max_rssi_penalize
  873. *
  874. * Supported Feature: 5G band preference
  875. *
  876. * Usage: External
  877. *
  878. * </ini>
  879. */
  880. #define CFG_LFR_ENABLE_5G_BAND_PREF CFG_INI_BOOL( \
  881. "enable_5g_band_pref", \
  882. 0, \
  883. "Enable preference for 5G from INI")
  884. /*
  885. * <ini>
  886. * 5g_rssi_boost_threshold - A_band_boost_threshold above which 5G is favored.
  887. * @Min: -55
  888. * @Max: -70
  889. * @Default: -60
  890. * This ini is used to set threshold for 5GHz band preference.
  891. *
  892. * Related: 5g_rssi_boost_factor, 5g_max_rssi_boost
  893. * 5g_rssi_penalize_threshold, 5g_rssi_penalize_factor, 5g_max_rssi_penalize
  894. *
  895. * Supported Feature: 5G band preference
  896. *
  897. * Usage: External
  898. *
  899. * </ini>
  900. */
  901. #define CFG_LFR_5G_RSSI_BOOST_THRESHOLD CFG_INI_INT( \
  902. "5g_rssi_boost_threshold", \
  903. -55, \
  904. -70, \
  905. -60, \
  906. CFG_VALUE_OR_DEFAULT, \
  907. "A_band_boost_threshold above which 5 GHz is favored")
  908. /*
  909. * <ini>
  910. * 5g_rssi_boost_factor - Factor by which 5GHz RSSI is boosted.
  911. * @Min: 0
  912. * @Max: 2
  913. * @Default: 1
  914. * This ini is used to set the 5Ghz boost factor.
  915. *
  916. * Related: 5g_rssi_boost_threshold, 5g_max_rssi_boost
  917. * 5g_rssi_penalize_threshold, 5g_rssi_penalize_factor, 5g_max_rssi_penalize
  918. *
  919. * Supported Feature: 5G band preference
  920. *
  921. * Usage: External
  922. *
  923. * </ini>
  924. */
  925. #define CFG_LFR_5G_RSSI_BOOST_FACTOR CFG_INI_UINT( \
  926. "5g_rssi_boost_factor", \
  927. 0, \
  928. 2, \
  929. 1, \
  930. CFG_VALUE_OR_DEFAULT, \
  931. "Factor by which 5GHz RSSI is boosted")
  932. /*
  933. * <ini>
  934. * 5g_max_rssi_boost - Maximum boost that can be applied to 5GHz RSSI.
  935. * @Min: 0
  936. * @Max: 20
  937. * @Default: 10
  938. * This ini is used to set maximum boost which can be given to a 5Ghz network.
  939. *
  940. * Related: 5g_rssi_boost_threshold, 5g_rssi_boost_factor
  941. * 5g_rssi_penalize_threshold, 5g_rssi_penalize_factor, 5g_max_rssi_penalize
  942. *
  943. * Supported Feature: 5G band preference
  944. *
  945. * Usage: External
  946. *
  947. * </ini>
  948. */
  949. #define CFG_LFR_5G_MAX_RSSI_BOOST CFG_INI_UINT( \
  950. "5g_max_rssi_boost", \
  951. 0, \
  952. 20, \
  953. 10, \
  954. CFG_VALUE_OR_DEFAULT, \
  955. "Maximum boost that can be applied to 5GHz RSSI")
  956. /*
  957. * <ini>
  958. * 5g_rssi_penalize_threshold - A_band_penalize_threshold above which
  959. * 5 GHz is not favored.
  960. * @Min: -65
  961. * @Max: -80
  962. * @Default: -70
  963. * This ini is used to set threshold for 5GHz band preference.
  964. *
  965. * Related: 5g_rssi_penalize_factor, 5g_max_rssi_penalize
  966. * 5g_rssi_boost_threshold, 5g_rssi_boost_factor, 5g_max_rssi_boost
  967. *
  968. * Supported Feature: 5G band preference
  969. *
  970. * Usage: External
  971. *
  972. * </ini>
  973. */
  974. #define CFG_LFR_5G_RSSI_PENALIZE_THRESHOLD CFG_INI_INT( \
  975. "5g_rssi_penalize_threshold", \
  976. -65, \
  977. -80, \
  978. -70, \
  979. CFG_VALUE_OR_DEFAULT, \
  980. "A_band_penalize_threshold above which 5 GHz is not favored")
  981. /*
  982. * <ini>
  983. * 5g_rssi_penalize_factor - Factor by which 5GHz RSSI is penalizeed.
  984. * @Min: 0
  985. * @Max: 2
  986. * @Default: 1
  987. * This ini is used to set the 5Ghz penalize factor.
  988. *
  989. * Related: 5g_rssi_penalize_threshold, 5g_max_rssi_penalize
  990. * 5g_rssi_boost_threshold, 5g_rssi_boost_factor, 5g_max_rssi_boost
  991. *
  992. * Supported Feature: 5G band preference
  993. *
  994. * Usage: External
  995. *
  996. * </ini>
  997. */
  998. #define CFG_LFR_5G_RSSI_PENALIZE_FACTOR CFG_INI_UINT( \
  999. "5g_rssi_penalize_factor", \
  1000. 0, \
  1001. 2, \
  1002. 1, \
  1003. CFG_VALUE_OR_DEFAULT, \
  1004. "Factor by which 5GHz RSSI is penalizeed")
  1005. /*
  1006. * <ini>
  1007. * 5g_max_rssi_penalize - Maximum penalty that can be applied to 5GHz RSSI.
  1008. * @Min: 0
  1009. * @Max: 20
  1010. * @Default: 10
  1011. * This ini is used to set maximum penalty which can be given to a 5Ghz network.
  1012. *
  1013. * Related: 5g_rssi_penalize_threshold, 5g_rssi_penalize_factor
  1014. * 5g_rssi_boost_threshold, 5g_rssi_boost_factor, 5g_max_rssi_boost
  1015. *
  1016. * Supported Feature: 5G band preference
  1017. *
  1018. * Usage: External
  1019. *
  1020. * </ini>
  1021. */
  1022. #define CFG_LFR_5G_MAX_RSSI_PENALIZE CFG_INI_UINT( \
  1023. "5g_max_rssi_penalize", \
  1024. 0, \
  1025. 20, \
  1026. 10, \
  1027. CFG_VALUE_OR_DEFAULT, \
  1028. "Maximum penalty that can be applied to 5GHz RSSI")
  1029. /*
  1030. * max_num_pre_auth - Configure max number of pre-auth
  1031. * @Min: 0
  1032. * @Max: 256
  1033. * @Default: 64
  1034. *
  1035. * This ini is used to configure the data max number of pre-auth
  1036. *
  1037. * Usage: Internal
  1038. *
  1039. */
  1040. #define CFG_LFR_MAX_NUM_PRE_AUTH CFG_UINT( \
  1041. "max_num_pre_auth", \
  1042. 0, \
  1043. 256, \
  1044. 64, \
  1045. CFG_VALUE_OR_DEFAULT, \
  1046. "")
  1047. /*
  1048. * roam_preauth_retry_count
  1049. *
  1050. * @Min: 1
  1051. * @Max: 10
  1052. * @Default: 5
  1053. *
  1054. * The maximum number of software retries for preauth or
  1055. * reassoc made before picking up the next candidate for
  1056. * connection during roaming.
  1057. *
  1058. * Related: N/A
  1059. *
  1060. * Supported Features: Roaming
  1061. *
  1062. * Usage: Internal/External
  1063. *
  1064. * </ini>
  1065. */
  1066. #define CFG_LFR3_ROAM_PREAUTH_RETRY_COUNT CFG_INI_INT( \
  1067. "roam_preauth_retry_count", \
  1068. 1, \
  1069. 10, \
  1070. 5, \
  1071. CFG_VALUE_OR_DEFAULT, \
  1072. "The maximum number of software retries for preauth")
  1073. /*
  1074. * <ini>
  1075. * roam_preauth_no_ack_timeout
  1076. *
  1077. * @Min: 5
  1078. * @Max: 50
  1079. * @Default: 5
  1080. *
  1081. * Time to wait (in ms) after sending an preauth or reassoc
  1082. * request which didn’t have an ack, before considering
  1083. * it as a failure and making another software retry.
  1084. *
  1085. * Related: N/A
  1086. *
  1087. * Supported Features: Roaming
  1088. *
  1089. * Usage: Internal/External
  1090. *
  1091. * </ini>
  1092. */
  1093. #define CFG_LFR3_ROAM_PREAUTH_NO_ACK_TIMEOUT CFG_INI_INT( \
  1094. "roam_preauth_no_ack_timeout", \
  1095. 5, \
  1096. 50, \
  1097. 5, \
  1098. CFG_VALUE_OR_DEFAULT, \
  1099. "Time to wait after sending an preauth or reassoc")
  1100. #define CFG_LFR_ALL \
  1101. CFG(CFG_LFR_MAWC_ROAM_ENABLED) \
  1102. CFG(CFG_LFR_MAWC_ROAM_TRAFFIC_THRESHOLD) \
  1103. CFG(CFG_LFR_MAWC_ROAM_AP_RSSI_THRESHOLD) \
  1104. CFG(CFG_LFR_MAWC_ROAM_RSSI_HIGH_ADJUST) \
  1105. CFG(CFG_LFR_MAWC_ROAM_RSSI_LOW_ADJUST) \
  1106. CFG(CFG_LFR_ROAM_RSSI_ABS_THRESHOLD) \
  1107. CFG(CFG_LFR_5G_RSSI_THRESHOLD_OFFSET) \
  1108. CFG(CFG_LFR_ENABLE_FAST_ROAM_IN_CONCURRENCY) \
  1109. CFG(CFG_LFR3_ROAMING_OFFLOAD) \
  1110. CFG(CFG_LFR_EARLY_STOP_SCAN_ENABLE) \
  1111. CFG(CFG_LFR_EARLY_STOP_SCAN_MIN_THRESHOLD) \
  1112. CFG(CFG_LFR_EARLY_STOP_SCAN_MAX_THRESHOLD) \
  1113. CFG(CFG_LFR_FIRST_SCAN_BUCKET_THRESHOLD) \
  1114. CFG(CFG_LFR3_ENABLE_SUBNET_DETECTION) \
  1115. CFG(CFG_LFR_ROAM_DENSE_TRAFFIC_THRESHOLD) \
  1116. CFG(CFG_LFR_ROAM_DENSE_RSSI_THRE_OFFSET) \
  1117. CFG(CFG_LFR_ROAM_DENSE_MIN_APS) \
  1118. CFG(CFG_LFR_ROAM_BG_SCAN_BAD_RSSI_THRESHOLD) \
  1119. CFG(CFG_LFR_ROAM_BG_SCAN_CLIENT_BITMAP) \
  1120. CFG(CFG_LFR_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G) \
  1121. CFG(CFG_LFR_ADAPTIVE_ROAMSCAN_DWELL_MODE) \
  1122. CFG(CFG_LFR_PER_ROAM_ENABLE) \
  1123. CFG(CFG_LFR_PER_ROAM_CONFIG_HIGH_RATE_TH) \
  1124. CFG(CFG_LFR_PER_ROAM_CONFIG_LOW_RATE_TH) \
  1125. CFG(CFG_LFR_PER_ROAM_CONFIG_RATE_TH_PERCENT) \
  1126. CFG(CFG_LFR_PER_ROAM_REST_TIME) \
  1127. CFG(CFG_LFR_PER_ROAM_MONITOR_TIME) \
  1128. CFG(CFG_LFR_PER_ROAM_MIN_CANDIDATE_RSSI) \
  1129. CFG(CFG_LFR3_ROAM_DISALLOW_DURATION) \
  1130. CFG(CFG_LFR3_ROAM_RSSI_CHANNEL_PENALIZATION) \
  1131. CFG(CFG_LFR3_ROAM_NUM_DISALLOWED_APS) \
  1132. CFG(CFG_LFR_ENABLE_5G_BAND_PREF) \
  1133. CFG(CFG_LFR_5G_RSSI_BOOST_THRESHOLD) \
  1134. CFG(CFG_LFR_5G_RSSI_BOOST_FACTOR) \
  1135. CFG(CFG_LFR_5G_MAX_RSSI_BOOST) \
  1136. CFG(CFG_LFR_5G_RSSI_PENALIZE_THRESHOLD) \
  1137. CFG(CFG_LFR_5G_RSSI_PENALIZE_FACTOR) \
  1138. CFG(CFG_LFR_5G_MAX_RSSI_PENALIZE) \
  1139. CFG(CFG_LFR_MAX_NUM_PRE_AUTH) \
  1140. CFG(CFG_LFR3_ROAM_PREAUTH_RETRY_COUNT) \
  1141. CFG(CFG_LFR3_ROAM_PREAUTH_NO_ACK_TIMEOUT)
  1142. #endif /* CFG_MLME_LFR_H__ */