wlan_cfg.h 32 KB

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