wlan_cfg.h 31 KB

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