wlan_cfg.h 33 KB

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