wlan_cfg.h 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  1. /*
  2. * Copyright (c) 2013-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. #ifndef __WLAN_CFG_H
  19. #define __WLAN_CFG_H
  20. /*
  21. * Temporary place holders. These should come either from target config
  22. * or platform configuration
  23. */
  24. #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
  25. #define WLAN_CFG_DST_RING_CACHED_DESC 0
  26. #define MAX_PDEV_CNT 1
  27. #define WLAN_CFG_INT_NUM_CONTEXTS 7
  28. #define WLAN_CFG_RXDMA1_ENABLE 1
  29. /*
  30. * This mask defines how many transmit frames account for 1 NAPI work unit
  31. * 0 means each tx completion is 1 unit
  32. */
  33. #define DP_TX_NAPI_BUDGET_DIV_MASK 0
  34. /* PPDU Stats Configuration - Configure bitmask for enabling tx ppdu tlv's */
  35. #define DP_PPDU_TXLITE_STATS_BITMASK_CFG 0x3FFF
  36. #define NUM_RXDMA_RINGS_PER_PDEV 2
  37. #else
  38. #define WLAN_CFG_DST_RING_CACHED_DESC 1
  39. #define MAX_PDEV_CNT 3
  40. #define WLAN_CFG_INT_NUM_CONTEXTS 11
  41. #define NUM_RXDMA_RINGS_PER_PDEV 1
  42. #endif
  43. #define WLAN_CFG_INT_NUM_CONTEXTS_MAX 11
  44. /* Tx configuration */
  45. #define MAX_LINK_DESC_BANKS 8
  46. #define MAX_TXDESC_POOLS 4
  47. #define MAX_TCL_DATA_RINGS 4
  48. /* Rx configuration */
  49. #define MAX_RXDESC_POOLS 4
  50. #define MAX_REO_DEST_RINGS 4
  51. #define MAX_RX_MAC_RINGS 2
  52. /* DP process status */
  53. #if defined(MAX_PDEV_CNT) && (MAX_PDEV_CNT == 1)
  54. #define CONFIG_PROCESS_RX_STATUS 1
  55. #define CONFIG_PROCESS_TX_STATUS 1
  56. #else
  57. #define CONFIG_PROCESS_RX_STATUS 0
  58. #define CONFIG_PROCESS_TX_STATUS 0
  59. #endif
  60. /* Miscellaneous configuration */
  61. #define MAX_IDLE_SCATTER_BUFS 16
  62. #define DP_MAX_IRQ_PER_CONTEXT 12
  63. #define MAX_HTT_METADATA_LEN 32
  64. #define MAX_NUM_PEER_ID_PER_PEER 8
  65. #define DP_MAX_TIDS 17
  66. #define DP_NON_QOS_TID 16
  67. struct wlan_cfg_dp_pdev_ctxt;
  68. /**
  69. * struct wlan_srng_cfg - Per ring configuration parameters
  70. * @timer_threshold: Config to control interrupts based on timer duration
  71. * @batch_count_threshold: Config to control interrupts based on
  72. * number of packets in the ring
  73. * @low_threshold: Config to control low threshold interrupts for SRC rings
  74. */
  75. struct wlan_srng_cfg {
  76. uint32_t timer_threshold;
  77. uint32_t batch_count_threshold;
  78. uint32_t low_threshold;
  79. };
  80. /**
  81. * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx)
  82. * @num_int_ctxts: Number of NAPI/Interrupt contexts to be registered for DP
  83. * @max_clients: Maximum number of peers/stations supported by device
  84. * @max_alloc_size: Maximum allocation size for any dynamic memory
  85. * allocation request for this device
  86. * @per_pdev_tx_ring: 0: TCL ring is not mapped per radio
  87. * 1: Each TCL ring is mapped to one radio/pdev
  88. * @num_tcl_data_rings: Number of TCL Data rings supported by device
  89. * @per_pdev_rx_ring: 0: REO ring is not mapped per radio
  90. * 1: Each REO ring is mapped to one radio/pdev
  91. * @num_tx_desc_pool: Number of Tx Descriptor pools
  92. * @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools
  93. * @num_tx_desc: Number of Tx Descriptors per pool
  94. * @min_tx_desc: Minimum number of Tx Descriptors per pool
  95. * @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool
  96. * @max_peer_id: Maximum value of peer id that FW can assign for a client
  97. * @htt_packet_type: Default 802.11 encapsulation type for any VAP created
  98. * @int_tx_ring_mask: Bitmap of Tx interrupts mapped to each NAPI/Intr context
  99. * @int_rx_ring_mask: Bitmap of Rx interrupts mapped to each NAPI/Intr context
  100. * @int_rx_mon_ring_mask: Bitmap of Rx monitor ring interrupts mapped to each
  101. * NAPI/Intr context
  102. * @int_rx_err_ring_mask: Bitmap of Rx err ring interrupts mapped to each
  103. * NAPI/Intr context
  104. * @int_wbm_rel_ring_mask: Bitmap of wbm rel ring interrupts mapped to each
  105. * NAPI/Intr context
  106. * @int_reo_status_ring_mask: Bitmap of reo status ring interrupts mapped to
  107. * each NAPI/Intr context
  108. * @int_ce_ring_mask: Bitmap of CE interrupts mapped to each NAPI/Intr context
  109. * @lro_enabled: enable/disable lro feature
  110. * @rx_hash: Enable hash based steering of rx packets
  111. * @tso_enabled: enable/disable tso feature
  112. * @lro_enabled: enable/disable LRO feature
  113. * @sg_enabled: enable disable scatter gather feature
  114. * @gro_enabled: enable disable GRO feature
  115. * @ipa_enabled: Flag indicating if IPA is enabled
  116. * @ol_tx_csum_enabled: Flag indicating if TX csum is enabled
  117. * @ol_rx_csum_enabled: Flag indicating if Rx csum is enabled
  118. * @rawmode_enabled: Flag indicating if RAW mode is enabled
  119. * @peer_flow_ctrl_enabled: Flag indicating if peer flow control is enabled
  120. * @napi_enabled: enable/disable interrupt mode for reaping tx and rx packets
  121. * @tcp_udp_checksumoffload: enable/disable checksum offload
  122. * @nss_cfg: nss configuration
  123. * @rx_defrag_min_timeout: rx defrag minimum timeout
  124. * @wbm_release_ring: wbm release ring size
  125. * @tcl_cmd_ring: tcl cmd ring size
  126. * @tcl_status_ring: tcl status ring size
  127. * @reo_reinject_ring: reo reinject ring
  128. * @rx_release_ring: rx release ring size
  129. * @reo_exception_ring: reo exception ring size
  130. * @reo_cmd_ring: reo cmd ring size
  131. * @reo_status_ring: reo status ting size
  132. * @rxdma_refill_ring: rxdma refill ring size
  133. * @rxdma_err_dst_ring: rxdma error detination ring size
  134. * @raw_mode_war: enable/disable raw mode war
  135. * @enable_data_stall_detection: flag to enable data stall detection
  136. * @disable_intra_bss_fwd: flag to disable intra bss forwarding
  137. * @rxdma1_enable: flag to indicate if rxdma1 is enabled
  138. * @tx_desc_limit_0: tx_desc limit for 5G H
  139. * @tx_desc_limit_1: tx_desc limit for 2G
  140. * @tx_desc_limit_2: tx_desc limit for 5G L
  141. * @tx_device_limit: tx device limit
  142. * @tx_sw_internode_queue: tx sw internode queue
  143. * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop
  144. * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop
  145. * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates
  146. * @rx_enable_eol_data_check: flag to enable check for more ring data at end of
  147. * dp_rx_process loop
  148. * tx_comp_enable_eol_data_check: flag to enable/disable checking for more data
  149. * at end of tx_comp_handler loop.
  150. */
  151. struct wlan_cfg_dp_soc_ctxt {
  152. int num_int_ctxts;
  153. int max_clients;
  154. int max_alloc_size;
  155. int per_pdev_tx_ring;
  156. int num_tcl_data_rings;
  157. int per_pdev_rx_ring;
  158. int per_pdev_lmac_ring;
  159. int num_reo_dest_rings;
  160. int num_tx_desc_pool;
  161. int num_tx_ext_desc_pool;
  162. int num_tx_desc;
  163. int min_tx_desc;
  164. int num_tx_ext_desc;
  165. int max_peer_id;
  166. int htt_packet_type;
  167. int int_batch_threshold_tx;
  168. int int_timer_threshold_tx;
  169. int int_batch_threshold_rx;
  170. int int_timer_threshold_rx;
  171. int int_batch_threshold_other;
  172. int int_timer_threshold_other;
  173. int int_timer_threshold_mon;
  174. int tx_ring_size;
  175. int tx_comp_ring_size;
  176. int tx_comp_ring_size_nss;
  177. int int_tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  178. int int_rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  179. int int_rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  180. int int_host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  181. int int_rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  182. int int_ce_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  183. int int_rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  184. int int_rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  185. int int_reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  186. int int_rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  187. int int_host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  188. int hw_macid[MAX_PDEV_CNT];
  189. int base_hw_macid;
  190. bool rx_hash;
  191. bool tso_enabled;
  192. bool lro_enabled;
  193. bool sg_enabled;
  194. bool gro_enabled;
  195. bool ipa_enabled;
  196. bool ol_tx_csum_enabled;
  197. bool ol_rx_csum_enabled;
  198. bool rawmode_enabled;
  199. bool peer_flow_ctrl_enabled;
  200. bool napi_enabled;
  201. bool tcp_udp_checksumoffload;
  202. bool defrag_timeout_check;
  203. int nss_cfg;
  204. uint32_t tx_flow_stop_queue_threshold;
  205. uint32_t tx_flow_start_queue_offset;
  206. int rx_defrag_min_timeout;
  207. int reo_dst_ring_size;
  208. int wbm_release_ring;
  209. int tcl_cmd_ring;
  210. int tcl_status_ring;
  211. int reo_reinject_ring;
  212. int rx_release_ring;
  213. int reo_exception_ring;
  214. int reo_cmd_ring;
  215. int reo_status_ring;
  216. int rxdma_refill_ring;
  217. int rxdma_err_dst_ring;
  218. uint32_t per_pkt_trace;
  219. bool raw_mode_war;
  220. bool enable_data_stall_detection;
  221. bool disable_intra_bss_fwd;
  222. bool rxdma1_enable;
  223. int max_ast_idx;
  224. int tx_desc_limit_0;
  225. int tx_desc_limit_1;
  226. int tx_desc_limit_2;
  227. int tx_device_limit;
  228. int tx_sw_internode_queue;
  229. #ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT
  230. uint32_t tx_comp_loop_pkt_limit;
  231. uint32_t rx_reap_loop_pkt_limit;
  232. uint32_t rx_hp_oos_update_limit;
  233. bool rx_enable_eol_data_check;
  234. bool tx_comp_enable_eol_data_check;
  235. #endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */
  236. };
  237. /**
  238. * struct wlan_cfg_dp_pdev_ctxt - Configuration parameters for pdev (radio)
  239. * @rx_dma_buf_ring_size - Size of RxDMA buffer ring
  240. * @dma_mon_buf_ring_size - Size of RxDMA Monitor buffer ring
  241. * @dma_mon_dest_ring_size - Size of RxDMA Monitor Destination ring
  242. * @dma_mon_status_ring_size - Size of RxDMA Monitor Status ring
  243. * @rxdma_monitor_desc_ring - rxdma monitor desc ring size
  244. */
  245. struct wlan_cfg_dp_pdev_ctxt {
  246. int rx_dma_buf_ring_size;
  247. int dma_mon_buf_ring_size;
  248. int dma_mon_dest_ring_size;
  249. int dma_mon_status_ring_size;
  250. int rxdma_monitor_desc_ring;
  251. int num_mac_rings;
  252. int nss_enabled;
  253. };
  254. /**
  255. * wlan_cfg_soc_attach() - Attach configuration interface for SoC
  256. * @ctrl_obj - PSOC object
  257. *
  258. * Allocates context for Soc configuration parameters,
  259. * Read configuration information from device tree/ini file and
  260. * returns back handle
  261. *
  262. * Return: Handle to configuration context
  263. */
  264. struct wlan_cfg_dp_soc_ctxt *
  265. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
  266. /**
  267. * wlan_cfg_soc_detach() - Detach soc configuration handle
  268. * @wlan_cfg_ctx: soc configuration handle
  269. *
  270. * De-allocates memory allocated for SoC configuration
  271. *
  272. * Return:none
  273. */
  274. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  275. /**
  276. * wlan_cfg_pdev_attach() Attach configuration interface for pdev
  277. * @ctrl_obj - PSOC object
  278. *
  279. * Allocates context for pdev configuration parameters,
  280. * Read configuration information from device tree/ini file and
  281. * returns back handle
  282. *
  283. * Return: Handle to configuration context
  284. */
  285. struct wlan_cfg_dp_pdev_ctxt *
  286. wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
  287. /**
  288. * wlan_cfg_pdev_detach() Detach and free pdev configuration handle
  289. * @wlan_cfg_pdev_ctx - PDEV Configuration Handle
  290. *
  291. * Return: void
  292. */
  293. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  294. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num);
  295. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  296. int context, int mask);
  297. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  298. int context, int mask);
  299. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  300. int context, int mask);
  301. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  302. int context, int mask);
  303. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  304. int mask);
  305. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
  306. void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
  307. int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg);
  308. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  309. int context, int mask);
  310. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  311. int context, int mask);
  312. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  313. int context, int mask);
  314. /**
  315. * wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered
  316. * @wlan_cfg_ctx - Configuration Handle
  317. *
  318. * For WIN, DP_NUM_INTERRUPT_CONTEXTS will be equal to number of CPU cores.
  319. * Each context (for linux it is a NAPI context) will have a tx_ring_mask,
  320. * rx_ring_mask ,and rx_monitor_ring mask to indicate the rings
  321. * that are processed by the handler.
  322. *
  323. * Return: num_contexts
  324. */
  325. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  326. /**
  327. * wlan_cfg_get_tx_ring_mask() - Return Tx interrupt mask mapped to an
  328. * interrupt context
  329. * @wlan_cfg_ctx - Configuration Handle
  330. * @context - Numerical ID identifying the Interrupt/NAPI context
  331. *
  332. * Return: int_tx_ring_mask[context]
  333. */
  334. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  335. int context);
  336. /**
  337. * wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an
  338. * interrupt context
  339. * @wlan_cfg_ctx - Configuration Handle
  340. * @context - Numerical ID identifying the Interrupt/NAPI context
  341. *
  342. * Return: int_rx_ring_mask[context]
  343. */
  344. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  345. int context);
  346. /**
  347. * wlan_cfg_get_rx_mon_ring_mask() - Return Rx monitor ring interrupt mask
  348. * mapped to an interrupt context
  349. * @wlan_cfg_ctx - Configuration Handle
  350. * @context - Numerical ID identifying the Interrupt/NAPI context
  351. *
  352. * Return: int_rx_mon_ring_mask[context]
  353. */
  354. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  355. int context);
  356. /**
  357. * wlan_cfg_set_rxdma2host_ring_mask() - Set rxdma2host ring interrupt mask
  358. * for the given interrupt context
  359. * @wlan_cfg_ctx - Configuration Handle
  360. * @context - Numerical ID identifying the Interrupt/NAPI context
  361. *
  362. */
  363. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  364. int context, int mask);
  365. /**
  366. * wlan_cfg_get_rxdma2host_ring_mask() - Return rxdma2host ring interrupt mask
  367. * mapped to an interrupt context
  368. * @wlan_cfg_ctx - Configuration Handle
  369. * @context - Numerical ID identifying the Interrupt/NAPI context
  370. *
  371. * Return: int_rxdma2host_ring_mask[context]
  372. */
  373. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  374. int context);
  375. /**
  376. * wlan_cfg_set_host2rxdma_ring_mask() - Set host2rxdma ring interrupt mask
  377. * for the given interrupt context
  378. * @wlan_cfg_ctx - Configuration Handle
  379. * @context - Numerical ID identifying the Interrupt/NAPI context
  380. *
  381. */
  382. void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  383. int context, int mask);
  384. /**
  385. * wlan_cfg_get_host2rxdma_ring_mask() - Return host2rxdma ring interrupt mask
  386. * mapped to an interrupt context
  387. * @wlan_cfg_ctx - Configuration Handle
  388. * @context - Numerical ID identifying the Interrupt/NAPI context
  389. *
  390. * Return: int_host2rxdma_ring_mask[context]
  391. */
  392. int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  393. int context);
  394. /**
  395. * wlan_cfg_set_host2rxdma_mon_ring_mask() - Set host2rxdma monitor ring
  396. * interrupt mask for the given interrupt context
  397. * @wlan_cfg_ctx - Configuration Handle
  398. * @context - Numerical ID identifying the Interrupt/NAPI context
  399. *
  400. */
  401. void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  402. int context, int mask);
  403. /**
  404. * wlan_cfg_get_host2rxdma_mon_ring_mask() - Return host2rxdma monitoe ring
  405. * interrupt mask mapped to an interrupt context
  406. * @wlan_cfg_ctx - Configuration Handle
  407. * @context - Numerical ID identifying the Interrupt/NAPI context
  408. *
  409. * Return: int_host2rxdma_mon_ring_mask[context]
  410. */
  411. int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  412. int context);
  413. /**
  414. * wlan_cfg_set_rxdma2host_mon_ring_mask() - Set rxdma2host monitor
  415. * destination ring interrupt mask
  416. * for the given interrupt context
  417. * @wlan_cfg_ctx - Configuration Handle
  418. * @context - Numerical ID identifying the Interrupt/NAPI context
  419. *
  420. */
  421. void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  422. int context, int mask);
  423. /**
  424. * wlan_cfg_get_rxdma2host_mon_ring_mask() - Return rxdma2host monitor
  425. * destination ring interrupt mask
  426. * mapped to an interrupt context
  427. * @wlan_cfg_ctx - Configuration Handle
  428. * @context - Numerical ID identifying the Interrupt/NAPI context
  429. *
  430. * Return: int_rxdma2host_mon_ring_mask[context]
  431. */
  432. int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  433. int context);
  434. /**
  435. * wlan_cfg_set_hw_macid() - Set HW MAC Id for the given PDEV index
  436. *
  437. * @wlan_cfg_ctx - Configuration Handle
  438. * @pdev_idx - Index of SW PDEV
  439. * @hw_macid - HW MAC Id
  440. *
  441. */
  442. void wlan_cfg_set_hw_macid(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  443. int hw_macid);
  444. /**
  445. * wlan_cfg_get_hw_macid() - Get HW MAC Id for the given PDEV index
  446. *
  447. * @wlan_cfg_ctx - Configuration Handle
  448. * @pdev_idx - Index of SW PDEV
  449. *
  450. * Return: HW MAC Id
  451. */
  452. int wlan_cfg_get_hw_macid(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
  453. /**
  454. * wlan_cfg_get_hw_mac_idx() - Get 0 based HW MAC index for the given
  455. * PDEV index
  456. *
  457. * @wlan_cfg_ctx - Configuration Handle
  458. * @pdev_idx - Index of SW PDEV
  459. *
  460. * Return: HW MAC index
  461. */
  462. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
  463. /**
  464. * wlan_cfg_get_rx_err_ring_mask() - Return Rx monitor ring interrupt mask
  465. * mapped to an interrupt context
  466. * @wlan_cfg_ctx - Configuration Handle
  467. * @context - Numerical ID identifying the Interrupt/NAPI context
  468. *
  469. * Return: int_rx_err_ring_mask[context]
  470. */
  471. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  472. context);
  473. /**
  474. * wlan_cfg_get_rx_wbm_rel_ring_mask() - Return Rx monitor ring interrupt mask
  475. * mapped to an interrupt context
  476. * @wlan_cfg_ctx - Configuration Handle
  477. * @context - Numerical ID identifying the Interrupt/NAPI context
  478. *
  479. * Return: int_wbm_rel_ring_mask[context]
  480. */
  481. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  482. context);
  483. /**
  484. * wlan_cfg_get_reo_status_ring_mask() - Return Rx monitor ring interrupt mask
  485. * mapped to an interrupt context
  486. * @wlan_cfg_ctx - Configuration Handle
  487. * @context - Numerical ID identifying the Interrupt/NAPI context
  488. *
  489. * Return: int_reo_status_ring_mask[context]
  490. */
  491. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  492. context);
  493. /**
  494. * wlan_cfg_get_ce_ring_mask() - Return CE ring interrupt mask
  495. * mapped to an interrupt context
  496. * @wlan_cfg_ctx - Configuration Handle
  497. * @context - Numerical ID identifying the Interrupt/NAPI context
  498. *
  499. * Return: int_ce_ring_mask[context]
  500. */
  501. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  502. int context);
  503. /**
  504. * wlan_cfg_get_max_clients() - Return maximum number of peers/stations
  505. * supported by device
  506. * @wlan_cfg_ctx - Configuration Handle
  507. *
  508. * Return: max_clients
  509. */
  510. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  511. /**
  512. * wlan_cfg_max_alloc_size() - Return Maximum allocation size for any dynamic
  513. * memory allocation request for this device
  514. * @wlan_cfg_ctx - Configuration Handle
  515. *
  516. * Return: max_alloc_size
  517. */
  518. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  519. /*
  520. * wlan_cfg_per_pdev_tx_ring() - Return true if Tx rings are mapped as
  521. * one per radio
  522. * @wlan_cfg_ctx - Configuration Handle
  523. *
  524. * Return: per_pdev_tx_ring
  525. */
  526. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  527. /*
  528. * wlan_cfg_num_tcl_data_rings() - Number of TCL Data rings supported by device
  529. * @wlan_cfg_ctx
  530. *
  531. * Return: num_tcl_data_rings
  532. */
  533. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  534. /*
  535. * wlan_cfg_per_pdev_rx_ring() - Return true if Rx rings are mapped as
  536. * one per radio
  537. * @wlan_cfg_ctx
  538. *
  539. * Return: per_pdev_rx_ring
  540. */
  541. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  542. /*
  543. * wlan_cfg_per_pdev_lmac_ring() - Return true if error rings are mapped as
  544. * one per radio
  545. * @wlan_cfg_ctx
  546. *
  547. * Return: return 1 if per pdev error ring else 0
  548. */
  549. int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  550. /*
  551. * wlan_cfg_num_reo_dest_rings() - Number of REO Data rings supported by device
  552. * @wlan_cfg_ctx - Configuration Handle
  553. *
  554. * Return: num_reo_dest_rings
  555. */
  556. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  557. /*
  558. * wlan_cfg_pkt_type() - Default 802.11 encapsulation type
  559. * @wlan_cfg_ctx - Configuration Handle
  560. *
  561. * Return: htt_pkt_type_ethernet
  562. */
  563. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  564. /*
  565. * wlan_cfg_get_num_tx_desc_pool() - Number of Tx Descriptor pools for the
  566. * device
  567. * @wlan_cfg_ctx - Configuration Handle
  568. *
  569. * Return: num_tx_desc_pool
  570. */
  571. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  572. /*
  573. * wlan_cfg_set_num_tx_desc_pool() - Set the number of Tx Descriptor pools for the
  574. * device
  575. * @wlan_cfg_ctx - Configuration Handle
  576. * @num_pool - Number of pool
  577. */
  578. void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
  579. /*
  580. * wlan_cfg_get_num_tx_ext_desc_pool() - Number of Tx MSDU ext Descriptor
  581. * pools
  582. * @wlan_cfg_ctx - Configuration Handle
  583. *
  584. * Return: num_tx_ext_desc_pool
  585. */
  586. int wlan_cfg_get_num_tx_ext_desc_pool(
  587. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  588. /*
  589. * wlan_cfg_get_reo_dst_ring_size() - Get REO destination ring size
  590. *
  591. * @wlan_cfg_ctx - Configuration Handle
  592. *
  593. * Return: reo_dst_ring_size
  594. */
  595. int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  596. /*
  597. * wlan_cfg_set_num_tx_desc_pool() - Set the REO Destination ring size
  598. *
  599. * @wlan_cfg_ctx - Configuration Handle
  600. * @reo_dst_ring_size - REO Destination ring size
  601. */
  602. void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  603. int reo_dst_ring_size);
  604. /*
  605. * wlan_cfg_set_raw_mode_war() - Set raw mode war configuration
  606. *
  607. * @wlan_cfg_ctx - Configuration Handle
  608. * @raw_mode_war - raw mode war configuration
  609. */
  610. void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
  611. bool raw_mode_war);
  612. /*
  613. * wlan_cfg_get_raw_mode_war() - Get raw mode war configuration
  614. *
  615. * @wlan_cfg_ctx - Configuration Handle
  616. *
  617. * Return: reo_dst_ring_size
  618. */
  619. bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg);
  620. /*
  621. * wlan_cfg_set_num_tx_ext_desc_pool() - Set the number of Tx MSDU ext Descriptor
  622. * pools
  623. * @wlan_cfg_ctx - Configuration Handle
  624. * @num_pool - Number of pool
  625. */
  626. void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
  627. /*
  628. * wlan_cfg_get_num_tx_desc() - Number of Tx Descriptors per pool
  629. * @wlan_cfg_ctx - Configuration Handle
  630. *
  631. * Return: num_tx_desc
  632. */
  633. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  634. /*
  635. * wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool
  636. * @wlan_cfg_ctx - Configuration Handle
  637. *
  638. * Return: num_tx_desc
  639. */
  640. int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  641. /*
  642. * wlan_cfg_set_num_tx_desc() - Set the number of Tx Descriptors per pool
  643. *
  644. * @wlan_cfg_ctx - Configuration Handle
  645. * @num_desc: Number of descriptor
  646. */
  647. void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc);
  648. /*
  649. * wlan_cfg_get_num_tx_ext_desc() - Number of Tx MSDU extension Descriptors
  650. * per pool
  651. * @wlan_cfg_ctx - Configuration Handle
  652. *
  653. * Return: num_tx_ext_desc
  654. */
  655. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  656. /*
  657. * wlan_cfg_set_num_tx_ext_desc() - Set the number of Tx MSDU extension Descriptors
  658. * per pool
  659. * @wlan_cfg_ctx - Configuration Handle
  660. * @num_desc: Number of descriptor
  661. */
  662. void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc);
  663. /*
  664. * wlan_cfg_max_peer_id() - Get maximum peer ID
  665. * @cfg: Configuration Handle
  666. *
  667. * Return: maximum peer ID
  668. */
  669. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg);
  670. /*
  671. * wlan_cfg_get_dma_mon_buf_ring_size() - Return Size of monitor buffer ring
  672. * @wlan_cfg_pdev_ctx
  673. *
  674. * Return: dma_mon_buf_ring_size
  675. */
  676. int wlan_cfg_get_dma_mon_buf_ring_size(
  677. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  678. /*
  679. * wlan_cfg_get_dma_mon_dest_ring_size() - Return Size of RxDMA Monitor
  680. * Destination ring
  681. * @wlan_cfg_pdev_ctx
  682. *
  683. * Return: dma_mon_dest_size
  684. */
  685. int wlan_cfg_get_dma_mon_dest_ring_size(
  686. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  687. /*
  688. * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring
  689. * @wlan_cfg_pdev_ctx
  690. *
  691. * Return: dma_mon_stat_ring_size
  692. */
  693. int wlan_cfg_get_dma_mon_stat_ring_size(
  694. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  695. /*
  696. * wlan_cfg_get_dma_mon_desc_ring_size - Get rxdma monitor size
  697. * @wlan_cfg_soc_ctx
  698. *
  699. * Return: rxdma monitor desc ring size
  700. */
  701. int
  702. wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
  703. /*
  704. * wlan_cfg_get_rx_dma_buf_ring_size() - Return Size of RxDMA buffer ring
  705. * @wlan_cfg_pdev_ctx
  706. *
  707. * Return: rx_dma_buf_ring_size
  708. */
  709. int wlan_cfg_get_rx_dma_buf_ring_size(
  710. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  711. /*
  712. * wlan_cfg_get_num_mac_rings() - Return the number of MAC RX DMA rings
  713. * per pdev
  714. * @wlan_cfg_pdev_ctx
  715. *
  716. * Return: number of mac DMA rings per pdev
  717. */
  718. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg);
  719. /*
  720. * wlan_cfg_is_lro_enabled - Return LRO enabled/disabled
  721. * @wlan_cfg_dp_soc_ctxt
  722. *
  723. * Return: true - LRO enabled false - LRO disabled
  724. */
  725. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  726. /*
  727. * wlan_cfg_is_gro_enabled - Return GRO enabled/disabled
  728. * @wlan_cfg_dp_soc_ctxt
  729. *
  730. * Return: true - GRO enabled false - GRO disabled
  731. */
  732. bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  733. /*
  734. * wlan_cfg_is_rx_hash_enabled - Return RX hash enabled/disabled
  735. * @wlan_cfg_dp_soc_ctxt
  736. *
  737. * Return: true - enabled false - disabled
  738. */
  739. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  740. /*
  741. * wlan_cfg_is_ipa_enabled - Return IPA enabled/disabled
  742. * @wlan_cfg_dp_soc_ctxt
  743. *
  744. * Return: true - enabled false - disabled
  745. */
  746. bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  747. /*
  748. * wlan_cfg_set_rx_hash - set rx hash enabled/disabled
  749. * @wlan_cfg_soc_ctx
  750. * @rx_hash
  751. */
  752. void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_hash);
  753. /*
  754. * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled
  755. * @wlan_cfg_pdev_ctx
  756. *
  757. * Return: 1 - enabled 0 - disabled
  758. */
  759. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg);
  760. /*
  761. * wlan_cfg_set_dp_pdev_nss_enabled - set pdev nss enabled/disabled
  762. * @wlan_cfg_pdev_ctx
  763. */
  764. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled);
  765. /*
  766. * wlan_cfg_get_dp_soc_nss_cfg - Return soc nss config
  767. * @wlan_cfg_pdev_ctx
  768. *
  769. * Return: nss_cfg
  770. */
  771. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg);
  772. /*
  773. * wlan_cfg_set_dp_soc_nss_cfg - set soc nss config
  774. * @wlan_cfg_pdev_ctx
  775. *
  776. */
  777. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg);
  778. /*
  779. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for Tx
  780. * @wlan_cfg_soc_ctx
  781. *
  782. * Return: Batch threshold
  783. */
  784. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  785. /*
  786. * wlan_cfg_get_int_timer_threshold_tx - Get interrupt mitigation cfg for Tx
  787. * @wlan_cfg_soc_ctx
  788. *
  789. * Return: Timer threshold
  790. */
  791. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  792. /*
  793. * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
  794. * @wlan_cfg_soc_ctx
  795. *
  796. * Return: Batch threshold
  797. */
  798. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  799. /*
  800. * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
  801. * @wlan_cfg_soc_ctx
  802. *
  803. * Return: Timer threshold
  804. */
  805. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  806. /*
  807. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
  808. * @wlan_cfg_soc_ctx
  809. *
  810. * Return: Batch threshold
  811. */
  812. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  813. /*
  814. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
  815. * @wlan_cfg_soc_ctx
  816. *
  817. * Return: Timer threshold
  818. */
  819. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  820. /*
  821. * wlan_cfg_get_int_timer_threshold_mon - Get int mitigation cfg for mon srngs
  822. * @wlan_cfg_soc_ctx
  823. *
  824. * Return: Timer threshold
  825. */
  826. int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg);
  827. /*
  828. * wlan_cfg_get_checksum_offload - Get checksum offload enable or disable status
  829. * @wlan_cfg_soc_ctx
  830. *
  831. * Return: Checksum offload enable or disable
  832. */
  833. int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  834. /*
  835. * wlan_cfg_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
  836. * @wlan_cfg_soc_ctx
  837. *
  838. * Return: Tx Ring Size
  839. */
  840. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  841. /*
  842. * wlan_cfg_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
  843. * @wlan_cfg_soc_ctx
  844. *
  845. * Return: Tx Completion ring size
  846. */
  847. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  848. /*
  849. * wlan_cfg_get_dp_soc_wbm_release_ring_size - Get wbm_release_ring size
  850. * @wlan_cfg_soc_ctx
  851. *
  852. * Return: wbm_release_ring size
  853. */
  854. int
  855. wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  856. /*
  857. * wlan_cfg_get_dp_soc_tcl_cmd_ring_size - Get tcl_cmd_ring size
  858. * @wlan_cfg_soc_ctx
  859. *
  860. * Return: tcl_cmd_ring size
  861. */
  862. int
  863. wlan_cfg_get_dp_soc_tcl_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  864. /*
  865. * wlan_cfg_get_dp_soc_tcl_status_ring_size - Get tcl_status_ring size
  866. * @wlan_cfg_soc_ctx
  867. *
  868. * Return: tcl_status_ring size
  869. */
  870. int
  871. wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  872. /*
  873. * wlan_cfg_get_dp_soc_reo_reinject_ring_size - Get reo_reinject_ring size
  874. * @wlan_cfg_soc_ctx
  875. *
  876. * Return: reo_reinject_ring size
  877. */
  878. int
  879. wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  880. /*
  881. * wlan_cfg_get_dp_soc_rx_release_ring_size - Get rx_release_ring size
  882. * @wlan_cfg_soc_ctx
  883. *
  884. * Return: rx_release_ring size
  885. */
  886. int
  887. wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  888. /*
  889. * wlan_cfg_get_dp_soc_reo_exception_ring_size - Get reo_exception_ring size
  890. * @wlan_cfg_soc_ctx
  891. *
  892. * Return: reo_exception_ring size
  893. */
  894. int
  895. wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  896. /*
  897. * wlan_cfg_get_dp_soc_reo_cmd_ring_size - Get reo_cmd_ring size
  898. * @wlan_cfg_soc_ctx
  899. *
  900. * Return: reo_cmd_ring size
  901. */
  902. int
  903. wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  904. /*
  905. * wlan_cfg_get_dp_soc_reo_status_ring_size - Get reo_status_ring size
  906. * @wlan_cfg_soc_ctx
  907. *
  908. * Return: reo_status_ring size
  909. */
  910. int
  911. wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  912. /*
  913. * wlan_cfg_get_dp_soc_tx_desc_limit_0 - Get tx desc limit for 5G H
  914. * @wlan_cfg_soc_ctx
  915. *
  916. * Return: tx desc limit for 5G H
  917. */
  918. int
  919. wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg);
  920. /*
  921. * wlan_cfg_get_dp_soc_tx_desc_limit_1 - Get tx desc limit for 2G
  922. * @wlan_cfg_soc_ctx
  923. *
  924. * Return: tx desc limit for 2G
  925. */
  926. int
  927. wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg);
  928. /*
  929. * wlan_cfg_get_dp_soc_tx_desc_limit_2 - Get tx desc limit for 5G L
  930. * @wlan_cfg_soc_ctx
  931. *
  932. * Return: tx desc limit for 5G L
  933. */
  934. int
  935. wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg);
  936. /*
  937. * wlan_cfg_get_dp_soc_tx_device_limit - Get tx device limit
  938. * @wlan_cfg_soc_ctx
  939. *
  940. * Return: tx device limit
  941. */
  942. int
  943. wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
  944. /*
  945. * wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue
  946. * @wlan_cfg_soc_ctx
  947. *
  948. * Return: tx sw internode queue
  949. */
  950. int
  951. wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg);
  952. /*
  953. * wlan_cfg_get_dp_soc_rxdma_refill_ring_size - Get rxdma refill ring size
  954. * @wlan_cfg_soc_ctx
  955. *
  956. * Return: rxdma refill ring size
  957. */
  958. int
  959. wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  960. /*
  961. * wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size - Get rxdma dst ring size
  962. * @wlan_cfg_soc_ctx
  963. *
  964. * Return: rxdma error dst ring size
  965. */
  966. int
  967. wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  968. /*
  969. * wlan_cfg_get_dp_caps - Get dp capablities
  970. * @wlan_cfg_soc_ctx
  971. * @dp_caps: enum for dp capablities
  972. *
  973. * Return: bool if a dp capabilities is enabled
  974. */
  975. bool
  976. wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
  977. enum cdp_capabilities dp_caps);
  978. /**
  979. * wlan_set_srng_cfg() - Fill per ring specific
  980. * configuration parameters
  981. * @wlan_cfg: global srng configuration table
  982. *
  983. * Return: None
  984. */
  985. void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg);
  986. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  987. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg);
  988. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg);
  989. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  990. int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg);
  991. int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg);
  992. #endif