cfg_dp.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. /*
  2. * Copyright (c) 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 definitions of Data Path configuration.
  20. */
  21. #ifndef _CFG_DP_H_
  22. #define _CFG_DP_H_
  23. #include "cfg_define.h"
  24. #define WLAN_CFG_MAX_CLIENTS 64
  25. #define WLAN_CFG_MAX_CLIENTS_MIN 8
  26. #define WLAN_CFG_MAX_CLIENTS_MAX 64
  27. /* Change this to a lower value to enforce scattered idle list mode */
  28. #define WLAN_CFG_MAX_ALLOC_SIZE 0x200000
  29. #define WLAN_CFG_MAX_ALLOC_SIZE_MIN 0x200000
  30. #define WLAN_CFG_MAX_ALLOC_SIZE_MAX 0x200000
  31. #define WLAN_CFG_NUM_TCL_DATA_RINGS 3
  32. #define WLAN_CFG_NUM_TCL_DATA_RINGS_MIN 3
  33. #define WLAN_CFG_NUM_TCL_DATA_RINGS_MAX 3
  34. #ifdef CONFIG_MCL
  35. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  36. #define WLAN_CFG_TX_FLOW_START_QUEUE_OFFSET 10
  37. #define WLAN_CFG_TX_FLOW_STOP_QUEUE_TH 15
  38. #else
  39. #define WLAN_CFG_TX_FLOW_START_QUEUE_OFFSET 0
  40. #define WLAN_CFG_TX_FLOW_STOP_QUEUE_TH 0
  41. #endif
  42. #else
  43. #define WLAN_CFG_TX_FLOW_START_QUEUE_OFFSET 0
  44. #define WLAN_CFG_TX_FLOW_STOP_QUEUE_TH 0
  45. #endif
  46. #define WLAN_CFG_PER_PDEV_TX_RING_MIN 0
  47. #define WLAN_CFG_PER_PDEV_TX_RING_MAX 1
  48. #ifdef CONFIG_MCL
  49. #define WLAN_CFG_PER_PDEV_RX_RING 0
  50. #define WLAN_CFG_PER_PDEV_LMAC_RING 0
  51. #define WLAN_LRO_ENABLE 0
  52. #ifdef IPA_OFFLOAD
  53. /* Size of TCL TX Ring */
  54. #define WLAN_CFG_TX_RING_SIZE 1024
  55. #define WLAN_CFG_PER_PDEV_TX_RING 0
  56. #define WLAN_CFG_IPA_UC_TX_BUF_SIZE 2048
  57. #define WLAN_CFG_IPA_UC_TX_PARTITION_BASE 3000
  58. #define WLAN_CFG_IPA_UC_RX_IND_RING_COUNT 1024
  59. #else
  60. #define WLAN_CFG_TX_RING_SIZE 512
  61. #define WLAN_CFG_PER_PDEV_TX_RING 1
  62. #define WLAN_CFG_IPA_UC_TX_BUF_SIZE 0
  63. #define WLAN_CFG_IPA_UC_TX_PARTITION_BASE 0
  64. #define WLAN_CFG_IPA_UC_RX_IND_RING_COUNT 0
  65. #endif
  66. #define WLAN_CFG_TX_COMP_RING_SIZE 1024
  67. /* Tx Descriptor and Tx Extension Descriptor pool sizes */
  68. #define WLAN_CFG_NUM_TX_DESC 1024
  69. #define WLAN_CFG_NUM_TX_EXT_DESC 1024
  70. /* Interrupt Mitigation - Batch threshold in terms of number of frames */
  71. #define WLAN_CFG_INT_BATCH_THRESHOLD_TX 1
  72. #define WLAN_CFG_INT_BATCH_THRESHOLD_RX 1
  73. #define WLAN_CFG_INT_BATCH_THRESHOLD_OTHER 1
  74. /* Interrupt Mitigation - Timer threshold in us */
  75. #define WLAN_CFG_INT_TIMER_THRESHOLD_TX 8
  76. #define WLAN_CFG_INT_TIMER_THRESHOLD_RX 8
  77. #define WLAN_CFG_INT_TIMER_THRESHOLD_OTHER 8
  78. #else
  79. #define WLAN_CFG_PER_PDEV_TX_RING 0
  80. #define WLAN_CFG_IPA_UC_TX_BUF_SIZE 0
  81. #define WLAN_CFG_IPA_UC_TX_PARTITION_BASE 0
  82. #define WLAN_CFG_IPA_UC_RX_IND_RING_COUNT 0
  83. #endif
  84. #ifdef CONFIG_WIN
  85. #define WLAN_CFG_PER_PDEV_RX_RING 0
  86. #define WLAN_CFG_PER_PDEV_LMAC_RING 1
  87. #define WLAN_LRO_ENABLE 0
  88. /* Tx Descriptor and Tx Extension Descriptor pool sizes */
  89. #ifndef QCA_WIFI_QCA8074_VP
  90. #define WLAN_CFG_NUM_TX_DESC 0x320000
  91. #else
  92. #define WLAN_CFG_NUM_TX_DESC (8 << 10)
  93. #endif
  94. #define WLAN_CFG_NUM_TX_EXT_DESC 0x80000
  95. /* Interrupt Mitigation - Batch threshold in terms of number of frames */
  96. #define WLAN_CFG_INT_BATCH_THRESHOLD_TX 256
  97. #define WLAN_CFG_INT_BATCH_THRESHOLD_RX 128
  98. #define WLAN_CFG_INT_BATCH_THRESHOLD_OTHER 1
  99. /* Interrupt Mitigation - Timer threshold in us */
  100. #define WLAN_CFG_INT_TIMER_THRESHOLD_TX 1000
  101. #define WLAN_CFG_INT_TIMER_THRESHOLD_RX 500
  102. #define WLAN_CFG_INT_TIMER_THRESHOLD_OTHER 1000
  103. #define WLAN_CFG_TX_RING_SIZE 512
  104. /* Size the completion ring using following 2 parameters
  105. * - NAPI schedule latency (assuming 1 netdev competing for CPU)
  106. * = 20 ms (2 jiffies)
  107. * - Worst case PPS requirement = 400K PPS
  108. *
  109. * Ring size = 20 * 400 = 8000
  110. * 8192 is nearest power of 2
  111. */
  112. #define WLAN_CFG_TX_COMP_RING_SIZE 0x80000
  113. #endif
  114. #define WLAN_CFG_PER_PDEV_RX_RING_MIN 0
  115. #define WLAN_CFG_PER_PDEV_RX_RING_MAX 0
  116. #define WLAN_CFG_PER_PDEV_LMAC_RING_MIN 0
  117. #define WLAN_CFG_PER_PDEV_LMAC_RING_MAX 1
  118. #define WLAN_CFG_TX_RING_SIZE_MIN 512
  119. #define WLAN_CFG_TX_RING_SIZE_MAX 2048
  120. #define WLAN_CFG_TX_COMP_RING_SIZE_MIN 512
  121. #define WLAN_CFG_TX_COMP_RING_SIZE_MAX 0x80000
  122. #define WLAN_CFG_NUM_TX_DESC_MIN 1024
  123. #define WLAN_CFG_NUM_TX_DESC_MAX 0x320000
  124. #define WLAN_CFG_NUM_TX_EXT_DESC_MIN 1024
  125. #define WLAN_CFG_NUM_TX_EXT_DESC_MAX 0x80000
  126. #define WLAN_CFG_INT_BATCH_THRESHOLD_TX_MIN 1
  127. #define WLAN_CFG_INT_BATCH_THRESHOLD_TX_MAX 256
  128. #define WLAN_CFG_INT_BATCH_THRESHOLD_RX_MIN 1
  129. #define WLAN_CFG_INT_BATCH_THRESHOLD_RX_MAX 128
  130. #define WLAN_CFG_INT_BATCH_THRESHOLD_OTHER_MIN 1
  131. #define WLAN_CFG_INT_BATCH_THRESHOLD_OTHER_MAX 1
  132. #define WLAN_CFG_INT_TIMER_THRESHOLD_TX_MIN 8
  133. #define WLAN_CFG_INT_TIMER_THRESHOLD_TX_MAX 100
  134. #define WLAN_CFG_INT_TIMER_THRESHOLD_RX_MIN 8
  135. #define WLAN_CFG_INT_TIMER_THRESHOLD_RX_MAX 500
  136. #define WLAN_CFG_INT_TIMER_THRESHOLD_OTHER_MIN 8
  137. #define WLAN_CFG_INT_TIMER_THRESHOLD_OTHER_MAX 1000
  138. #define WLAN_CFG_NSS_TX_COMP_RING_SIZE 0x2000
  139. #define WLAN_CFG_NSS_TX_COMP_RING_SIZE_MIN 0x2000
  140. #define WLAN_CFG_NSS_TX_COMP_RING_SIZE_MAX 0x2000
  141. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  142. /* Per vdev pools */
  143. #define WLAN_CFG_NUM_TX_DESC_POOL 3
  144. #define WLAN_CFG_NUM_TXEXT_DESC_POOL 3
  145. #else /* QCA_LL_TX_FLOW_CONTROL_V2 */
  146. #ifdef TX_PER_PDEV_DESC_POOL
  147. #define WLAN_CFG_NUM_TX_DESC_POOL MAX_PDEV_CNT
  148. #define WLAN_CFG_NUM_TXEXT_DESC_POOL MAX_PDEV_CNT
  149. #else /* TX_PER_PDEV_DESC_POOL */
  150. #define WLAN_CFG_NUM_TX_DESC_POOL 3
  151. #define WLAN_CFG_NUM_TXEXT_DESC_POOL 3
  152. #endif /* TX_PER_PDEV_DESC_POOL */
  153. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  154. #define WLAN_CFG_NUM_TXEXT_DESC_POOL_MIN 1
  155. #define WLAN_CFG_NUM_TXEXT_DESC_POOL_MAX 4
  156. #define WLAN_CFG_HTT_PKT_TYPE 2
  157. #define WLAN_CFG_HTT_PKT_TYPE_MIN 2
  158. #define WLAN_CFG_HTT_PKT_TYPE_MAX 2
  159. #define WLAN_CFG_MAX_PEER_ID 64
  160. #define WLAN_CFG_MAX_PEER_ID_MIN 64
  161. #define WLAN_CFG_MAX_PEER_ID_MAX 64
  162. #define WLAN_CFG_RX_DEFRAG_TIMEOUT 100
  163. #define WLAN_CFG_RX_DEFRAG_TIMEOUT_MIN 100
  164. #define WLAN_CFG_RX_DEFRAG_TIMEOUT_MAX 100
  165. #define WLAN_CFG_NUM_TCL_DATA_RINGS 3
  166. #define WLAN_CFG_NUM_TCL_DATA_RINGS_MIN 3
  167. #define WLAN_CFG_NUM_TCL_DATA_RINGS_MAX 3
  168. #define WLAN_CFG_NUM_REO_DEST_RING 4
  169. #define WLAN_CFG_NUM_REO_DEST_RING_MIN 4
  170. #define WLAN_CFG_NUM_REO_DEST_RING_MAX 4
  171. #define WLAN_CFG_WBM_RELEASE_RING_SIZE 64
  172. #define WLAN_CFG_WBM_RELEASE_RING_SIZE_MIN 64
  173. #define WLAN_CFG_WBM_RELEASE_RING_SIZE_MAX 64
  174. #define WLAN_CFG_TCL_CMD_RING_SIZE 32
  175. #define WLAN_CFG_TCL_CMD_RING_SIZE_MIN 32
  176. #define WLAN_CFG_TCL_CMD_RING_SIZE_MAX 32
  177. #define WLAN_CFG_TCL_STATUS_RING_SIZE 32
  178. #define WLAN_CFG_TCL_STATUS_RING_SIZE_MIN 32
  179. #define WLAN_CFG_TCL_STATUS_RING_SIZE_MAX 32
  180. #if defined(QCA_WIFI_QCA6290)
  181. #define WLAN_CFG_REO_DST_RING_SIZE 1024
  182. #else
  183. #define WLAN_CFG_REO_DST_RING_SIZE 2048
  184. #endif
  185. #define WLAN_CFG_REO_DST_RING_SIZE_MIN 1024
  186. #define WLAN_CFG_REO_DST_RING_SIZE_MAX 2048
  187. #define WLAN_CFG_REO_REINJECT_RING_SIZE 32
  188. #define WLAN_CFG_REO_REINJECT_RING_SIZE_MIN 32
  189. #define WLAN_CFG_REO_REINJECT_RING_SIZE_MAX 32
  190. #define WLAN_CFG_RX_RELEASE_RING_SIZE 1024
  191. #define WLAN_CFG_RX_RELEASE_RING_SIZE_MIN 8
  192. #define WLAN_CFG_RX_RELEASE_RING_SIZE_MAX 1024
  193. #define WLAN_CFG_REO_EXCEPTION_RING_SIZE 128
  194. #define WLAN_CFG_REO_EXCEPTION_RING_SIZE_MIN 128
  195. #define WLAN_CFG_REO_EXCEPTION_RING_SIZE_MAX 128
  196. #define WLAN_CFG_REO_CMD_RING_SIZE 128
  197. #define WLAN_CFG_REO_CMD_RING_SIZE_MIN 64
  198. #define WLAN_CFG_REO_CMD_RING_SIZE_MAX 128
  199. #define WLAN_CFG_REO_STATUS_RING_SIZE 256
  200. #define WLAN_CFG_REO_STATUS_RING_SIZE_MIN 128
  201. #define WLAN_CFG_REO_STATUS_RING_SIZE_MAX 256
  202. #define WLAN_CFG_RXDMA_BUF_RING_SIZE 1024
  203. #define WLAN_CFG_RXDMA_BUF_RING_SIZE_MIN 1024
  204. #define WLAN_CFG_RXDMA_BUF_RING_SIZE_MAX 1024
  205. #define WLAN_CFG_RXDMA_REFILL_RING_SIZE 4096
  206. #define WLAN_CFG_RXDMA_REFILL_RING_SIZE_MIN 16
  207. #define WLAN_CFG_RXDMA_REFILL_RING_SIZE_MAX 4096
  208. #define WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE 4096
  209. #define WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE_MIN 16
  210. #define WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE_MAX 8192
  211. #define WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE 2048
  212. #define WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MIN 48
  213. #define WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MAX 8192
  214. #define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE 1024
  215. #define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MIN 16
  216. #define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MAX 8192
  217. #define WLAN_CFG_RXDMA_MONITOR_DESC_RING_SIZE 4096
  218. #define WLAN_CFG_RXDMA_MONITOR_DESC_RING_SIZE_MIN 4096
  219. #define WLAN_CFG_RXDMA_MONITOR_DESC_RING_SIZE_MAX 16384
  220. #define WLAN_CFG_RXDMA_ERR_DST_RING_SIZE 1024
  221. #define WLAN_CFG_RXDMA_ERR_DST_RING_SIZE_MIN 1024
  222. #define WLAN_CFG_RXDMA_ERR_DST_RING_SIZE_MAX 8192
  223. /* DP INI Declerations */
  224. #define CFG_DP_HTT_PACKET_TYPE \
  225. CFG_INI_UINT("dp_htt_packet_type", \
  226. WLAN_CFG_HTT_PKT_TYPE_MIN, \
  227. WLAN_CFG_HTT_PKT_TYPE_MAX, \
  228. WLAN_CFG_HTT_PKT_TYPE, \
  229. CFG_VALUE_OR_DEFAULT, "DP HTT packet type")
  230. #define CFG_DP_INT_BATCH_THRESHOLD_OTHER \
  231. CFG_INI_UINT("dp_int_batch_threshold_other", \
  232. WLAN_CFG_INT_BATCH_THRESHOLD_OTHER_MIN, \
  233. WLAN_CFG_INT_BATCH_THRESHOLD_OTHER_MAX, \
  234. WLAN_CFG_INT_BATCH_THRESHOLD_OTHER, \
  235. CFG_VALUE_OR_DEFAULT, "DP INT threshold Other")
  236. #define CFG_DP_INT_BATCH_THRESHOLD_RX \
  237. CFG_INI_UINT("dp_int_batch_threshold_rx", \
  238. WLAN_CFG_INT_BATCH_THRESHOLD_RX_MIN, \
  239. WLAN_CFG_INT_BATCH_THRESHOLD_RX_MAX, \
  240. WLAN_CFG_INT_BATCH_THRESHOLD_RX, \
  241. CFG_VALUE_OR_DEFAULT, "DP INT threshold Rx")
  242. #define CFG_DP_INT_BATCH_THRESHOLD_TX \
  243. CFG_INI_UINT("dp_int_batch_threshold_tx", \
  244. WLAN_CFG_INT_BATCH_THRESHOLD_TX_MIN, \
  245. WLAN_CFG_INT_BATCH_THRESHOLD_TX_MAX, \
  246. WLAN_CFG_INT_BATCH_THRESHOLD_TX, \
  247. CFG_VALUE_OR_DEFAULT, "DP INT threshold Tx")
  248. #define CFG_DP_INT_TIMER_THRESHOLD_OTHER \
  249. CFG_INI_UINT("dp_int_timer_threshold_other", \
  250. WLAN_CFG_INT_TIMER_THRESHOLD_OTHER_MIN, \
  251. WLAN_CFG_INT_TIMER_THRESHOLD_OTHER_MAX, \
  252. WLAN_CFG_INT_TIMER_THRESHOLD_OTHER, \
  253. CFG_VALUE_OR_DEFAULT, "DP INT timer threshold Other")
  254. #define CFG_DP_INT_TIMER_THRESHOLD_RX \
  255. CFG_INI_UINT("dp_int_timer_threshold_rx", \
  256. WLAN_CFG_INT_TIMER_THRESHOLD_RX_MIN, \
  257. WLAN_CFG_INT_TIMER_THRESHOLD_RX_MAX, \
  258. WLAN_CFG_INT_TIMER_THRESHOLD_RX, \
  259. CFG_VALUE_OR_DEFAULT, "DP INT timer threshold Rx")
  260. #define CFG_DP_INT_TIMER_THRESHOLD_TX \
  261. CFG_INI_UINT("dp_int_timer_threshold_tx", \
  262. WLAN_CFG_INT_TIMER_THRESHOLD_TX_MIN, \
  263. WLAN_CFG_INT_TIMER_THRESHOLD_TX_MAX, \
  264. WLAN_CFG_INT_TIMER_THRESHOLD_TX, \
  265. CFG_VALUE_OR_DEFAULT, "DP INT timer threshold Tx")
  266. #define CFG_DP_MAX_ALLOC_SIZE \
  267. CFG_INI_UINT("dp_max_alloc_size", \
  268. WLAN_CFG_MAX_ALLOC_SIZE_MIN, \
  269. WLAN_CFG_MAX_ALLOC_SIZE_MAX, \
  270. WLAN_CFG_MAX_ALLOC_SIZE, \
  271. CFG_VALUE_OR_DEFAULT, "DP Max Alloc Size")
  272. #define CFG_DP_MAX_CLIENTS \
  273. CFG_INI_UINT("dp_max_clients", \
  274. WLAN_CFG_MAX_CLIENTS_MIN, \
  275. WLAN_CFG_MAX_CLIENTS_MAX, \
  276. WLAN_CFG_MAX_CLIENTS, \
  277. CFG_VALUE_OR_DEFAULT, "DP Max Clients")
  278. #define CFG_DP_MAX_PEER_ID \
  279. CFG_INI_UINT("dp_max_peer_id", \
  280. WLAN_CFG_MAX_PEER_ID_MIN, \
  281. WLAN_CFG_MAX_PEER_ID_MAX, \
  282. WLAN_CFG_MAX_PEER_ID, \
  283. CFG_VALUE_OR_DEFAULT, "DP Max Peer ID")
  284. #define CFG_DP_REO_DEST_RINGS \
  285. CFG_INI_UINT("dp_reo_dest_rings", \
  286. WLAN_CFG_NUM_REO_DEST_RING_MIN, \
  287. WLAN_CFG_NUM_REO_DEST_RING_MAX, \
  288. WLAN_CFG_NUM_REO_DEST_RING, \
  289. CFG_VALUE_OR_DEFAULT, "DP REO Destination Rings")
  290. #define CFG_DP_TCL_DATA_RINGS \
  291. CFG_INI_UINT("dp_tcl_data_rings", \
  292. WLAN_CFG_NUM_TCL_DATA_RINGS_MIN, \
  293. WLAN_CFG_NUM_TCL_DATA_RINGS_MAX, \
  294. WLAN_CFG_NUM_TCL_DATA_RINGS, \
  295. CFG_VALUE_OR_DEFAULT, "DP TCL Data Rings")
  296. #define CFG_DP_TX_DESC \
  297. CFG_INI_UINT("dp_tx_desc", \
  298. WLAN_CFG_NUM_TX_DESC_MIN, \
  299. WLAN_CFG_NUM_TX_DESC_MAX, \
  300. WLAN_CFG_NUM_TX_DESC, \
  301. CFG_VALUE_OR_DEFAULT, "DP Tx Descriptors")
  302. #define CFG_DP_TX_EXT_DESC \
  303. CFG_INI_UINT("dp_tx_ext_desc", \
  304. WLAN_CFG_NUM_TX_EXT_DESC_MIN, \
  305. WLAN_CFG_NUM_TX_EXT_DESC_MAX, \
  306. WLAN_CFG_NUM_TX_EXT_DESC, \
  307. CFG_VALUE_OR_DEFAULT, "DP Tx Ext Descriptors")
  308. #define CFG_DP_TX_EXT_DESC_POOLS \
  309. CFG_INI_UINT("dp_tx_ext_desc_pool", \
  310. WLAN_CFG_NUM_TXEXT_DESC_POOL_MIN, \
  311. WLAN_CFG_NUM_TXEXT_DESC_POOL_MAX, \
  312. WLAN_CFG_NUM_TXEXT_DESC_POOL, \
  313. CFG_VALUE_OR_DEFAULT, "DP Tx Ext Descriptors Pool")
  314. #define CFG_DP_PDEV_RX_RING \
  315. CFG_INI_UINT("dp_pdev_rx_ring", \
  316. WLAN_CFG_PER_PDEV_RX_RING_MIN, \
  317. WLAN_CFG_PER_PDEV_RX_RING_MAX, \
  318. WLAN_CFG_PER_PDEV_RX_RING, \
  319. CFG_VALUE_OR_DEFAULT, "DP PDEV Rx Ring")
  320. #define CFG_DP_PDEV_TX_RING \
  321. CFG_INI_UINT("dp_pdev_tx_ring", \
  322. WLAN_CFG_PER_PDEV_TX_RING_MIN, \
  323. WLAN_CFG_PER_PDEV_TX_RING_MAX, \
  324. WLAN_CFG_PER_PDEV_TX_RING, \
  325. CFG_VALUE_OR_DEFAULT, \
  326. "DP PDEV Tx Ring")
  327. #define CFG_DP_RX_DEFRAG_TIMEOUT \
  328. CFG_INI_UINT("dp_rx_defrag_timeout", \
  329. WLAN_CFG_RX_DEFRAG_TIMEOUT_MIN, \
  330. WLAN_CFG_RX_DEFRAG_TIMEOUT_MAX, \
  331. WLAN_CFG_RX_DEFRAG_TIMEOUT, \
  332. CFG_VALUE_OR_DEFAULT, "DP Rx Defrag Timeout")
  333. #define CFG_DP_TX_COMPL_RING_SIZE \
  334. CFG_INI_UINT("dp_tx_compl_ring_size", \
  335. WLAN_CFG_TX_COMP_RING_SIZE_MIN, \
  336. WLAN_CFG_TX_COMP_RING_SIZE_MAX, \
  337. WLAN_CFG_TX_COMP_RING_SIZE, \
  338. CFG_VALUE_OR_DEFAULT, "DP Tx Completion Ring Size")
  339. #define CFG_DP_TX_RING_SIZE \
  340. CFG_INI_UINT("dp_tx_ring_size", \
  341. WLAN_CFG_TX_RING_SIZE_MIN,\
  342. WLAN_CFG_TX_RING_SIZE_MAX,\
  343. WLAN_CFG_TX_RING_SIZE,\
  344. CFG_VALUE_OR_DEFAULT, "DP Tx Ring Size")
  345. #define CFG_DP_NSS_COMP_RING_SIZE \
  346. CFG_INI_UINT("dp_nss_comp_ring_size", \
  347. WLAN_CFG_NSS_TX_COMP_RING_SIZE_MIN, \
  348. WLAN_CFG_NSS_TX_COMP_RING_SIZE_MAX, \
  349. WLAN_CFG_NSS_TX_COMP_RING_SIZE, \
  350. CFG_VALUE_OR_DEFAULT, "DP NSS completion Ring Size")
  351. #define CFG_DP_PDEV_LMAC_RING \
  352. CFG_INI_UINT("dp_pdev_lmac_ring", \
  353. WLAN_CFG_PER_PDEV_LMAC_RING_MIN, \
  354. WLAN_CFG_PER_PDEV_LMAC_RING_MAX, \
  355. WLAN_CFG_PER_PDEV_LMAC_RING, \
  356. CFG_VALUE_OR_DEFAULT, "DP pdev LMAC ring")
  357. #define CFG_DP_BASE_HW_MAC_ID \
  358. CFG_INI_UINT("dp_base_hw_macid", \
  359. 0, 1, 1, \
  360. CFG_VALUE_OR_DEFAULT, "DP Base HW Mac ID")
  361. #define CFG_DP_RX_HASH \
  362. CFG_INI_BOOL("dp_rx_hash", true, \
  363. "DP Rx Hash")
  364. #define CFG_DP_TSO \
  365. CFG_INI_BOOL("TSOEnable", false, \
  366. "DP TSO Enabled")
  367. #define CFG_DP_LRO \
  368. CFG_INI_BOOL("LROEnable", WLAN_LRO_ENABLE, \
  369. "DP LRO Enable")
  370. #define CFG_DP_SG \
  371. CFG_INI_BOOL("dp_sg_support", false, \
  372. "DP SG Enable")
  373. #define CFG_DP_GRO \
  374. CFG_INI_BOOL("GROEnable", false, \
  375. "DP GRO Enable")
  376. #define CFG_DP_OL_TX_CSUM \
  377. CFG_INI_BOOL("dp_offload_tx_csum_support", false, \
  378. "DP tx csum Enable")
  379. #define CFG_DP_OL_RX_CSUM \
  380. CFG_INI_BOOL("dp_offload_rx_csum_support", false, \
  381. "DP rx csum Enable")
  382. #define CFG_DP_RAWMODE \
  383. CFG_INI_BOOL("dp_rawmode_support", false, \
  384. "DP rawmode Enable")
  385. #define CFG_DP_PEER_FLOW_CTRL \
  386. CFG_INI_BOOL("dp_peer_flow_control_support", false, \
  387. "DP peer flow ctrl Enable")
  388. #define CFG_DP_NAPI \
  389. CFG_INI_BOOL("dp_napi_enabled", MCL_OR_WIN_VALUE(true, false), \
  390. "DP Napi Enabled")
  391. #define CFG_DP_TCP_UDP_CKSUM_OFFLOAD \
  392. CFG_INI_BOOL("gEnableIpTcpUdpChecksumOffload", true, \
  393. "DP TCP UDP Checksum Offload")
  394. #define CFG_DP_DEFRAG_TIMEOUT_CHECK \
  395. CFG_INI_BOOL("dp_defrag_timeout_check", true, \
  396. "DP Defrag Timeout Check")
  397. #define CFG_DP_WBM_RELEASE_RING \
  398. CFG_INI_UINT("dp_wbm_release_ring", \
  399. WLAN_CFG_WBM_RELEASE_RING_SIZE_MIN, \
  400. WLAN_CFG_WBM_RELEASE_RING_SIZE_MAX, \
  401. WLAN_CFG_WBM_RELEASE_RING_SIZE, \
  402. CFG_VALUE_OR_DEFAULT, "DP WBM Release Ring")
  403. #define CFG_DP_TCL_CMD_RING \
  404. CFG_INI_UINT("dp_tcl_cmd_ring", \
  405. WLAN_CFG_TCL_CMD_RING_SIZE_MIN, \
  406. WLAN_CFG_TCL_CMD_RING_SIZE_MAX, \
  407. WLAN_CFG_TCL_CMD_RING_SIZE, \
  408. CFG_VALUE_OR_DEFAULT, "DP TCL command ring")
  409. #define CFG_DP_TCL_STATUS_RING \
  410. CFG_INI_UINT("dp_tcl_status_ring",\
  411. WLAN_CFG_TCL_STATUS_RING_SIZE_MIN, \
  412. WLAN_CFG_TCL_STATUS_RING_SIZE_MAX, \
  413. WLAN_CFG_TCL_STATUS_RING_SIZE, \
  414. CFG_VALUE_OR_DEFAULT, "DP TCL status ring")
  415. #define CFG_DP_REO_REINJECT_RING \
  416. CFG_INI_UINT("dp_reo_reinject_ring", \
  417. WLAN_CFG_REO_REINJECT_RING_SIZE_MIN, \
  418. WLAN_CFG_REO_REINJECT_RING_SIZE_MAX, \
  419. WLAN_CFG_REO_REINJECT_RING_SIZE, \
  420. CFG_VALUE_OR_DEFAULT, "DP REO reinject ring")
  421. #define CFG_DP_RX_RELEASE_RING \
  422. CFG_INI_UINT("dp_rx_release_ring", \
  423. WLAN_CFG_RX_RELEASE_RING_SIZE_MIN, \
  424. WLAN_CFG_RX_RELEASE_RING_SIZE_MAX, \
  425. WLAN_CFG_RX_RELEASE_RING_SIZE, \
  426. CFG_VALUE_OR_DEFAULT, "DP Rx release ring")
  427. #define CFG_DP_REO_EXCEPTION_RING \
  428. CFG_INI_UINT("dp_reo_exception_ring", \
  429. WLAN_CFG_REO_EXCEPTION_RING_SIZE_MIN, \
  430. WLAN_CFG_REO_EXCEPTION_RING_SIZE_MAX, \
  431. WLAN_CFG_REO_EXCEPTION_RING_SIZE, \
  432. CFG_VALUE_OR_DEFAULT, "DP REO exception ring")
  433. #define CFG_DP_REO_CMD_RING \
  434. CFG_INI_UINT("dp_reo_cmd_ring", \
  435. WLAN_CFG_REO_CMD_RING_SIZE_MIN, \
  436. WLAN_CFG_REO_CMD_RING_SIZE_MAX, \
  437. WLAN_CFG_REO_CMD_RING_SIZE, \
  438. CFG_VALUE_OR_DEFAULT, "DP REO command ring")
  439. #define CFG_DP_REO_STATUS_RING \
  440. CFG_INI_UINT("dp_reo_status_ring", \
  441. WLAN_CFG_REO_STATUS_RING_SIZE_MIN, \
  442. WLAN_CFG_REO_STATUS_RING_SIZE_MAX, \
  443. WLAN_CFG_REO_STATUS_RING_SIZE, \
  444. CFG_VALUE_OR_DEFAULT, "DP REO status ring")
  445. #define CFG_DP_RXDMA_BUF_RING \
  446. CFG_INI_UINT("dp_rxdma_buf_ring", \
  447. WLAN_CFG_RXDMA_BUF_RING_SIZE_MIN, \
  448. WLAN_CFG_RXDMA_BUF_RING_SIZE_MAX, \
  449. WLAN_CFG_RXDMA_BUF_RING_SIZE, \
  450. CFG_VALUE_OR_DEFAULT, "DP RXDMA buffer ring")
  451. #define CFG_DP_RXDMA_REFILL_RING \
  452. CFG_INI_UINT("dp_rxdma_refill_ring", \
  453. WLAN_CFG_RXDMA_REFILL_RING_SIZE_MIN, \
  454. WLAN_CFG_RXDMA_REFILL_RING_SIZE_MAX, \
  455. WLAN_CFG_RXDMA_REFILL_RING_SIZE, \
  456. CFG_VALUE_OR_DEFAULT, "DP RXDMA refilll ring")
  457. #define CFG_DP_RXDMA_MONITOR_BUF_RING \
  458. CFG_INI_UINT("dp_rxdma_monitor_buf_ring", \
  459. WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE_MIN, \
  460. WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE_MAX, \
  461. WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE, \
  462. CFG_VALUE_OR_DEFAULT, "DP RXDMA monitor buffer ring")
  463. #define CFG_DP_RXDMA_MONITOR_DST_RING \
  464. CFG_INI_UINT("dp_rxdma_monitor_dst_ring", \
  465. WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MIN, \
  466. WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MAX, \
  467. WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE, \
  468. CFG_VALUE_OR_DEFAULT, "DP RXDMA monitor destination ring")
  469. #define CFG_DP_RXDMA_MONITOR_STATUS_RING \
  470. CFG_INI_UINT("dp_rxdma_monitor_status_ring", \
  471. WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MIN, \
  472. WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MAX, \
  473. WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE, \
  474. CFG_VALUE_OR_DEFAULT, "DP RXDMA monitor status ring")
  475. #define CFG_DP_RXDMA_MONITOR_DESC_RING \
  476. CFG_INI_UINT("dp_rxdma_monitor_desc_ring", \
  477. WLAN_CFG_RXDMA_MONITOR_DESC_RING_SIZE_MIN, \
  478. WLAN_CFG_RXDMA_MONITOR_DESC_RING_SIZE_MAX, \
  479. WLAN_CFG_RXDMA_MONITOR_DESC_RING_SIZE, \
  480. CFG_VALUE_OR_DEFAULT, "DP RXDMA monitor destination ring")
  481. #define CFG_DP_RXDMA_ERR_DST_RING \
  482. CFG_INI_UINT("dp_rxdma_err_dst_ring", \
  483. WLAN_CFG_RXDMA_ERR_DST_RING_SIZE_MIN, \
  484. WLAN_CFG_RXDMA_ERR_DST_RING_SIZE_MAX, \
  485. WLAN_CFG_RXDMA_ERR_DST_RING_SIZE, \
  486. CFG_VALUE_OR_DEFAULT, "RXDMA err destination ring")
  487. #define CFG_DP_TX_FLOW_START_QUEUE_OFFSET \
  488. CFG_INI_UINT("TxFlowStartQueueOffset", \
  489. 0, 30, WLAN_CFG_TX_FLOW_START_QUEUE_OFFSET, \
  490. CFG_VALUE_OR_DEFAULT, "Start queue offset")
  491. #define CFG_DP_TX_FLOW_STOP_QUEUE_TH \
  492. CFG_INI_UINT("TxFlowStopQueueThreshold", \
  493. 0, 50, 15, \
  494. CFG_VALUE_OR_DEFAULT, "Stop queue Threshold")
  495. #define CFG_DP_IPA_UC_TX_BUF_SIZE \
  496. CFG_INI_UINT("IpaUcTxBufSize", \
  497. 0, 4096, WLAN_CFG_IPA_UC_TX_BUF_SIZE, \
  498. CFG_VALUE_OR_DEFAULT, "IPA tx buffer size")
  499. #define CFG_DP_IPA_UC_TX_PARTITION_BASE \
  500. CFG_INI_UINT("IpaUcTxPartitionBase", \
  501. 0, 9000, WLAN_CFG_IPA_UC_TX_PARTITION_BASE, \
  502. CFG_VALUE_OR_DEFAULT, "IPA tx partition base")
  503. #define CFG_DP_IPA_UC_RX_IND_RING_COUNT \
  504. CFG_INI_UINT("IpaUcRxIndRingCount", \
  505. 0, 2048, WLAN_CFG_IPA_UC_RX_IND_RING_COUNT, \
  506. CFG_VALUE_OR_DEFAULT, "IPA rx indication ring count")
  507. #define CFG_DP_REORDER_OFFLOAD_SUPPORT \
  508. CFG_INI_UINT("gReorderOffloadSupported", \
  509. 0, 1, 1, \
  510. CFG_VALUE_OR_DEFAULT, "Packet reordering offload to firmware")
  511. #define CFG_DP_AP_STA_SECURITY_SEPERATION \
  512. CFG_INI_BOOL("gDisableIntraBssFwd", \
  513. false, "Disable intrs BSS Rx packets")
  514. #define CFG_DP_ENABLE_DATA_STALL_DETECTION \
  515. CFG_INI_BOOL("gEnableDataStallDetection", \
  516. true, "Enable/Disable Data stall detection")
  517. #define CFG_DP \
  518. CFG(CFG_DP_HTT_PACKET_TYPE) \
  519. CFG(CFG_DP_INT_BATCH_THRESHOLD_OTHER) \
  520. CFG(CFG_DP_INT_BATCH_THRESHOLD_RX) \
  521. CFG(CFG_DP_INT_BATCH_THRESHOLD_TX) \
  522. CFG(CFG_DP_INT_TIMER_THRESHOLD_OTHER) \
  523. CFG(CFG_DP_INT_TIMER_THRESHOLD_RX) \
  524. CFG(CFG_DP_INT_TIMER_THRESHOLD_TX) \
  525. CFG(CFG_DP_MAX_ALLOC_SIZE) \
  526. CFG(CFG_DP_MAX_CLIENTS) \
  527. CFG(CFG_DP_MAX_PEER_ID) \
  528. CFG(CFG_DP_REO_DEST_RINGS) \
  529. CFG(CFG_DP_TCL_DATA_RINGS) \
  530. CFG(CFG_DP_TX_DESC) \
  531. CFG(CFG_DP_TX_EXT_DESC) \
  532. CFG(CFG_DP_TX_EXT_DESC_POOLS) \
  533. CFG(CFG_DP_PDEV_RX_RING) \
  534. CFG(CFG_DP_PDEV_TX_RING) \
  535. CFG(CFG_DP_RX_DEFRAG_TIMEOUT) \
  536. CFG(CFG_DP_TX_COMPL_RING_SIZE) \
  537. CFG(CFG_DP_TX_RING_SIZE) \
  538. CFG(CFG_DP_NSS_COMP_RING_SIZE) \
  539. CFG(CFG_DP_PDEV_LMAC_RING) \
  540. CFG(CFG_DP_BASE_HW_MAC_ID) \
  541. CFG(CFG_DP_RX_HASH) \
  542. CFG(CFG_DP_TSO) \
  543. CFG(CFG_DP_LRO) \
  544. CFG(CFG_DP_SG) \
  545. CFG(CFG_DP_GRO) \
  546. CFG(CFG_DP_OL_TX_CSUM) \
  547. CFG(CFG_DP_OL_RX_CSUM) \
  548. CFG(CFG_DP_RAWMODE) \
  549. CFG(CFG_DP_PEER_FLOW_CTRL) \
  550. CFG(CFG_DP_NAPI) \
  551. CFG(CFG_DP_TCP_UDP_CKSUM_OFFLOAD) \
  552. CFG(CFG_DP_DEFRAG_TIMEOUT_CHECK) \
  553. CFG(CFG_DP_WBM_RELEASE_RING) \
  554. CFG(CFG_DP_TCL_CMD_RING) \
  555. CFG(CFG_DP_TCL_STATUS_RING) \
  556. CFG(CFG_DP_REO_REINJECT_RING) \
  557. CFG(CFG_DP_RX_RELEASE_RING) \
  558. CFG(CFG_DP_REO_EXCEPTION_RING) \
  559. CFG(CFG_DP_REO_CMD_RING) \
  560. CFG(CFG_DP_REO_STATUS_RING) \
  561. CFG(CFG_DP_RXDMA_BUF_RING) \
  562. CFG(CFG_DP_RXDMA_REFILL_RING) \
  563. CFG(CFG_DP_RXDMA_MONITOR_BUF_RING) \
  564. CFG(CFG_DP_RXDMA_MONITOR_DST_RING) \
  565. CFG(CFG_DP_RXDMA_MONITOR_STATUS_RING) \
  566. CFG(CFG_DP_RXDMA_MONITOR_DESC_RING) \
  567. CFG(CFG_DP_RXDMA_ERR_DST_RING) \
  568. CFG(CFG_DP_TX_FLOW_START_QUEUE_OFFSET) \
  569. CFG(CFG_DP_TX_FLOW_STOP_QUEUE_TH) \
  570. CFG(CFG_DP_IPA_UC_TX_BUF_SIZE) \
  571. CFG(CFG_DP_IPA_UC_TX_PARTITION_BASE) \
  572. CFG(CFG_DP_IPA_UC_RX_IND_RING_COUNT) \
  573. CFG(CFG_DP_REORDER_OFFLOAD_SUPPORT) \
  574. CFG(CFG_DP_AP_STA_SECURITY_SEPERATION) \
  575. CFG(CFG_DP_ENABLE_DATA_STALL_DETECTION)
  576. #endif /* _CFG_DP_H_ */