wlan_cfg.h 33 KB

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