cfg_mlme_rates.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. /*
  2. * Copyright (c) 2012-2020 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
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: This file contains centralized definitions of converged configuration.
  21. */
  22. #ifndef __CFG_MLME_RATES_H
  23. #define __CFG_MLME_RATES_H
  24. #define CFG_SUPPORTED_RATES_11B_LEN 4
  25. #define CFG_SUPPORTED_RATES_11A_LEN 8
  26. #define CFG_OPERATIONAL_RATE_SET_LEN 12
  27. #define CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN 8
  28. #define CFG_SUPPORTED_MCS_SET_LEN 16
  29. #define CFG_BASIC_MCS_SET_LEN 16
  30. #define CFG_CURRENT_MCS_SET_LEN 16
  31. #define CFG_MLME_RATE_MASK_LEN 4
  32. /*
  33. * <ini>
  34. * gMaxHTMCSForTxData - max HT mcs for TX
  35. * @Min: 0
  36. * @Max: 383
  37. * @Default: 0
  38. *
  39. * This ini is used to configure the max HT mcs
  40. * for tx data.
  41. *
  42. * Usage: External
  43. *
  44. * bits 0-15: max HT mcs
  45. * bits 16-31: zero to disable, otherwise enable.
  46. *
  47. * </ini>
  48. */
  49. #define CFG_MAX_HT_MCS_FOR_TX_DATA CFG_INI_UINT( \
  50. "gMaxHTMCSForTxData", \
  51. 0, \
  52. 0x17f, \
  53. 0, \
  54. CFG_VALUE_OR_DEFAULT, \
  55. "Max HT Mcs for Tx Data")
  56. /*
  57. * <ini>
  58. * gDisableABGRateForTxData - disable abg rate for tx data
  59. * @Min: 0
  60. * @Max: 1
  61. * @Default: 0
  62. *
  63. * This ini is used to disable abg rate for tx data.
  64. *
  65. * Usage: External
  66. *
  67. * </ini>
  68. */
  69. #define CFG_DISABLE_ABG_RATE_FOR_TX_DATA CFG_INI_BOOL( \
  70. "gDisableABGRateForTxData", \
  71. 0, \
  72. "Disable ABG RATE for TX Data")
  73. /*
  74. * <ini>
  75. * gSapMaxMCSForTxData - sap 11n max mcs
  76. * @Min: 0
  77. * @Max: 383
  78. * @Default: 0
  79. *
  80. * This ini configure SAP 11n max mcs
  81. *
  82. * Usage: External
  83. *
  84. * </ini>
  85. */
  86. #define CFG_SAP_MAX_MCS_FOR_TX_DATA CFG_INI_UINT( \
  87. "gSapMaxMCSForTxData", \
  88. 0, \
  89. 383, \
  90. 0, \
  91. CFG_VALUE_OR_DEFAULT, \
  92. "SAP Max MCS for TX Data")
  93. /*
  94. * <ini>
  95. * disable_high_ht_mcs_2x2 - disable high mcs index for 2nd stream in 2.4G
  96. * @Min: 0
  97. * @Max: 8
  98. * @Default: 0
  99. *
  100. * This ini is used to disable high HT MCS index for 2.4G STA connection.
  101. * It has been introduced to resolve IOT issue with one of the vendor.
  102. *
  103. * Note: This INI is not useful with 1x1 setting. If some platform supports
  104. * only 1x1 then this INI is not useful.
  105. *
  106. * 0 - It won't disable any HT MCS index (just like normal HT MCS)
  107. * 1 - It will disable 15th bit from HT RX MCS set (from 8-15 bits slot)
  108. * 2 - It will disable 14th & 15th bits from HT RX MCS set
  109. * 3 - It will disable 13th, 14th, & 15th bits from HT RX MCS set
  110. * and so on.
  111. *
  112. * Related: STA
  113. *
  114. * Supported Feature: 11n
  115. *
  116. * Usage: External
  117. */
  118. #define CFG_DISABLE_HIGH_HT_RX_MCS_2x2 CFG_INI_UINT( \
  119. "disable_high_ht_mcs_2x2", \
  120. 0, \
  121. 8, \
  122. 0, \
  123. CFG_VALUE_OR_DEFAULT, \
  124. "Disable high MCS index for 2x2")
  125. #define CFG_CFP_PERIOD CFG_UINT( \
  126. "cfpPeriod", \
  127. 0, \
  128. 255, \
  129. 1, \
  130. CFG_VALUE_OR_DEFAULT, \
  131. "CFP Period")
  132. #define CFG_CFP_MAX_DURATION CFG_UINT( \
  133. "cfpMaxDuration", \
  134. 0, \
  135. 65535, \
  136. 30000, \
  137. CFG_VALUE_OR_DEFAULT, \
  138. "CFP Max Duration")
  139. /*
  140. * <cfg>
  141. * supported_rates_11b - supported rates for 11b
  142. * @Min: 0 minimum length of supported rates
  143. * @Max: default data length of supported rates in string format
  144. * @Default: 2, 4, 11, 22
  145. */
  146. #define CFG_SUPPORTED_RATES_11B_DATA "2, 4, 11, 22"
  147. #define CFG_SUPPORTED_RATES_11B CFG_STRING( \
  148. "supported_rates_11b", \
  149. 0, \
  150. sizeof(CFG_SUPPORTED_RATES_11B_DATA) - 1, \
  151. CFG_SUPPORTED_RATES_11B_DATA, \
  152. "Supported rates for 11B")
  153. /*
  154. * <cfg>
  155. * supported_rates_11a - supported rates for 11a
  156. * @Min: 0 minimum length of supported rates
  157. * @Max: default data length of supported rates in string format
  158. * @Default: 12, 18, 24, 36, 48, 72, 96, 108
  159. */
  160. #define CFG_SUPPORTED_RATES_11A_DATA "12, 18, 24, 36, 48, 72, 96, 108"
  161. #define CFG_SUPPORTED_RATES_11A CFG_STRING( \
  162. "supported_rates_11a", \
  163. 0, \
  164. sizeof(CFG_SUPPORTED_RATES_11A_DATA) - 1, \
  165. CFG_SUPPORTED_RATES_11A_DATA, \
  166. "Supported rates for 11A")
  167. /*
  168. * <cfg>
  169. * supported_mcs_set - supported MCS set data
  170. * @Min: 0 minimum length of supported MCS set
  171. * @Max: default data length of supported mcs set in string format
  172. * @Default: 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  173. * 0x0, 0x0, 0x0
  174. */
  175. #define CFG_SUPPORTED_MCS_SET_DATA "0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0"
  176. #define CFG_SUPPORTED_MCS_SET CFG_STRING( \
  177. "supported_mcs_set", \
  178. 0, \
  179. sizeof(CFG_SUPPORTED_MCS_SET_DATA) - 1, \
  180. CFG_SUPPORTED_MCS_SET_DATA, \
  181. "supported MCS set")
  182. /*
  183. * <cfg>
  184. * basic_mcs_set - basic MCS set data
  185. * @Min: 0 minimum length of basic MCS set
  186. * @Max: default data length of basic mcs set in string format
  187. * @Default: 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  188. * 0x0, 0x0, 0x0
  189. */
  190. #define CFG_BASIC_MCS_SET_DATA "0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0"
  191. #define CFG_BASIC_MCS_SET CFG_STRING( \
  192. "basic_mcs_set", \
  193. 0, \
  194. sizeof(CFG_BASIC_MCS_SET_DATA) - 1, \
  195. CFG_BASIC_MCS_SET_DATA, \
  196. "basic MCS set")
  197. /*
  198. * <cfg>
  199. * current_mcs_set - current MCS set data
  200. * @Min: 0 minimum length of current MCS set
  201. * @Max: default data length of current mcs set in string format
  202. * @Default: 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  203. * 0x0, 0x0, 0x0
  204. */
  205. #define CFG_CURRENT_MCS_SET_DATA "0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0"
  206. #define CFG_CURRENT_MCS_SET CFG_STRING( \
  207. "current_mcs_set", \
  208. 0, \
  209. sizeof(CFG_CURRENT_MCS_SET_DATA) - 1, \
  210. CFG_CURRENT_MCS_SET_DATA, \
  211. "current MCS set")
  212. /*
  213. * <cfg>
  214. * ratemask_type - PHY type for the ratemask.
  215. * @Min: 0 No rate mask set defined - disabled the configuration
  216. * @Max: 4
  217. * @Default: 0
  218. *
  219. * This ini is used to set the PHY type for ratemask in rate selection.
  220. *
  221. * 0 = Disables the configuration
  222. * 1 = The rate mask specified is for CCK/OFDM configuration
  223. * 2 = The rate mask specified is for HT configuration
  224. * 3 = The rate mask specified is for VHT configuration
  225. * 4 = The rate mask specified is for HE/11ax configuration
  226. *
  227. * Related: CFG_RATEMASK_SET
  228. *
  229. * Usage: External
  230. */
  231. #define CFG_RATEMASK_TYPE CFG_INI_UINT( \
  232. "ratemask_type", \
  233. 0, \
  234. 4, \
  235. 0, \
  236. CFG_VALUE_OR_DEFAULT, \
  237. "Ratemask type")
  238. /*
  239. * <cfg>
  240. * ratemask_set - ratemasks for a PHY type used in rate selection
  241. * @Min: default data length of ratemask in string format
  242. * @Max: default data length of ratemask in string format
  243. * @Default: 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 0xFFFFFFFF
  244. *
  245. * This is used to set the rate mask value to be used in rate selection.
  246. * Each of the four words must be configured.
  247. * A bit value of 1 represents rate is enabled
  248. * A bit value of 0 represents rate is disabled
  249. *
  250. * [b31-b0],[b63-b32],[b95-b64],[b127-b96]
  251. * For HE targets, 12 bits correpond to one NSS setting. Ex:
  252. * b0-13 => NSS1, MCS 0-13
  253. * b14-27 => NSS2, MCS 0-13 and so on for other NSS.
  254. * Note that the bit representation is continuous.
  255. *
  256. * For VHT targets, 12 bits correspond to one NSS setting.
  257. * b0-11 => NSS1, MCS 0-11
  258. * b12-23 => NSS2, MCS 0-11 and so on for other NSS.
  259. *
  260. * For HT targets, 8 bits correspond to one NSS setting.
  261. * b0-7 => NSS1, MCS 0-7
  262. * b8-15 => NSS2, MCS 0-7 and so on for other NSS.
  263. *
  264. * For OFDM/CCK targets, 8 bits correspond to one NSS setting.
  265. * Bit position |-b3-|-b2-|-b1-|-b0-|
  266. * Rates in Mbps |-1 -|-2 -|-5.5|-11-| CCK Rates
  267. *
  268. * Bit position |-b11-|-b10-|-b09-|-b08-|-b07-|-b06-|-b05-|-b04-|
  269. * Rates in Mbps |- 9 -|- 18-|-36 -|-54 -|- 6 -|-12 -| -24-|-48- | OFDM Rates
  270. *
  271. * Related: CFG_RATEMASK_TYPE
  272. *
  273. * Usage: External
  274. */
  275. #define CFG_RATEMASK_DATA "0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF"
  276. #define CFG_RATEMASK_SET CFG_INI_STRING( \
  277. "ratemask_set", \
  278. 0, \
  279. sizeof(CFG_RATEMASK_DATA) - 1, \
  280. CFG_RATEMASK_DATA, \
  281. "Ratemasks for rate selection")
  282. #define CFG_RATES_ALL \
  283. CFG(CFG_MAX_HT_MCS_FOR_TX_DATA) \
  284. CFG(CFG_DISABLE_ABG_RATE_FOR_TX_DATA) \
  285. CFG(CFG_SAP_MAX_MCS_FOR_TX_DATA) \
  286. CFG(CFG_DISABLE_HIGH_HT_RX_MCS_2x2) \
  287. CFG(CFG_CFP_PERIOD) \
  288. CFG(CFG_CFP_MAX_DURATION) \
  289. CFG(CFG_SUPPORTED_RATES_11B) \
  290. CFG(CFG_SUPPORTED_RATES_11A) \
  291. CFG(CFG_SUPPORTED_MCS_SET) \
  292. CFG(CFG_BASIC_MCS_SET) \
  293. CFG(CFG_CURRENT_MCS_SET) \
  294. CFG(CFG_RATEMASK_TYPE) \
  295. CFG(CFG_RATEMASK_SET)
  296. #endif /* __CFG_MLME_RATES_H */