cfg_mlme_sta.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  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 any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. /**
  18. * DOC: This file contains configuration definitions for MLME STA.
  19. */
  20. #ifndef CFG_MLME_STA_H__
  21. #define CFG_MLME_STA_H__
  22. #include "wlan_mlme_public_struct.h"
  23. /*
  24. * <ini>
  25. * gStaKeepAlivePeriod/ConKeepAlive_Interval - STA keep alive period
  26. *
  27. *
  28. * @Min: 0
  29. * @Max: 1000
  30. * @Default: 30
  31. *
  32. * This ini is used to control how frequently STA should send NULL frames to AP
  33. * (period in seconds) to notify AP of its existence.
  34. *
  35. * Related: None
  36. *
  37. * Supported Feature: STA
  38. *
  39. * Usage: Internal/External
  40. *
  41. * </ini>
  42. */
  43. #define CFG_INFRA_STA_KEEP_ALIVE_PERIOD CFG_INI_UINT( \
  44. "gStaKeepAlivePeriod ConKeepAlive_Interval", \
  45. 0, \
  46. 1000, \
  47. 30, \
  48. CFG_VALUE_OR_DEFAULT, \
  49. "send default NULL frame to AP")
  50. /*
  51. * bss_max_idle_period - STA bss max period
  52. *
  53. * @Min: 0
  54. * @Max: 100
  55. * @Default: 0
  56. *
  57. * This ini is used to advertise the bss max idle period in assoc req.
  58. *
  59. * Related: None
  60. *
  61. * Supported Feature: STA
  62. *
  63. * Usage: Internal
  64. *
  65. */
  66. #define CFG_STA_BSS_MAX_IDLE_PERIOD CFG_UINT( \
  67. "bss_max_idle_period", \
  68. 0, \
  69. 100, \
  70. 0, \
  71. CFG_VALUE_OR_DEFAULT, \
  72. "advertise bss max idle period")
  73. /*
  74. * <ini>
  75. * tgt_gtx_usr_cfg - target gtx user config
  76. * @Min: 0
  77. * @Max: 32
  78. * @Default: 32
  79. *
  80. * This ini is used to set target gtx user config.
  81. *
  82. * Related: None
  83. *
  84. * Usage: Internal/External
  85. *
  86. * </ini>
  87. */
  88. #define CFG_TGT_GTX_USR_CFG CFG_INI_UINT( \
  89. "tgt_gtx_usr_cfg", \
  90. 0, \
  91. 32, \
  92. 32, \
  93. CFG_VALUE_OR_DEFAULT, \
  94. "target gtx user config")
  95. /*
  96. * <ini>
  97. * pmkidModes - Enable PMKID modes
  98. * This INI is used to enable PMKID feature options
  99. * @Min: 0
  100. * @Max: 3
  101. * @Default: 3
  102. *
  103. * Related: None
  104. *
  105. * Supported Feature: Scan
  106. *
  107. * Usage: External
  108. *
  109. * </ini>
  110. */
  111. #define CFG_PMKID_MODES CFG_INI_UINT( \
  112. "pmkidModes", \
  113. 0, \
  114. 3, \
  115. 3, \
  116. CFG_VALUE_OR_DEFAULT, \
  117. "PMKID feature options")
  118. /*
  119. * <ini>
  120. * gIgnorePeerErpInfo - Ignore peer information
  121. * @Min: 0
  122. * @Max: 1
  123. * @Default: 0
  124. *
  125. * This ini is used to ignore default peer info
  126. *
  127. * Related: None
  128. *
  129. * Supported Feature: STA
  130. *
  131. * Usage: Internal/External
  132. *
  133. * </ini>
  134. */
  135. #define CFG_IGNORE_PEER_ERP_INFO CFG_INI_BOOL( \
  136. "gIgnorePeerErpInfo", \
  137. 0, \
  138. "ignore default peer info")
  139. /*
  140. * <ini>
  141. * gStaPrefer80MHzOver160MHz - set sta preference to connect in 80HZ/160HZ
  142. * @Min: 0
  143. * @Max: 2
  144. * @Default: 0
  145. *
  146. * This ini is used to set sta preference to connect in 80HZ/160HZ
  147. *
  148. * 0 - Connects in 160MHz 1x1 when AP is 160MHz 2x2
  149. * 1 - Connects in 80MHz 2x2 when AP is 160MHz 2x2
  150. * 2 - Always Connects in 80MHz when AP is 160MHz
  151. *
  152. * Related: NA
  153. *
  154. * Supported Feature: 11AC
  155. *
  156. * Usage: External
  157. *
  158. * </ini>
  159. */
  160. #define CFG_STA_PREFER_80MHZ_OVER_160MHZ CFG_INI_UINT( \
  161. "gStaPrefer80MHzOver160MHz", \
  162. 0, \
  163. 2, \
  164. 0, \
  165. CFG_VALUE_OR_DEFAULT, \
  166. "Sta preference to connect in 80HZ/160HZ")
  167. /*
  168. * <ini>
  169. * gEnable5gEBT - Enables/disables 5G early beacon termination. When enabled
  170. * terminate the reception of beacon if the TIM element is
  171. * clear for the power saving
  172. * @Min: 0
  173. * @Max: 1
  174. * @Default: 1
  175. *
  176. * This ini is used to set default 5G early beacon termination
  177. *
  178. * Related: None
  179. *
  180. * Supported Feature: STA
  181. *
  182. * Usage: Internal/External
  183. *
  184. * </ini>
  185. */
  186. #define CFG_PPS_ENABLE_5G_EBT CFG_INI_BOOL( \
  187. "gEnable5gEBT", \
  188. 1, \
  189. "5G early beacon termination")
  190. /*
  191. * <ini>
  192. * gSendDeauthBeforeCon - Send deauth before connection or not
  193. * @Min: 0
  194. * @Max: 1
  195. * @Default: 0
  196. *
  197. * This ini is used to set whether send deauth before connection or
  198. * not. If last disconnection was due to HB failure and we reconnect
  199. * to same AP next time, send deauth before starting connection.
  200. *
  201. * Related: None
  202. *
  203. * Supported Feature: STA
  204. *
  205. * Usage: Internal/External
  206. *
  207. * </ini>
  208. */
  209. #define CFG_ENABLE_DEAUTH_BEFORE_CONNECTION CFG_INI_BOOL( \
  210. "gSendDeauthBeforeCon", \
  211. 0, \
  212. "send deauth before connection")
  213. /*
  214. * <ini>
  215. * deauth_retry_cnt- No. of deauth retries if the Tx is failed
  216. * @Min: 0
  217. * @Max: 4
  218. * @Default: 2
  219. *
  220. * This ini is used to set retry deauth if Tx is not success.
  221. *
  222. * Related: None
  223. *
  224. * Supported Feature: STA
  225. *
  226. * Usage: Internal/External
  227. *
  228. * </ini>
  229. */
  230. #define CFG_DEAUTH_RETRY_CNT CFG_INI_UINT( \
  231. "deauth_retry_cnt", \
  232. 0, \
  233. 4, \
  234. 2, \
  235. CFG_VALUE_OR_DEFAULT, \
  236. "Set Deauth retry count")
  237. /*
  238. * <ini>
  239. * gDot11PMode - 802.11p mode
  240. * @Min: CFG_11P_DISABLED
  241. * @Max: CFG_11P_CONCURRENT
  242. * @Default: CFG_11P_DISABLED
  243. *
  244. * This ini used to set 802.11p mode.
  245. *
  246. *
  247. * Usage: Internal/External
  248. *
  249. * </ini>
  250. */
  251. #define CFG_DOT11P_MODE CFG_INI_UINT( \
  252. "gDot11PMode", \
  253. CFG_11P_DISABLED, \
  254. CFG_11P_CONCURRENT, \
  255. CFG_11P_DISABLED, \
  256. CFG_VALUE_OR_DEFAULT, \
  257. "802.11p mode")
  258. /*
  259. * <ini>
  260. * gEnable_go_cts2self_for_sta - Indicate firmware to stop NOA and
  261. * start using cts2self
  262. * @Min: 0
  263. * @Max: 1
  264. * @Default: 0
  265. *
  266. * When gEnable_go_cts2self_for_sta is enabled then if a legacy
  267. * client connects to P2P GO, Host will send a WMI VDEV command
  268. * to FW to stop using NOA for P2P GO
  269. * and start using CTS2SELF.
  270. *
  271. *
  272. * Supported Feature: P2P
  273. *
  274. *
  275. * Usage: Internal/External
  276. *
  277. * </ini>
  278. */
  279. #define CFG_ENABLE_GO_CTS2SELF_FOR_STA CFG_INI_BOOL( \
  280. "gEnable_go_cts2self_for_sta", \
  281. 0, \
  282. "firmware to stop NOA and start using cts2self")
  283. /*
  284. * <ini>
  285. * g_qcn_ie_support - QCN IE support
  286. * @Min: 0 (disabled)
  287. * @Max: 1 (enabled)
  288. * @Default: 1 (enabled)
  289. *
  290. * This config item is used to support QCN IE in probe/assoc/reassoc request
  291. * for STA mode. QCN IE support is not added for SAP mode.
  292. *
  293. * Related: N/A
  294. *
  295. * Supported Feature: N/A
  296. *
  297. * Usage: Internal/External
  298. *
  299. * </ini>
  300. */
  301. #define CFG_QCN_IE_SUPPORT CFG_INI_BOOL( \
  302. "g_qcn_ie_support", \
  303. 1, \
  304. "QCN IE support")
  305. /*
  306. * <ini>
  307. * g_fils_max_chan_guard_time - Set maximum channel guard time(ms)
  308. * @Min: 0
  309. * @Max: 10
  310. * @Default: 0
  311. *
  312. * This ini is used to set maximum channel guard time in milliseconds.
  313. *
  314. * Related: None
  315. *
  316. * Supported Feature: FILS
  317. *
  318. * Usage: External
  319. *
  320. * </ini>
  321. */
  322. #define CFG_FILS_MAX_CHAN_GUARD_TIME CFG_INI_UINT( \
  323. "g_fils_max_chan_guard_time", \
  324. 0, \
  325. 10, \
  326. 0, \
  327. CFG_VALUE_OR_DEFAULT, \
  328. "Set maximum channel guard time")
  329. /*
  330. * <ini>
  331. * SingleTIDRC - Set replay counter for all TID's
  332. * @Min: 0 Separate replay counter for all TID
  333. * @Max: 1 Single replay counter for all TID
  334. * @Default: 1
  335. *
  336. * This ini is used to set replay counter for all TID's
  337. *
  338. * 0 - Separate replay counter for all TID
  339. * 1 - Single replay counter for all TID
  340. *
  341. * Related: None.
  342. *
  343. * Supported Feature: WMM
  344. *
  345. * Usage: Internal/External
  346. *
  347. * </ini>
  348. */
  349. #define CFG_SINGLE_TID_RC CFG_INI_BOOL( \
  350. "SingleTIDRC", \
  351. 1, \
  352. "replay counter for all TID")
  353. /*
  354. * wait_cnf_timeout - Wait assoc cnf timeout
  355. * @Min: 10
  356. * @Max: 3000
  357. * @Default: 1000
  358. *
  359. * This is internal configure for waiting assoc cnf timeout
  360. *
  361. * Related: None
  362. *
  363. * Usage: Internal
  364. *
  365. */
  366. #define CFG_WT_CNF_TIMEOUT CFG_UINT( \
  367. "wait_cnf_timeout", \
  368. 10, \
  369. 3000, \
  370. 1000, \
  371. CFG_VALUE_OR_DEFAULT, \
  372. "Wait confirm timeout")
  373. /*
  374. * <ini>
  375. * gStaMiracastMccRestTimeVal - Rest time when Miracast is running.
  376. * @Min: 100
  377. * @Max: 500
  378. * @Default: 400
  379. *
  380. * This ini is used to set rest time for home channel for Miracast before
  381. * going for scan.
  382. *
  383. * Related: None.
  384. *
  385. * Supported Feature: Concurrency
  386. *
  387. * Usage: Internal/External
  388. *
  389. * </ini>
  390. */
  391. #define CFG_STA_MCAST_MCC_REST_TIME CFG_INI_UINT( \
  392. "gStaMiracastMccRestTimeVal", \
  393. 100, \
  394. 500, \
  395. 400, \
  396. CFG_VALUE_OR_DEFAULT, \
  397. "Rest time when Miracast is running")
  398. /*
  399. * current_rssi - current rssi
  400. * @Min: 0
  401. * @Max: 127
  402. * @Default: 0
  403. *
  404. * This is internal configure for current rssi
  405. *
  406. * Related: None
  407. *
  408. * Usage: Internal
  409. *
  410. */
  411. #define CFG_CURRENT_RSSI CFG_UINT( \
  412. "current_rssi", \
  413. 0, \
  414. 127, \
  415. 0, \
  416. CFG_VALUE_OR_DEFAULT, \
  417. "Current RSSI")
  418. /*
  419. * <ini>
  420. * gAllowTPCfromAP - Support for AP power constraint
  421. * @Min: 0
  422. * @Max: 1
  423. * @Default: 1
  424. *
  425. * This ini controls driver to honor/dishonor power constraint from AP.
  426. *
  427. * Related: None.
  428. *
  429. * Supported Feature: Concurrency
  430. *
  431. * Usage: Internal/External
  432. *
  433. * </ini>
  434. */
  435. #define CFG_TX_POWER_CTRL CFG_INI_BOOL( \
  436. "gAllowTPCfromAP", \
  437. 1, \
  438. "Support for AP power constraint")
  439. /*
  440. * <ini>
  441. * gStaKeepAliveMethod - Which keepalive method to use
  442. * @Min: 0
  443. * @Max: 1
  444. * @Default: 1
  445. *
  446. * This ini determines which keepalive method to use for station interfaces
  447. * 1) Use null data packets
  448. * 2) Use gratuitous ARP packets
  449. *
  450. * Related: gStaKeepAlivePeriod, gApKeepAlivePeriod, gGoKeepAlivePeriod
  451. *
  452. * Supported Feature: STA, Keepalive
  453. *
  454. * Usage: External
  455. *
  456. * </ini>
  457. */
  458. #define CFG_STA_KEEPALIVE_METHOD CFG_INI_INT( \
  459. "gStaKeepAliveMethod", \
  460. MLME_STA_KEEPALIVE_NULL_DATA, \
  461. MLME_STA_KEEPALIVE_COUNT - 1, \
  462. MLME_STA_KEEPALIVE_GRAT_ARP, \
  463. CFG_VALUE_OR_DEFAULT, \
  464. "Which keepalive method to use")
  465. /*
  466. * <ini>
  467. * gMaxLIModulatedDTIM - Set MaxLIModulate Dtim
  468. * @Min: 1
  469. * @Max: 10
  470. * @Default: 5
  471. *
  472. * This ini is used to set default MaxLIModulatedDTIM
  473. *
  474. * Related: None
  475. *
  476. * Supported Feature: STA
  477. *
  478. * Usage: Internal/External
  479. *
  480. * </ini>
  481. */
  482. #define CFG_MAX_LI_MODULATED_DTIM CFG_INI_UINT( \
  483. "gMaxLIModulatedDTIM", \
  484. 1, \
  485. 10, \
  486. 5, \
  487. CFG_VALUE_OR_DEFAULT, \
  488. "Max modulated dtim")
  489. /*
  490. * <ini>
  491. * @Min: 0
  492. * @Max: 2000
  493. * @Default: 500
  494. *
  495. * This ini is used to set default ConDTIMSkipping_MaxTime in ms
  496. *
  497. * Related: None
  498. *
  499. * Supported Feature: STA
  500. *
  501. * Usage: External
  502. *
  503. * </ini>
  504. */
  505. #define CFG_MAX_LI_MODULATED_DTIM_MS CFG_INI_UINT( \
  506. "ConDTIMSkipping_MaxTime", \
  507. 0, \
  508. 2000, \
  509. 500, \
  510. CFG_VALUE_OR_DEFAULT, \
  511. "DTIM skipping max time")
  512. #ifdef WLAN_FEATURE_11BE_MLO
  513. /*
  514. * <cfg>
  515. * mlo_support_link_num - Set number of link mlo connection supports for sta
  516. * @Min: 1
  517. * @Max: 3
  518. * @Default: 2
  519. *
  520. * This cfg is used to configure the number of link mlo connection supports
  521. *
  522. * Related: None
  523. *
  524. * Supported Feature: STA
  525. *
  526. * Usage: Internal
  527. *
  528. * </cfg>
  529. */
  530. #define CFG_MLO_SUPPORT_LINK_NUM CFG_UINT( \
  531. "mlo_support_link_num", \
  532. 1, \
  533. 3, \
  534. 2, \
  535. CFG_VALUE_OR_DEFAULT, \
  536. "supported mlo link number")
  537. #define CFG_MLO_SUPPORT_LINK_NUM_CFG CFG(CFG_MLO_SUPPORT_LINK_NUM)
  538. /*
  539. * <cfg>
  540. * mlo_support_link_band - Set band bitmap of mlo connection supports for sta
  541. * @Min: 1
  542. * @Max: 0x77
  543. * @Default: 0x77
  544. *
  545. * This cfg is used to configure the band bitmap of mlo connection supports
  546. *
  547. * Related: None
  548. *
  549. * Supported Feature: STA
  550. *
  551. * Usage: Internal
  552. *
  553. * Supported band of all mlo links
  554. * bits 0: REG_BAND_2G
  555. * bits 1: REG_BAND_5G
  556. * bits 2: REG_BAND_6G
  557. *
  558. * Supported band of assoc link
  559. * bits 4: REG_BAND_2G
  560. * bits 5: REG_BAND_5G
  561. * bits 6: REG_BAND_6G
  562. *
  563. * </cfg>
  564. */
  565. #define CFG_MLO_SUPPORT_LINK_BAND CFG_UINT( \
  566. "mlo_support_link_band", \
  567. 0x1, \
  568. 0x77, \
  569. 0x77, \
  570. CFG_VALUE_OR_DEFAULT, \
  571. "supported mlo link band")
  572. #define CFG_MLO_SUPPORT_LINK_BAND_CFG CFG(CFG_MLO_SUPPORT_LINK_BAND)
  573. #else
  574. #define CFG_MLO_SUPPORT_LINK_NUM_CFG
  575. #define CFG_MLO_SUPPORT_LINK_BAND_CFG
  576. #endif
  577. #define CFG_STA_ALL \
  578. CFG(CFG_INFRA_STA_KEEP_ALIVE_PERIOD) \
  579. CFG(CFG_STA_BSS_MAX_IDLE_PERIOD) \
  580. CFG(CFG_TGT_GTX_USR_CFG) \
  581. CFG(CFG_PMKID_MODES) \
  582. CFG(CFG_IGNORE_PEER_ERP_INFO) \
  583. CFG(CFG_STA_PREFER_80MHZ_OVER_160MHZ) \
  584. CFG(CFG_PPS_ENABLE_5G_EBT) \
  585. CFG(CFG_ENABLE_DEAUTH_BEFORE_CONNECTION) \
  586. CFG(CFG_DOT11P_MODE) \
  587. CFG(CFG_DEAUTH_RETRY_CNT) \
  588. CFG(CFG_ENABLE_GO_CTS2SELF_FOR_STA) \
  589. CFG(CFG_QCN_IE_SUPPORT) \
  590. CFG(CFG_STA_MCAST_MCC_REST_TIME) \
  591. CFG(CFG_FILS_MAX_CHAN_GUARD_TIME) \
  592. CFG(CFG_SINGLE_TID_RC) \
  593. CFG(CFG_STA_KEEPALIVE_METHOD) \
  594. CFG(CFG_WT_CNF_TIMEOUT) \
  595. CFG(CFG_CURRENT_RSSI) \
  596. CFG(CFG_TX_POWER_CTRL) \
  597. CFG(CFG_MAX_LI_MODULATED_DTIM_MS) \
  598. CFG_MLO_SUPPORT_LINK_NUM_CFG \
  599. CFG_MLO_SUPPORT_LINK_BAND_CFG
  600. #endif /* CFG_MLME_STA_H__ */