cfg_mlme_rates.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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_MLME_RATES_H
  22. #define __CFG_MLME_RATES_H
  23. #define CFG_SUPPORTED_RATES_11B_LEN 4
  24. #define CFG_SUPPORTED_RATES_11A_LEN 8
  25. #define CFG_OPERATIONAL_RATE_SET_LEN 12
  26. #define CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN 8
  27. #define CFG_SUPPORTED_MCS_SET_LEN 16
  28. #define CFG_BASIC_MCS_SET_LEN 16
  29. #define CFG_CURRENT_MCS_SET_LEN 16
  30. /*
  31. * <ini>
  32. * gMaxHTMCSForTxData - max HT mcs for TX
  33. * @Min: 0
  34. * @Max: 383
  35. * @Default: 0
  36. *
  37. * This ini is used to configure the max HT mcs
  38. * for tx data.
  39. *
  40. * Usage: External
  41. *
  42. * bits 0-15: max HT mcs
  43. * bits 16-31: zero to disable, otherwise enable.
  44. *
  45. * </ini>
  46. */
  47. #define CFG_MAX_HT_MCS_FOR_TX_DATA CFG_INI_UINT( \
  48. "gMaxHTMCSForTxData", \
  49. 0, \
  50. 0x17f, \
  51. 0, \
  52. CFG_VALUE_OR_DEFAULT, \
  53. "Max HT Mcs for Tx Data")
  54. /*
  55. * <ini>
  56. * gDisableABGRateForTxData - disable abg rate for tx data
  57. * @Min: 0
  58. * @Max: 1
  59. * @Default: 0
  60. *
  61. * This ini is used to disable abg rate for tx data.
  62. *
  63. * Usage: External
  64. *
  65. * </ini>
  66. */
  67. #define CFG_DISABLE_ABG_RATE_FOR_TX_DATA CFG_INI_BOOL( \
  68. "gDisableABGRateForTxData", \
  69. 0, \
  70. "Disable ABG RATE for TX Data")
  71. /*
  72. * <ini>
  73. * gSapMaxMCSForTxData - sap 11n max mcs
  74. * @Min: 0
  75. * @Max: 383
  76. * @Default: 0
  77. *
  78. * This ini configure SAP 11n max mcs
  79. *
  80. * Usage: External
  81. *
  82. * </ini>
  83. */
  84. #define CFG_SAP_MAX_MCS_FOR_TX_DATA CFG_INI_UINT( \
  85. "gSapMaxMCSForTxData", \
  86. 0, \
  87. 383, \
  88. 0, \
  89. CFG_VALUE_OR_DEFAULT, \
  90. "SAP Max MCS for TX Data")
  91. /*
  92. * <ini>
  93. * disable_high_ht_mcs_2x2 - disable high mcs index for 2nd stream in 2.4G
  94. * @Min: 0
  95. * @Max: 8
  96. * @Default: 0
  97. *
  98. * This ini is used to disable high HT MCS index for 2.4G STA connection.
  99. * It has been introduced to resolve IOT issue with one of the vendor.
  100. *
  101. * Note: This INI is not useful with 1x1 setting. If some platform supports
  102. * only 1x1 then this INI is not useful.
  103. *
  104. * 0 - It won't disable any HT MCS index (just like normal HT MCS)
  105. * 1 - It will disable 15th bit from HT RX MCS set (from 8-15 bits slot)
  106. * 2 - It will disable 14th & 15th bits from HT RX MCS set
  107. * 3 - It will disable 13th, 14th, & 15th bits from HT RX MCS set
  108. * and so on.
  109. *
  110. * Related: STA
  111. *
  112. * Supported Feature: 11n
  113. *
  114. * Usage: External
  115. */
  116. #define CFG_DISABLE_HIGH_HT_RX_MCS_2x2 CFG_INI_UINT( \
  117. "disable_high_ht_mcs_2x2", \
  118. 0, \
  119. 8, \
  120. 0, \
  121. CFG_VALUE_OR_DEFAULT, \
  122. "Disable high MCS index for 2x2")
  123. #define CFG_CFP_PERIOD CFG_UINT( \
  124. "cfpPeriod", \
  125. 0, \
  126. 255, \
  127. 1, \
  128. CFG_VALUE_OR_DEFAULT, \
  129. "CFP Period")
  130. #define CFG_CFP_MAX_DURATION CFG_UINT( \
  131. "cfpMaxDuration", \
  132. 0, \
  133. 65535, \
  134. 30000, \
  135. CFG_VALUE_OR_DEFAULT, \
  136. "CFP Max Duration")
  137. /*
  138. * <cfg>
  139. * supported_rates_11b - supported rates for 11b
  140. * @Min: 0 minimum length of supported rates
  141. * @Max: default data length of supported rates in string format
  142. * @Default: 2, 4, 11, 22
  143. */
  144. #define CFG_SUPPORTED_RATES_11B_DATA "2, 4, 11, 22"
  145. #define CFG_SUPPORTED_RATES_11B CFG_STRING( \
  146. "supported_rates_11b", \
  147. 0, \
  148. sizeof(CFG_SUPPORTED_RATES_11B_DATA) - 1, \
  149. CFG_SUPPORTED_RATES_11B_DATA, \
  150. "Supported rates for 11B")
  151. /*
  152. * <cfg>
  153. * supported_rates_11a - supported rates for 11a
  154. * @Min: 0 minimum length of supported rates
  155. * @Max: default data length of supported rates in string format
  156. * @Default: 12, 18, 24, 36, 48, 72, 96, 108
  157. */
  158. #define CFG_SUPPORTED_RATES_11A_DATA "12, 18, 24, 36, 48, 72, 96, 108"
  159. #define CFG_SUPPORTED_RATES_11A CFG_STRING( \
  160. "supported_rates_11a", \
  161. 0, \
  162. sizeof(CFG_SUPPORTED_RATES_11A_DATA) - 1, \
  163. CFG_SUPPORTED_RATES_11A_DATA, \
  164. "Supported rates for 11A")
  165. /*
  166. * <cfg>
  167. * supported_mcs_set - supported MCS set data
  168. * @Min: 0 minimum length of supported MCS set
  169. * @Max: default data length of supported mcs set in string format
  170. * @Default: 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  171. * 0x0, 0x0, 0x0
  172. */
  173. #define CFG_SUPPORTED_MCS_SET_DATA "0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0"
  174. #define CFG_SUPPORTED_MCS_SET CFG_STRING( \
  175. "supported_mcs_set", \
  176. 0, \
  177. sizeof(CFG_SUPPORTED_MCS_SET_DATA) - 1, \
  178. CFG_SUPPORTED_MCS_SET_DATA, \
  179. "supported MCS set")
  180. /*
  181. * <cfg>
  182. * basic_mcs_set - basic MCS set data
  183. * @Min: 0 minimum length of basic MCS set
  184. * @Max: default data length of basic mcs set in string format
  185. * @Default: 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  186. * 0x0, 0x0, 0x0
  187. */
  188. #define CFG_BASIC_MCS_SET_DATA "0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0"
  189. #define CFG_BASIC_MCS_SET CFG_STRING( \
  190. "basic_mcs_set", \
  191. 0, \
  192. sizeof(CFG_BASIC_MCS_SET_DATA) - 1, \
  193. CFG_BASIC_MCS_SET_DATA, \
  194. "basic MCS set")
  195. /*
  196. * <cfg>
  197. * current_mcs_set - current MCS set data
  198. * @Min: 0 minimum length of current MCS set
  199. * @Max: default data length of current mcs set in string format
  200. * @Default: 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
  201. * 0x0, 0x0, 0x0
  202. */
  203. #define CFG_CURRENT_MCS_SET_DATA "0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0"
  204. #define CFG_CURRENT_MCS_SET CFG_STRING( \
  205. "current_mcs_set", \
  206. 0, \
  207. sizeof(CFG_CURRENT_MCS_SET_DATA) - 1, \
  208. CFG_CURRENT_MCS_SET_DATA, \
  209. "current MCS set")
  210. #define CFG_RATES_ALL \
  211. CFG(CFG_MAX_HT_MCS_FOR_TX_DATA) \
  212. CFG(CFG_DISABLE_ABG_RATE_FOR_TX_DATA) \
  213. CFG(CFG_SAP_MAX_MCS_FOR_TX_DATA) \
  214. CFG(CFG_DISABLE_HIGH_HT_RX_MCS_2x2) \
  215. CFG(CFG_CFP_PERIOD) \
  216. CFG(CFG_CFP_MAX_DURATION) \
  217. CFG(CFG_SUPPORTED_RATES_11B) \
  218. CFG(CFG_SUPPORTED_RATES_11A) \
  219. CFG(CFG_SUPPORTED_MCS_SET) \
  220. CFG(CFG_BASIC_MCS_SET) \
  221. CFG(CFG_CURRENT_MCS_SET)
  222. #endif /* __CFG_MLME_RATES_H */