cfg_ipa.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. /*
  2. * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022-2023 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 definitions of Data Path configuration.
  21. */
  22. #ifndef _CFG_IPA_H_
  23. #define _CFG_IPA_H_
  24. #include "cfg_define.h"
  25. /* DP INI Declarations */
  26. /*
  27. * IPA Offload configuration - Each bit enables a feature
  28. * bit0 - IPA Enable
  29. * bit1 - IPA Pre filter enable
  30. * bit2 - IPv6 enable
  31. * bit3 - IPA Resource Manager (RM) enable
  32. * bit4 - IPA Clock scaling enable
  33. * bit5 - IPA UC enable
  34. * bit6 - IPA UC STA enable
  35. * bit8 - IPA real time debugging
  36. * bit9 - IPA Optional wifi dp enable
  37. */
  38. /*
  39. * <ini>
  40. * gIPAConfig - IPA configuration
  41. * @Min: 0
  42. * @Max: 0xFFFFFFFF
  43. * @Default: 0
  44. *
  45. * This ini specifies the IPA configuration
  46. *
  47. * Related: N/A
  48. *
  49. * Supported Feature: IPA
  50. *
  51. * Usage: Internal
  52. *
  53. * </ini>
  54. */
  55. #define CFG_DP_IPA_OFFLOAD_CONFIG \
  56. CFG_INI_UINT("gIPAConfig", \
  57. 0, \
  58. 0xFFFFFFFF, \
  59. 0, \
  60. CFG_VALUE_OR_DEFAULT, "IPA offload configuration")
  61. /*
  62. * <ini>
  63. * gIPADescSize - IPA descriptor size
  64. * @Min: 800
  65. * @Max: 8000
  66. * @Default: 800
  67. *
  68. * This ini specifies the IPA descriptor size
  69. *
  70. * Related: N/A
  71. *
  72. * Supported Feature: IPA
  73. *
  74. * Usage: Internal
  75. *
  76. * </ini>
  77. */
  78. #define CFG_DP_IPA_DESC_SIZE \
  79. CFG_INI_UINT("gIPADescSize", \
  80. 800, \
  81. 8000, \
  82. 800, \
  83. CFG_VALUE_OR_DEFAULT, "IPA DESC SIZE")
  84. /*
  85. * <ini>
  86. * gIPAHighBandwidthMbps - IPA high bw threshold
  87. * @Min: 200
  88. * @Max: 4294967295UL
  89. * @Default: 400
  90. *
  91. * This ini specifies the IPA high bw threshold
  92. *
  93. * Related: N/A
  94. *
  95. * Supported Feature: IPA
  96. *
  97. * Usage: Internal
  98. *
  99. * </ini>
  100. */
  101. #define CFG_DP_IPA_HIGH_BANDWIDTH_MBPS \
  102. CFG_INI_UINT("gIPAHighBandwidthMbps", \
  103. 200, \
  104. 4294967295UL, \
  105. 400, \
  106. CFG_VALUE_OR_DEFAULT, "IPA high bw threshold")
  107. /*
  108. * <ini>
  109. * gIPAMediumBandwidthMbps - IPA medium bw threshold
  110. * @Min: 100
  111. * @Max: 4294967295UL
  112. * @Default: 200
  113. *
  114. * This ini specifies the IPA medium bw threshold
  115. *
  116. * Related: N/A
  117. *
  118. * Supported Feature: IPA
  119. *
  120. * Usage: Internal
  121. *
  122. * </ini>
  123. */
  124. #define CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS \
  125. CFG_INI_UINT("gIPAMediumBandwidthMbps", \
  126. 100, \
  127. 4294967295UL, \
  128. 200, \
  129. CFG_VALUE_OR_DEFAULT, "IPA medium bw threshold")
  130. /*
  131. * <ini>
  132. * gIPALowBandwidthMbps - IPA low bw threshold
  133. * @Min: 0
  134. * @Max: 4294967295UL
  135. * @Default: 100
  136. *
  137. * This ini specifies the IPA low bw threshold
  138. *
  139. * Related: N/A
  140. *
  141. * Supported Feature: IPA
  142. *
  143. * Usage: Internal
  144. *
  145. * </ini>
  146. */
  147. #define CFG_DP_IPA_LOW_BANDWIDTH_MBPS \
  148. CFG_INI_UINT("gIPALowBandwidthMbps", \
  149. 0, \
  150. 4294967295UL, \
  151. 100, \
  152. CFG_VALUE_OR_DEFAULT, "IPA low bw threshold")
  153. /*
  154. * <ini>
  155. * gIPAForceVotingEnable - IPA force voting enable
  156. * @Default: false
  157. *
  158. * This ini specifies to enable IPA force voting
  159. *
  160. * Related: N/A
  161. *
  162. * Supported Feature: IPA
  163. *
  164. * Usage: Internal
  165. *
  166. * </ini>
  167. */
  168. #define CFG_DP_IPA_ENABLE_FORCE_VOTING \
  169. CFG_INI_BOOL("gIPAForceVotingEnable", \
  170. false, "Ctrl to enable force voting")
  171. /*
  172. * <ini>
  173. * IpaUcTxBufCount - IPA tx buffer count
  174. * @Min: 0
  175. * @Max: 2048
  176. * @Default: 512
  177. *
  178. * This ini specifies the IPA tx buffer count
  179. *
  180. * Related: N/A
  181. *
  182. * Supported Feature: IPA
  183. *
  184. * Usage: Internal
  185. *
  186. * </ini>
  187. */
  188. #define CFG_DP_IPA_UC_TX_BUF_COUNT \
  189. CFG_INI_UINT("IpaUcTxBufCount", \
  190. 0, \
  191. 2048, \
  192. 512, \
  193. CFG_VALUE_OR_DEFAULT, "IPA tx buffer count")
  194. /*
  195. * <ini>
  196. * gIPAWds - IPA WDS Enable
  197. * @Default: false
  198. *
  199. * This ini specifies to enable WDS for IPA
  200. *
  201. * Related: N/A
  202. *
  203. * Supported Feature: IPA
  204. *
  205. * Usage: Internal
  206. *
  207. * </ini>
  208. */
  209. #define CFG_DP_IPA_WDS_STATUS \
  210. CFG_INI_BOOL("gIPAWds", \
  211. false, "Ctrl to enable WDS for EasyMesh")
  212. /*
  213. * <ini>
  214. * gIPAVlanEnable - IPA vlan support enable
  215. * @Default: false
  216. *
  217. * This ini specifies to enable IPA vlan support
  218. *
  219. * Related: N/A
  220. *
  221. * Supported Feature: IPA
  222. *
  223. * Usage: Internal
  224. *
  225. * </ini>
  226. */
  227. #define CFG_DP_IPA_ENABLE_VLAN_SUPPORT \
  228. CFG_INI_BOOL("gIPAVlanEnable", \
  229. false, "Ctrl to enable vlan support with IPA Offload")
  230. #define CFG_IPA \
  231. CFG(CFG_DP_IPA_OFFLOAD_CONFIG) \
  232. CFG(CFG_DP_IPA_DESC_SIZE) \
  233. CFG(CFG_DP_IPA_HIGH_BANDWIDTH_MBPS) \
  234. CFG(CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS) \
  235. CFG(CFG_DP_IPA_LOW_BANDWIDTH_MBPS) \
  236. CFG(CFG_DP_IPA_ENABLE_FORCE_VOTING) \
  237. CFG(CFG_DP_IPA_UC_TX_BUF_COUNT) \
  238. CFG(CFG_DP_IPA_WDS_STATUS) \
  239. CFG(CFG_DP_IPA_ENABLE_VLAN_SUPPORT)
  240. #endif /* _CFG_IPA_H_ */