cfg_mlme_sta.h 10 KB

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