cfg_mlme_rates.h 6.3 KB

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