cfg_mlme_chainmask.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. /*
  2. * Copyright (c) 2012-2019 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 centralized definitions of converged configuration.
  20. */
  21. #ifndef __CFG_CHAINMASK_H
  22. #define __CFG_CHAINMASK_H
  23. /*
  24. * <ini>
  25. * gSetTxChainmask1x1 - Sets Transmit chain mask.
  26. * @Min: 1
  27. * @Max: 3
  28. * @Default: 0
  29. *
  30. * This ini Sets Transmit chain mask.
  31. *
  32. * If gEnable2x2 is disabled, gSetTxChainmask1x1 and gSetRxChainmask1x1 values
  33. * are taken into account. If chainmask value exceeds the maximum number of
  34. * chains supported by target, the max number of chains is used. By default,
  35. * chain0 is selected for both Tx and Rx.
  36. * gSetTxChainmask1x1=1 or gSetRxChainmask1x1=1 to select chain0.
  37. * gSetTxChainmask1x1=2 or gSetRxChainmask1x1=2 to select chain1.
  38. * gSetTxChainmask1x1=3 or gSetRxChainmask1x1=3 to select both chains.
  39. *
  40. * Supported Feature: 11AC
  41. *
  42. * Usage: External
  43. *
  44. * </ini>
  45. */
  46. #define CFG_VHT_ENABLE_1x1_TX_CHAINMASK CFG_INI_UINT( \
  47. "gSetTxChainmask1x1", \
  48. 0, \
  49. 3, \
  50. 0, \
  51. CFG_VALUE_OR_DEFAULT, \
  52. "1x1 VHT Tx Chainmask")
  53. /*
  54. * <ini>
  55. * gSetRxChainmask1x1 - Sets Receive chain mask.
  56. * @Min: 1
  57. * @Max: 3
  58. * @Default: 0
  59. *
  60. * This ini is used to set Receive chain mask.
  61. *
  62. * If gEnable2x2 is disabled, gSetTxChainmask1x1 and gSetRxChainmask1x1 values
  63. * are taken into account. If chainmask value exceeds the maximum number of
  64. * chains supported by target, the max number of chains is used. By default,
  65. * chain0 is selected for both Tx and Rx.
  66. * gSetTxChainmask1x1=1 or gSetRxChainmask1x1=1 to select chain0.
  67. * gSetTxChainmask1x1=2 or gSetRxChainmask1x1=2 to select chain1.
  68. * gSetTxChainmask1x1=3 or gSetRxChainmask1x1=3 to select both chains.
  69. *
  70. * Supported Feature: 11AC
  71. *
  72. * Usage: External
  73. *
  74. * </ini>
  75. */
  76. #define CFG_VHT_ENABLE_1x1_RX_CHAINMASK CFG_INI_UINT( \
  77. "gSetRxChainmask1x1", \
  78. 0, \
  79. 3, \
  80. 0, \
  81. CFG_VALUE_OR_DEFAULT, \
  82. "1x1 VHT Rx Chainmask")
  83. /*
  84. * <ini>
  85. * gCckChainMaskEnable - Used to enable/disable Cck ChainMask
  86. * @Min: 0
  87. * @Max: 1
  88. * @Default: 0
  89. *
  90. * This ini is used to set default Cck ChainMask
  91. * 0: disable the cck tx chain mask (default)
  92. * 1: enable the cck tx chain mask
  93. *
  94. * Related: None
  95. *
  96. * Supported Feature: STA
  97. *
  98. * Usage: Internal/External
  99. *
  100. * </ini>
  101. */
  102. #define CFG_TX_CHAIN_MASK_CCK CFG_INI_BOOL( \
  103. "gCckChainMaskEnable", \
  104. 0, \
  105. "Set default CCK Tx Chainmask")
  106. /*
  107. * <ini>
  108. * gTxChainMask1ss - Enables/disables tx chain mask1ss, used by Rome
  109. * @Min: 0
  110. * @Max: 3
  111. * @Default: 0
  112. *
  113. * This ini is used to set default tx chain mask for 1ss
  114. *
  115. * gTxChainMask1ss=0 : 1ss data tx chain mask set to 3 and self gen chain mask
  116. * set to 3. This is default setting of fw side. For 1x1 case, WIFI will
  117. * using chain0 to sent 1ss data and selfgen packets. 2x2 case, WIFI will
  118. * using chain0 and chain1 to sent 1ss data and selfgen packets.
  119. *
  120. * gTxChainMask1ss=1 : 1ss data tx chain mask set to 2 and self gen chain mask
  121. * set to 2. This setting can work only when 2x2 case, WIFI will use chain1
  122. * to sent 1ss data packets and selfgen packets, this can improve BTC
  123. * performance a little, but have side affect when chain0 and chain1 RSSI
  124. * is unbalance or green AP is enabled. So we recommend not using it.
  125. *
  126. * gTxChainMask1ss=2 : 1ss data tx chain mask set to 3 and self gen chain mask
  127. * set to 2. This setting never used before.
  128. *
  129. * gTxChainMask1ss=3 : 1ss data tx chain mask set to 2 and self gen chain mask
  130. * set to 3. This setting never used before.
  131. *
  132. * Related: None
  133. *
  134. * Supported Feature: STA/SAP
  135. *
  136. * Usage: Internal/External
  137. *
  138. * </ini>
  139. */
  140. #define CFG_TX_CHAIN_MASK_1SS CFG_INI_UINT( \
  141. "gTxChainMask1ss", \
  142. 0, \
  143. 3, \
  144. 0, \
  145. CFG_VALUE_OR_DEFAULT, \
  146. "1SS Tx Chainmask")
  147. /*
  148. * <ini>
  149. * g11bNumTxChains - Number of Tx Chanins in 11b mode
  150. * @Min: 0
  151. * @Max: 2
  152. * @Default: 0
  153. *
  154. * Number of Tx Chanins in 11b mode
  155. *
  156. *
  157. * Related: None
  158. *
  159. * Supported Feature: connection
  160. *
  161. * Usage: External
  162. *
  163. * </ini>
  164. */
  165. #define CFG_11B_NUM_TX_CHAIN CFG_INI_UINT( \
  166. "g11bNumTxChains", \
  167. 0, \
  168. 2, \
  169. 0, \
  170. CFG_VALUE_OR_DEFAULT, \
  171. "11b Num Tx chains")
  172. /*
  173. * <ini>
  174. * g11agNumTxChains - Number of Tx Chanins in 11ag mode
  175. * @Min: 0
  176. * @Max: 2
  177. * @Default: 0
  178. *
  179. * Number of Tx Chanins in 11ag mode
  180. *
  181. *
  182. * Related: None
  183. *
  184. * Supported Feature: connection
  185. *
  186. * Usage: External
  187. *
  188. * </ini>
  189. */
  190. #define CFG_11AG_NUM_TX_CHAIN CFG_INI_UINT( \
  191. "g11agNumTxChains", \
  192. 0, \
  193. 2, \
  194. 0, \
  195. CFG_VALUE_OR_DEFAULT, \
  196. "11ag Num Tx chains")
  197. /*
  198. * <ini>
  199. * tx_chain_mask_2g - tx chain mask for 2g
  200. * @Min: 0
  201. * @Max: 3
  202. * @Default: 0
  203. *
  204. * This ini will set tx chain mask for 2g. To use the ini, make sure:
  205. * gSetTxChainmask1x1/gSetRxChainmask1x1 = 0,
  206. * gDualMacFeatureDisable = 1
  207. * gEnable2x2 = 0
  208. *
  209. * tx_chain_mask_2g=0 : don't care
  210. * tx_chain_mask_2g=1 : for 2g tx use chain 0
  211. * tx_chain_mask_2g=2 : for 2g tx use chain 1
  212. * tx_chain_mask_2g=3 : for 2g tx can use either chain
  213. *
  214. * Related: None
  215. *
  216. * Supported Feature: All profiles
  217. *
  218. * Usage: External
  219. *
  220. * </ini>
  221. */
  222. #define CFG_TX_CHAIN_MASK_2G CFG_INI_UINT( \
  223. "tx_chain_mask_2g", \
  224. 0, \
  225. 3, \
  226. 0, \
  227. CFG_VALUE_OR_DEFAULT, \
  228. "2.4G Tx Chainmask")
  229. /*
  230. * <ini>
  231. * rx_chain_mask_2g - rx chain mask for 2g
  232. * @Min: 0
  233. * @Max: 3
  234. * @Default: 0
  235. *
  236. * This ini will set rx chain mask for 2g. To use the ini, make sure:
  237. * gSetTxChainmask1x1/gSetRxChainmask1x1 = 0,
  238. * gDualMacFeatureDisable = 1
  239. * gEnable2x2 = 0
  240. *
  241. * rx_chain_mask_2g=0 : don't care
  242. * rx_chain_mask_2g=1 : for 2g rx use chain 0
  243. * rx_chain_mask_2g=2 : for 2g rx use chain 1
  244. * rx_chain_mask_2g=3 : for 2g rx can use either chain
  245. *
  246. * Related: None
  247. *
  248. * Supported Feature: All profiles
  249. *
  250. * Usage: External
  251. *
  252. * </ini>
  253. */
  254. #define CFG_RX_CHAIN_MASK_2G CFG_INI_UINT( \
  255. "rx_chain_mask_2g", \
  256. 0, \
  257. 3, \
  258. 0, \
  259. CFG_VALUE_OR_DEFAULT, \
  260. "2.4G Rx Chainmask")
  261. /*
  262. * <ini>
  263. * tx_chain_mask_5g - tx chain mask for 5g
  264. * @Min: 0
  265. * @Max: 3
  266. * @Default: 0
  267. *
  268. * This ini will set tx chain mask for 5g. To use the ini, make sure:
  269. * gSetTxChainmask1x1/gSetRxChainmask1x1 = 0,
  270. * gDualMacFeatureDisable = 1
  271. * gEnable2x2 = 0
  272. *
  273. * tx_chain_mask_5g=0 : don't care
  274. * tx_chain_mask_5g=1 : for 5g tx use chain 0
  275. * tx_chain_mask_5g=2 : for 5g tx use chain 1
  276. * tx_chain_mask_5g=3 : for 5g tx can use either chain
  277. *
  278. * Related: None
  279. *
  280. * Supported Feature: All profiles
  281. *
  282. * Usage: External
  283. *
  284. * </ini>
  285. */
  286. #define CFG_TX_CHAIN_MASK_5G CFG_INI_UINT( \
  287. "tx_chain_mask_5g", \
  288. 0, \
  289. 3, \
  290. 0, \
  291. CFG_VALUE_OR_DEFAULT, \
  292. "5Ghz Tx Chainmask")
  293. /*
  294. * <ini>
  295. * rx_chain_mask_5g - rx chain mask for 5g
  296. * @Min: 0
  297. * @Max: 3
  298. * @Default: 0
  299. *
  300. * This ini will set rx chain mask for 5g. To use the ini, make sure:
  301. * gSetTxChainmask1x1/gSetRxChainmask1x1 = 0,
  302. * gDualMacFeatureDisable = 1
  303. * gEnable2x2 = 0
  304. *
  305. * rx_chain_mask_5g=0 : don't care
  306. * rx_chain_mask_5g=1 : for 5g rx use chain 0
  307. * rx_chain_mask_5g=2 : for 5g rx use chain 1
  308. * rx_chain_mask_5g=3 : for 5g rx can use either chain
  309. *
  310. * Related: None
  311. *
  312. * Supported Feature: All profiles
  313. *
  314. * Usage: External
  315. *
  316. * </ini>
  317. */
  318. #define CFG_RX_CHAIN_MASK_5G CFG_INI_UINT( \
  319. "rx_chain_mask_5g", \
  320. 0, \
  321. 3, \
  322. 0, \
  323. CFG_VALUE_OR_DEFAULT, \
  324. "5Ghz Tx Chainmask")
  325. /*
  326. * <ini>
  327. * enable_bt_chain_separation - Enables/disables bt /wlan chainmask assignment
  328. * @Min: 0
  329. * @Max: 1
  330. * @Default: 0
  331. *
  332. * This ini disables/enables chainmask setting on 2x2, mainly used for ROME
  333. * BT/WLAN chainmask assignment.
  334. *
  335. * 0, Disable
  336. * 1, Enable
  337. *
  338. * Related: NA
  339. *
  340. * Supported Feature: 11n/11ac
  341. *
  342. * Usage: External
  343. *
  344. * </ini>
  345. */
  346. #define CFG_ENABLE_BT_CHAIN_SEPARATION CFG_INI_BOOL( \
  347. "enableBTChainSeparation", \
  348. 0, \
  349. "Enable/disable BT chainmask assignment")
  350. #define CFG_CHAINMASK_ALL \
  351. CFG(CFG_VHT_ENABLE_1x1_TX_CHAINMASK) \
  352. CFG(CFG_VHT_ENABLE_1x1_RX_CHAINMASK) \
  353. CFG(CFG_TX_CHAIN_MASK_CCK) \
  354. CFG(CFG_TX_CHAIN_MASK_1SS) \
  355. CFG(CFG_11B_NUM_TX_CHAIN) \
  356. CFG(CFG_11AG_NUM_TX_CHAIN) \
  357. CFG(CFG_TX_CHAIN_MASK_2G) \
  358. CFG(CFG_RX_CHAIN_MASK_2G) \
  359. CFG(CFG_TX_CHAIN_MASK_5G) \
  360. CFG(CFG_RX_CHAIN_MASK_5G) \
  361. CFG(CFG_ENABLE_BT_CHAIN_SEPARATION)
  362. #endif /* __CFG_CHAINMASK_H */