cfg_mlme_sta.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. /*
  2. * Copyright (c) 2012-2020, 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. * <ini>
  51. * tgt_gtx_usr_cfg - target gtx user config
  52. * @Min: 0
  53. * @Max: 32
  54. * @Default: 32
  55. *
  56. * This ini is used to set target gtx user config.
  57. *
  58. * Related: None
  59. *
  60. * Usage: Internal/External
  61. *
  62. * </ini>
  63. */
  64. #define CFG_TGT_GTX_USR_CFG CFG_INI_UINT( \
  65. "tgt_gtx_usr_cfg", \
  66. 0, \
  67. 32, \
  68. 32, \
  69. CFG_VALUE_OR_DEFAULT, \
  70. "target gtx user config")
  71. /*
  72. * <ini>
  73. * pmkidModes - Enable PMKID modes
  74. * This INI is used to enable PMKID feature options
  75. * @Min: 0
  76. * @Max: 3
  77. * @Default: 3
  78. *
  79. * Related: None
  80. *
  81. * Supported Feature: Scan
  82. *
  83. * Usage: External
  84. *
  85. * </ini>
  86. */
  87. #define CFG_PMKID_MODES CFG_INI_UINT( \
  88. "pmkidModes", \
  89. 0, \
  90. 3, \
  91. 3, \
  92. CFG_VALUE_OR_DEFAULT, \
  93. "PMKID feature options")
  94. /*
  95. * <ini>
  96. * gIgnorePeerErpInfo - Ignore peer information
  97. * @Min: 0
  98. * @Max: 1
  99. * @Default: 0
  100. *
  101. * This ini is used to ignore default peer info
  102. *
  103. * Related: None
  104. *
  105. * Supported Feature: STA
  106. *
  107. * Usage: Internal/External
  108. *
  109. * </ini>
  110. */
  111. #define CFG_IGNORE_PEER_ERP_INFO CFG_INI_BOOL( \
  112. "gIgnorePeerErpInfo", \
  113. 0, \
  114. "ignore default peer info")
  115. /*
  116. * <ini>
  117. * gStaPrefer80MHzOver160MHz - set sta preference to connect in 80HZ/160HZ
  118. * @Min: 0
  119. * @Max: 1
  120. * @Default: 0
  121. *
  122. * This ini is used to set sta preference to connect in 80HZ/160HZ
  123. *
  124. * 0 - Connects in 160MHz 1x1 when AP is 160MHz 2x2
  125. * 1 - Connects in 80MHz 2x2 when AP is 160MHz 2x2
  126. *
  127. * Related: NA
  128. *
  129. * Supported Feature: 11AC
  130. *
  131. * Usage: External
  132. *
  133. * </ini>
  134. */
  135. #define CFG_STA_PREFER_80MHZ_OVER_160MHZ CFG_INI_BOOL( \
  136. "gStaPrefer80MHzOver160MHz", \
  137. 0, \
  138. "Sta preference to connect in 80HZ/160HZ")
  139. /*
  140. * <ini>
  141. * gEnable5gEBT - Enables/disables 5G early beacon termination. When enabled
  142. * terminate the reception of beacon if the TIM element is
  143. * clear for the power saving
  144. * @Min: 0
  145. * @Max: 1
  146. * @Default: 1
  147. *
  148. * This ini is used to set default 5G early beacon termination
  149. *
  150. * Related: None
  151. *
  152. * Supported Feature: STA
  153. *
  154. * Usage: Internal/External
  155. *
  156. * </ini>
  157. */
  158. #define CFG_PPS_ENABLE_5G_EBT CFG_INI_BOOL( \
  159. "gEnable5gEBT", \
  160. 1, \
  161. "5G early beacon termination")
  162. /*
  163. * <ini>
  164. * gSendDeauthBeforeCon - Send deauth before connection or not
  165. * @Min: 0
  166. * @Max: 1
  167. * @Default: 0
  168. *
  169. * This ini is used to set whether send deauth before connection or
  170. * not. If last disconnection was due to HB failure and we reconnect
  171. * to same AP next time, send deauth before starting connection.
  172. *
  173. * Related: None
  174. *
  175. * Supported Feature: STA
  176. *
  177. * Usage: Internal/External
  178. *
  179. * </ini>
  180. */
  181. #define CFG_ENABLE_DEAUTH_BEFORE_CONNECTION CFG_INI_BOOL( \
  182. "gSendDeauthBeforeCon", \
  183. 0, \
  184. "send deauth before connection")
  185. /*
  186. * <ini>
  187. * deauth_retry_cnt- No. of deauth retries if the Tx is failed
  188. * @Min: 0
  189. * @Max: 4
  190. * @Default: 2
  191. *
  192. * This ini is used to set retry deauth if Tx is not success.
  193. *
  194. * Related: None
  195. *
  196. * Supported Feature: STA
  197. *
  198. * Usage: Internal/External
  199. *
  200. * </ini>
  201. */
  202. #define CFG_DEAUTH_RETRY_CNT CFG_INI_UINT( \
  203. "deauth_retry_cnt", \
  204. 0, \
  205. 4, \
  206. 2, \
  207. CFG_VALUE_OR_DEFAULT, \
  208. "Set Deauth retry count")
  209. /*
  210. * <ini>
  211. * gDot11PMode - 802.11p mode
  212. * @Min: CFG_11P_DISABLED
  213. * @Max: CFG_11P_CONCURRENT
  214. * @Default: CFG_11P_DISABLED
  215. *
  216. * This ini used to set 802.11p mode.
  217. *
  218. *
  219. * Usage: Internal/External
  220. *
  221. * </ini>
  222. */
  223. #define CFG_DOT11P_MODE CFG_INI_UINT( \
  224. "gDot11PMode", \
  225. CFG_11P_DISABLED, \
  226. CFG_11P_CONCURRENT, \
  227. CFG_11P_DISABLED, \
  228. CFG_VALUE_OR_DEFAULT, \
  229. "802.11p mode")
  230. /*
  231. * <ini>
  232. * gEnable_go_cts2self_for_sta - Indicate firmware to stop NOA and
  233. * start using cts2self
  234. * @Min: 0
  235. * @Max: 1
  236. * @Default: 0
  237. *
  238. * When gEnable_go_cts2self_for_sta is enabled then if a legacy
  239. * client connects to P2P GO, Host will send a WMI VDEV command
  240. * to FW to stop using NOA for P2P GO
  241. * and start using CTS2SELF.
  242. *
  243. *
  244. * Supported Feature: P2P
  245. *
  246. *
  247. * Usage: Internal/External
  248. *
  249. * </ini>
  250. */
  251. #define CFG_ENABLE_GO_CTS2SELF_FOR_STA CFG_INI_BOOL( \
  252. "gEnable_go_cts2self_for_sta", \
  253. 0, \
  254. "firmware to stop NOA and start using cts2self")
  255. /*
  256. * <ini>
  257. * g_qcn_ie_support - QCN IE support
  258. * @Min: 0 (disabled)
  259. * @Max: 1 (enabled)
  260. * @Default: 1 (enabled)
  261. *
  262. * This config item is used to support QCN IE in probe/assoc/reassoc request
  263. * for STA mode. QCN IE support is not added for SAP mode.
  264. *
  265. * Related: N/A
  266. *
  267. * Supported Feature: N/A
  268. *
  269. * Usage: Internal/External
  270. *
  271. * </ini>
  272. */
  273. #define CFG_QCN_IE_SUPPORT CFG_INI_BOOL( \
  274. "g_qcn_ie_support", \
  275. 1, \
  276. "QCN IE support")
  277. /*
  278. * <ini>
  279. * g_fils_max_chan_guard_time - Set maximum channel guard time(ms)
  280. * @Min: 0
  281. * @Max: 10
  282. * @Default: 0
  283. *
  284. * This ini is used to set maximum channel guard time in milliseconds.
  285. *
  286. * Related: None
  287. *
  288. * Supported Feature: FILS
  289. *
  290. * Usage: External
  291. *
  292. * </ini>
  293. */
  294. #define CFG_FILS_MAX_CHAN_GUARD_TIME CFG_INI_UINT( \
  295. "g_fils_max_chan_guard_time", \
  296. 0, \
  297. 10, \
  298. 0, \
  299. CFG_VALUE_OR_DEFAULT, \
  300. "Set maximum channel guard time")
  301. /*
  302. * <ini>
  303. * SingleTIDRC - Set replay counter for all TID's
  304. * @Min: 0 Separate replay counter for all TID
  305. * @Max: 1 Single replay counter for all TID
  306. * @Default: 1
  307. *
  308. * This ini is used to set replay counter for all TID's
  309. *
  310. * 0 - Separate replay counter for all TID
  311. * 1 - Single replay counter for all TID
  312. *
  313. * Related: None.
  314. *
  315. * Supported Feature: WMM
  316. *
  317. * Usage: Internal/External
  318. *
  319. * </ini>
  320. */
  321. #define CFG_SINGLE_TID_RC CFG_INI_BOOL( \
  322. "SingleTIDRC", \
  323. 1, \
  324. "replay counter for all TID")
  325. /*
  326. * wait_cnf_timeout - Wait assoc cnf timeout
  327. * @Min: 10
  328. * @Max: 3000
  329. * @Default: 1000
  330. *
  331. * This is internal configure for waiting assoc cnf timeout
  332. *
  333. * Related: None
  334. *
  335. * Usage: Internal
  336. *
  337. */
  338. #define CFG_WT_CNF_TIMEOUT CFG_UINT( \
  339. "wait_cnf_timeout", \
  340. 10, \
  341. 3000, \
  342. 1000, \
  343. CFG_VALUE_OR_DEFAULT, \
  344. "Wait confirm timeout")
  345. /*
  346. * <ini>
  347. * gStaMiracastMccRestTimeVal - Rest time when Miracast is running.
  348. * @Min: 100
  349. * @Max: 500
  350. * @Default: 400
  351. *
  352. * This ini is used to set rest time for home channel for Miracast before
  353. * going for scan.
  354. *
  355. * Related: None.
  356. *
  357. * Supported Feature: Concurrency
  358. *
  359. * Usage: Internal/External
  360. *
  361. * </ini>
  362. */
  363. #define CFG_STA_MCAST_MCC_REST_TIME CFG_INI_UINT( \
  364. "gStaMiracastMccRestTimeVal", \
  365. 100, \
  366. 500, \
  367. 400, \
  368. CFG_VALUE_OR_DEFAULT, \
  369. "Rest time when Miracast is running")
  370. /*
  371. * current_rssi - current rssi
  372. * @Min: 0
  373. * @Max: 127
  374. * @Default: 0
  375. *
  376. * This is internal configure for current rssi
  377. *
  378. * Related: None
  379. *
  380. * Usage: Internal
  381. *
  382. */
  383. #define CFG_CURRENT_RSSI CFG_UINT( \
  384. "current_rssi", \
  385. 0, \
  386. 127, \
  387. 0, \
  388. CFG_VALUE_OR_DEFAULT, \
  389. "Current RSSI")
  390. /*
  391. * <ini>
  392. * gAllowTPCfromAP - Support for AP power constraint
  393. * @Min: 0
  394. * @Max: 1
  395. * @Default: 1
  396. *
  397. * This ini controls driver to honor/dishonor power constraint from AP.
  398. *
  399. * Related: None.
  400. *
  401. * Supported Feature: Concurrency
  402. *
  403. * Usage: Internal/External
  404. *
  405. * </ini>
  406. */
  407. #define CFG_TX_POWER_CTRL CFG_INI_BOOL( \
  408. "gAllowTPCfromAP", \
  409. 1, \
  410. "Support for AP power constraint")
  411. /*
  412. * <ini>
  413. * gStaKeepAliveMethod - Which keepalive method to use
  414. * @Min: 0
  415. * @Max: 1
  416. * @Default: 1
  417. *
  418. * This ini determines which keepalive method to use for station interfaces
  419. * 1) Use null data packets
  420. * 2) Use gratuitous ARP packets
  421. *
  422. * Related: gStaKeepAlivePeriod, gApKeepAlivePeriod, gGoKeepAlivePeriod
  423. *
  424. * Supported Feature: STA, Keepalive
  425. *
  426. * Usage: External
  427. *
  428. * </ini>
  429. */
  430. #define CFG_STA_KEEPALIVE_METHOD CFG_INI_INT( \
  431. "gStaKeepAliveMethod", \
  432. MLME_STA_KEEPALIVE_NULL_DATA, \
  433. MLME_STA_KEEPALIVE_COUNT - 1, \
  434. MLME_STA_KEEPALIVE_GRAT_ARP, \
  435. CFG_VALUE_OR_DEFAULT, \
  436. "Which keepalive method to use")
  437. /*
  438. * <ini>
  439. * gMaxLIModulatedDTIM - Set MaxLIModulate Dtim
  440. * @Min: 1
  441. * @Max: 10
  442. * @Default: 5
  443. *
  444. * This ini is used to set default MaxLIModulatedDTIM
  445. *
  446. * Related: None
  447. *
  448. * Supported Feature: STA
  449. *
  450. * Usage: Internal/External
  451. *
  452. * </ini>
  453. */
  454. #define CFG_MAX_LI_MODULATED_DTIM CFG_INI_UINT( \
  455. "gMaxLIModulatedDTIM", \
  456. 1, \
  457. 10, \
  458. 5, \
  459. CFG_VALUE_OR_DEFAULT, \
  460. "Max modulated dtim")
  461. #define CFG_STA_ALL \
  462. CFG(CFG_INFRA_STA_KEEP_ALIVE_PERIOD) \
  463. CFG(CFG_TGT_GTX_USR_CFG) \
  464. CFG(CFG_PMKID_MODES) \
  465. CFG(CFG_IGNORE_PEER_ERP_INFO) \
  466. CFG(CFG_STA_PREFER_80MHZ_OVER_160MHZ) \
  467. CFG(CFG_PPS_ENABLE_5G_EBT) \
  468. CFG(CFG_ENABLE_DEAUTH_BEFORE_CONNECTION) \
  469. CFG(CFG_DOT11P_MODE) \
  470. CFG(CFG_DEAUTH_RETRY_CNT) \
  471. CFG(CFG_ENABLE_GO_CTS2SELF_FOR_STA) \
  472. CFG(CFG_QCN_IE_SUPPORT) \
  473. CFG(CFG_STA_MCAST_MCC_REST_TIME) \
  474. CFG(CFG_FILS_MAX_CHAN_GUARD_TIME) \
  475. CFG(CFG_SINGLE_TID_RC) \
  476. CFG(CFG_STA_KEEPALIVE_METHOD) \
  477. CFG(CFG_WT_CNF_TIMEOUT) \
  478. CFG(CFG_CURRENT_RSSI) \
  479. CFG(CFG_TX_POWER_CTRL)
  480. #endif /* CFG_MLME_STA_H__ */