wlan_cfg.h 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023
  1. /*
  2. * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. #ifndef __WLAN_CFG_H
  20. #define __WLAN_CFG_H
  21. #include <wlan_init_cfg.h>
  22. /* DP process status */
  23. #if defined(MAX_PDEV_CNT) && (MAX_PDEV_CNT == 1)
  24. #define CONFIG_PROCESS_RX_STATUS 1
  25. #define CONFIG_PROCESS_TX_STATUS 1
  26. #else
  27. #define CONFIG_PROCESS_RX_STATUS 0
  28. #define CONFIG_PROCESS_TX_STATUS 0
  29. #endif
  30. /* Miscellaneous configuration */
  31. #define MAX_IDLE_SCATTER_BUFS 16
  32. #define DP_MAX_IRQ_PER_CONTEXT 12
  33. #define MAX_HTT_METADATA_LEN 32
  34. #define DP_MAX_TIDS 17
  35. #define DP_NON_QOS_TID 16
  36. #define DP_NULL_DATA_TID 17
  37. #define WLAN_CFG_RX_FST_MAX_SEARCH 2
  38. #define WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN 40
  39. #define INVALID_PDEV_ID 0xFF
  40. #define WLAN_CFG_RX_RING_MASK_0 0x1
  41. #define WLAN_CFG_RX_RING_MASK_1 0x2
  42. #define WLAN_CFG_RX_RING_MASK_2 0x4
  43. #define WLAN_CFG_RX_RING_MASK_3 0x8
  44. #define WLAN_CFG_RX_RING_MASK_4 0x10
  45. #define WLAN_CFG_RX_RING_MASK_5 0x20
  46. #define WLAN_CFG_RX_RING_MASK_6 0x40
  47. #define WLAN_CFG_RX_RING_MASK_7 0x80
  48. #ifdef WLAN_FEATURE_NEAR_FULL_IRQ
  49. #ifdef IPA_OFFLOAD
  50. #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1 (WLAN_CFG_RX_RING_MASK_0 | \
  51. WLAN_CFG_RX_RING_MASK_1 | \
  52. WLAN_CFG_RX_RING_MASK_2)
  53. #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_2 (WLAN_CFG_RX_RING_MASK_4 | \
  54. WLAN_CFG_RX_RING_MASK_5 | \
  55. WLAN_CFG_RX_RING_MASK_6)
  56. #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
  57. WLAN_CFG_TX_RING_MASK_6 | \
  58. WLAN_CFG_TX_RING_MASK_7)
  59. #else
  60. #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1 (WLAN_CFG_RX_RING_MASK_0 | \
  61. WLAN_CFG_RX_RING_MASK_1 | \
  62. WLAN_CFG_RX_RING_MASK_2 | \
  63. WLAN_CFG_RX_RING_MASK_3)
  64. #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_2 (WLAN_CFG_RX_RING_MASK_4 | \
  65. WLAN_CFG_RX_RING_MASK_5 | \
  66. WLAN_CFG_RX_RING_MASK_6 | \
  67. WLAN_CFG_RX_RING_MASK_7)
  68. #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
  69. WLAN_CFG_TX_RING_MASK_4 | \
  70. WLAN_CFG_TX_RING_MASK_2 | \
  71. WLAN_CFG_TX_RING_MASK_6 | \
  72. WLAN_CFG_TX_RING_MASK_7)
  73. #endif
  74. #endif
  75. /* Max number of chips that can participate in MLO */
  76. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  77. #define WLAN_MAX_MLO_CHIPS 3
  78. #define WLAN_MAX_MLO_LINKS_PER_SOC 2
  79. #else
  80. #define WLAN_MAX_MLO_CHIPS 1
  81. #endif
  82. struct wlan_cfg_dp_pdev_ctxt;
  83. /**
  84. * struct wlan_cfg_tcl_wbm_ring_num_map - TCL WBM Ring number mapping
  85. * @tcl_ring_num - TCL Ring number
  86. * @wbm_ring_num - WBM Ring number
  87. * @wbm_ring_num - WBM RBM ID to be used when enqueuing to TCL
  88. * @for_ipa - whether this TCL/WBM for IPA use or not
  89. */
  90. struct wlan_cfg_tcl_wbm_ring_num_map {
  91. uint8_t tcl_ring_num;
  92. uint8_t wbm_ring_num;
  93. uint8_t wbm_rbm_id;
  94. uint8_t for_ipa;
  95. };
  96. /**
  97. * struct wlan_srng_cfg - Per ring configuration parameters
  98. * @timer_threshold: Config to control interrupts based on timer duration
  99. * @batch_count_threshold: Config to control interrupts based on
  100. * number of packets in the ring
  101. * @low_threshold: Config to control low threshold interrupts for SRC rings
  102. */
  103. struct wlan_srng_cfg {
  104. uint32_t timer_threshold;
  105. uint32_t batch_count_threshold;
  106. uint32_t low_threshold;
  107. };
  108. /**
  109. * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx)
  110. * @num_int_ctxts: Number of NAPI/Interrupt contexts to be registered for DP
  111. * @max_clients: Maximum number of peers/stations supported by device
  112. * @max_alloc_size: Maximum allocation size for any dynamic memory
  113. * allocation request for this device
  114. * @per_pdev_tx_ring: 0: TCL ring is not mapped per radio
  115. * 1: Each TCL ring is mapped to one radio/pdev
  116. * @num_tcl_data_rings: Number of TCL Data rings supported by device
  117. * @per_pdev_rx_ring: 0: REO ring is not mapped per radio
  118. * 1: Each REO ring is mapped to one radio/pdev
  119. * @num_tx_desc_pool: Number of Tx Descriptor pools
  120. * @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools
  121. * @num_tx_desc: Number of Tx Descriptors per pool
  122. * @min_tx_desc: Minimum number of Tx Descriptors per pool
  123. * @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool
  124. * @max_peer_id: Maximum value of peer id that FW can assign for a client
  125. * @htt_packet_type: Default 802.11 encapsulation type for any VAP created
  126. * @int_tx_ring_mask: Bitmap of Tx interrupts mapped to each NAPI/Intr context
  127. * @int_rx_ring_mask: Bitmap of Rx interrupts mapped to each NAPI/Intr context
  128. * @int_rx_mon_ring_mask: Bitmap of Rx monitor ring interrupts mapped to each
  129. * NAPI/Intr context
  130. * @int_tx_mon_ring_mask: Bitmap of Tx monitor ring interrupts mapped to each
  131. * NAPI/Intr context
  132. * @int_rx_err_ring_mask: Bitmap of Rx err ring interrupts mapped to each
  133. * NAPI/Intr context
  134. * @int_wbm_rel_ring_mask: Bitmap of wbm rel ring interrupts mapped to each
  135. * NAPI/Intr context
  136. * @int_reo_status_ring_mask: Bitmap of reo status ring interrupts mapped to
  137. * each NAPI/Intr context
  138. * @int_rxdma2host_ring_mask:
  139. * @int_host2rxdma_ring_mask:
  140. * @int_rx_ring_near_full_irq_1_mask: Bitmap of REO DST ring near full interrupt
  141. * mapped to each NAPI/INTR context
  142. * @int_rx_ring_near_full_irq_2_mask: Bitmap of REO DST ring near full interrupt
  143. * mapped to each NAPI/INTR context
  144. * @int_tx_ring_near_full_irq_mask: Bitmap of Tx completion ring near full
  145. * interrupt mapped to each NAPI/INTR context
  146. * @int_ce_ring_mask: Bitmap of CE interrupts mapped to each NAPI/Intr context
  147. * @lro_enabled: enable/disable lro feature
  148. * @rx_hash: Enable hash based steering of rx packets
  149. * @tso_enabled: enable/disable tso feature
  150. * @lro_enabled: enable/disable LRO feature
  151. * @sg_enabled: enable disable scatter gather feature
  152. * @gro_enabled: enable disable GRO feature
  153. * @force_gro_enabled: force enable GRO feature
  154. * @ipa_enabled: Flag indicating if IPA is enabled
  155. * @ol_tx_csum_enabled: Flag indicating if TX csum is enabled
  156. * @ol_rx_csum_enabled: Flag indicating if Rx csum is enabled
  157. * @rawmode_enabled: Flag indicating if RAW mode is enabled
  158. * @peer_flow_ctrl_enabled: Flag indicating if peer flow control is enabled
  159. * @napi_enabled: enable/disable interrupt mode for reaping tx and rx packets
  160. * @p2p_tcp_udp_checksumoffload: enable/disable checksum offload for P2P mode
  161. * @nan_tcp_udp_checksumoffload: enable/disable checksum offload for NAN mode
  162. * @tcp_udp_checksumoffload: enable/disable checksum offload
  163. * @nss_cfg: nss configuration
  164. * @rx_defrag_min_timeout: rx defrag minimum timeout
  165. * @wbm_release_ring: wbm release ring size
  166. * @tcl_cmd_credit_ring: tcl command/credit ring size
  167. * @tcl_status_ring: tcl status ring size
  168. * @reo_reinject_ring: reo reinject ring
  169. * @rx_release_ring: rx release ring size
  170. * @reo_exception_ring: reo exception ring size
  171. * @reo_cmd_ring: reo cmd ring size
  172. * @reo_status_ring: reo status ting size
  173. * @rxdma_refill_ring: rxdma refill ring size
  174. * @rxdma_err_dst_ring: rxdma error detination ring size
  175. * @raw_mode_war: enable/disable raw mode war
  176. * @enable_data_stall_detection: flag to enable data stall detection
  177. * @disable_intra_bss_fwd: flag to disable intra bss forwarding
  178. * @rxdma1_enable: flag to indicate if rxdma1 is enabled
  179. * @delay_mon_replenish: delay monitor buffer replenish
  180. * @tx_desc_limit_0: tx_desc limit for 5G H
  181. * @tx_desc_limit_1: tx_desc limit for 2G
  182. * @tx_desc_limit_2: tx_desc limit for 5G L
  183. * @tx_device_limit: tx device limit
  184. * @tx_sw_internode_queue: tx sw internode queue
  185. * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop
  186. * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop
  187. * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates
  188. * @rx_enable_eol_data_check: flag to enable check for more ring data at end of
  189. * dp_rx_process loop
  190. * @tx_comp_enable_eol_data_check: flag to enable/disable checking for more data
  191. * at end of tx_comp_handler loop.
  192. * @rx_sw_desc_weight: rx sw descriptor weight configuration
  193. * @is_rx_mon_protocol_flow_tag_enabled: flag to enable/disable RX protocol or
  194. * flow tagging in monitor/mon-lite mode
  195. * @is_rx_flow_tag_enabled: flag to enable/disable RX flow tagging using FSE
  196. * @is_rx_flow_search_table_per_pdev: flag to indicate if a per-SOC or per-pdev
  197. * table should be used
  198. * @rx_flow_search_table_size: indicates the number of flows in the flow search
  199. * table
  200. * @rx_flow_max_search: max skid length for each hash entry
  201. * @rx_toeplitz_hash_key: toeplitz key pointer used for hash computation over
  202. * 5 tuple flow entry
  203. * @pktlog_buffer_size: packet log buffer size
  204. * @is_rx_fisa_enabled: flag to enable/disable FISA Rx
  205. * @pext_stats_enabled: Flag to enable and disabled peer extended stats
  206. * @is_rx_buff_pool_enabled: flag to enable/disable emergency RX buffer
  207. * pool support
  208. * @is_rx_refill_buff_pool_enabled: flag to enable/disable RX refill buffer
  209. * pool support
  210. * @rx_pending_high_threshold: threshold of starting pkt drop
  211. * @rx_pending_low_threshold: threshold of stopping pkt drop
  212. * @is_swlm_enabled: flag to enable/disable SWLM
  213. * @tx_per_pkt_vdev_id_check: Enable tx perpkt vdev id check
  214. * @wow_check_rx_pending_enable: Enable RX frame pending check in WoW
  215. * @ipa_tx_ring_size: IPA tx ring size
  216. * @ipa_tx_comp_ring_size: IPA tx completion ring size
  217. * @ipa_tx_alt_ring_size: IPA tx alt ring size
  218. * @ipa_tx_alt_comp_ring_size: IPA tx alt completion ring size
  219. * @hw_cc_conv_enabled: cookie conversion enabled
  220. * @tcl_wbm_map_array: TCL-WBM map array
  221. * @pkt_capture_mode: Packet capture mode config
  222. * @rx_mon_buf_ring_size: Rx monitor buf ring size
  223. * @tx_mon_buf_ring_size: Tx monitor buf ring size
  224. * @tx_rings_grp_bitmap: bitmap of group intr contexts which have
  225. * non-zero tx ring mask
  226. * @mlo_chip_rx_ring_map: map of chip_id to rx ring map
  227. * @mlo_chip_default_rx_ring_id: default rx_ring of chip when hash is not found
  228. * @lmac_peer_id_msb: value used for hash based routing
  229. * @vdev_stats_hw_offload_config: HW vdev stats config
  230. * @vdev_stats_hw_offload_timer: HW vdev stats timer duration
  231. */
  232. struct wlan_cfg_dp_soc_ctxt {
  233. int num_int_ctxts;
  234. int max_clients;
  235. int max_alloc_size;
  236. int per_pdev_tx_ring;
  237. int num_tcl_data_rings;
  238. int num_nss_tcl_data_rings;
  239. int per_pdev_rx_ring;
  240. int per_pdev_lmac_ring;
  241. int num_reo_dest_rings;
  242. int num_nss_reo_dest_rings;
  243. int num_tx_desc_pool;
  244. int num_tx_ext_desc_pool;
  245. int num_tx_desc;
  246. int min_tx_desc;
  247. int num_tx_ext_desc;
  248. int max_peer_id;
  249. int htt_packet_type;
  250. int int_batch_threshold_tx;
  251. int int_timer_threshold_tx;
  252. int int_batch_threshold_rx;
  253. int int_timer_threshold_rx;
  254. int int_batch_threshold_other;
  255. int int_timer_threshold_other;
  256. int int_timer_threshold_mon;
  257. int tx_ring_size;
  258. int tx_comp_ring_size;
  259. int tx_comp_ring_size_nss;
  260. uint8_t int_tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  261. uint8_t int_rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  262. uint8_t int_rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  263. uint8_t int_tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  264. uint8_t int_host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  265. uint8_t int_rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  266. uint8_t int_ce_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  267. uint8_t int_rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  268. uint8_t int_rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  269. uint8_t int_reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  270. uint8_t int_rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  271. uint8_t int_host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  272. uint8_t int_rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  273. uint8_t int_rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  274. uint8_t int_tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  275. int hw_macid[MAX_PDEV_CNT];
  276. int hw_macid_pdev_id_map[MAX_NUM_LMAC_HW];
  277. int base_hw_macid;
  278. bool rx_hash;
  279. bool tso_enabled;
  280. bool lro_enabled;
  281. bool sg_enabled;
  282. bool gro_enabled;
  283. bool force_gro_enabled;
  284. bool ipa_enabled;
  285. bool ol_tx_csum_enabled;
  286. bool ol_rx_csum_enabled;
  287. bool rawmode_enabled;
  288. bool peer_flow_ctrl_enabled;
  289. bool napi_enabled;
  290. bool p2p_tcp_udp_checksumoffload;
  291. bool nan_tcp_udp_checksumoffload;
  292. bool tcp_udp_checksumoffload;
  293. bool legacy_mode_checksumoffload_disable;
  294. bool defrag_timeout_check;
  295. int nss_cfg;
  296. uint32_t tx_flow_stop_queue_threshold;
  297. uint32_t tx_flow_start_queue_offset;
  298. int rx_defrag_min_timeout;
  299. int reo_dst_ring_size;
  300. int wbm_release_ring;
  301. int tcl_cmd_credit_ring;
  302. int tcl_status_ring;
  303. int reo_reinject_ring;
  304. int rx_release_ring;
  305. int reo_exception_ring;
  306. int reo_cmd_ring;
  307. int reo_status_ring;
  308. int rxdma_refill_ring;
  309. int rxdma_err_dst_ring;
  310. uint32_t per_pkt_trace;
  311. bool raw_mode_war;
  312. bool enable_data_stall_detection;
  313. bool disable_intra_bss_fwd;
  314. bool rxdma1_enable;
  315. bool delay_mon_replenish;
  316. int max_ast_idx;
  317. int tx_desc_limit_0;
  318. int tx_desc_limit_1;
  319. int tx_desc_limit_2;
  320. int tx_device_limit;
  321. int tx_sw_internode_queue;
  322. int mon_drop_thresh;
  323. #ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT
  324. uint32_t tx_comp_loop_pkt_limit;
  325. uint32_t rx_reap_loop_pkt_limit;
  326. uint32_t rx_hp_oos_update_limit;
  327. bool rx_enable_eol_data_check;
  328. bool tx_comp_enable_eol_data_check;
  329. #endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */
  330. int rx_sw_desc_weight;
  331. int rx_sw_desc_num;
  332. bool is_rx_mon_protocol_flow_tag_enabled;
  333. bool is_rx_flow_tag_enabled;
  334. bool is_rx_flow_search_table_per_pdev;
  335. uint16_t rx_flow_search_table_size;
  336. uint16_t rx_flow_max_search;
  337. uint8_t *rx_toeplitz_hash_key;
  338. uint8_t pktlog_buffer_size;
  339. uint8_t is_rx_fisa_enabled;
  340. bool is_tso_desc_attach_defer;
  341. uint32_t delayed_replenish_entries;
  342. uint32_t reo_rings_mapping;
  343. bool pext_stats_enabled;
  344. bool is_rx_buff_pool_enabled;
  345. bool is_rx_refill_buff_pool_enabled;
  346. uint32_t rx_pending_high_threshold;
  347. uint32_t rx_pending_low_threshold;
  348. bool is_poll_mode_enabled;
  349. uint8_t is_swlm_enabled;
  350. bool fst_in_cmem;
  351. bool tx_per_pkt_vdev_id_check;
  352. uint8_t radio0_rx_default_reo;
  353. uint8_t radio1_rx_default_reo;
  354. uint8_t radio2_rx_default_reo;
  355. bool wow_check_rx_pending_enable;
  356. #ifdef IPA_OFFLOAD
  357. uint32_t ipa_tx_ring_size;
  358. uint32_t ipa_tx_comp_ring_size;
  359. #ifdef IPA_WDI3_TX_TWO_PIPES
  360. int ipa_tx_alt_ring_size;
  361. int ipa_tx_alt_comp_ring_size;
  362. #endif /* IPA_WDI3_TX_TWO_PIPES */
  363. #endif /* IPA_OFFLOAD */
  364. bool hw_cc_enabled;
  365. struct wlan_cfg_tcl_wbm_ring_num_map *tcl_wbm_map_array;
  366. #ifdef WLAN_SUPPORT_PPEDS
  367. bool ppe_enable;
  368. int reo2ppe_ring;
  369. int ppe2tcl_ring;
  370. int ppe_release_ring;
  371. #endif
  372. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  373. uint32_t pkt_capture_mode;
  374. #endif
  375. uint32_t rx_mon_buf_ring_size;
  376. uint32_t tx_mon_buf_ring_size;
  377. uint8_t rx_rel_wbm2sw_ring_id;
  378. uint32_t tx_rings_grp_bitmap;
  379. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  380. uint8_t mlo_chip_rx_ring_map[WLAN_MAX_MLO_CHIPS];
  381. uint8_t mlo_chip_default_rx_ring_id[WLAN_MAX_MLO_CHIPS];
  382. uint8_t lmac_peer_id_msb[WLAN_MAX_MLO_CHIPS];
  383. #endif
  384. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  385. bool vdev_stats_hw_offload_config;
  386. int vdev_stats_hw_offload_timer;
  387. #endif
  388. uint8_t num_rxdma_dst_rings_per_pdev;
  389. };
  390. /**
  391. * struct wlan_cfg_dp_pdev_ctxt - Configuration parameters for pdev (radio)
  392. * @rx_dma_buf_ring_size - Size of RxDMA buffer ring
  393. * @dma_mon_buf_ring_size - Size of RxDMA Monitor buffer ring
  394. * @dma_rx_mon_dest_ring_size - Size of RxDMA Monitor Destination ring
  395. * @dma_tx_mon_dest_ring_size - Size of Tx Monitor Destination ring
  396. * @dma_mon_status_ring_size - Size of RxDMA Monitor Status ring
  397. * @rxdma_monitor_desc_ring - rxdma monitor desc ring size
  398. * @dma_tx_mon_buf_ring_size - Tx monitor BUF Ring size
  399. */
  400. struct wlan_cfg_dp_pdev_ctxt {
  401. int rx_dma_buf_ring_size;
  402. int dma_mon_buf_ring_size;
  403. int dma_rx_mon_dest_ring_size;
  404. int dma_tx_mon_dest_ring_size;
  405. int dma_mon_status_ring_size;
  406. int rxdma_monitor_desc_ring;
  407. int num_mac_rings;
  408. int nss_enabled;
  409. int dma_tx_mon_buf_ring_size;
  410. };
  411. /**
  412. * struct wlan_dp_prealloc_cfg - DP prealloc related config
  413. * @num_tx_ring_entries: num of tcl data ring entries
  414. * @num_tx_comp_ring_entries: num of tx comp ring entries
  415. * @num_wbm_rel_ring_entries: num of wbm err ring entries
  416. * @num_rxdma_err_dst_ring_entries: num of rxdma err ring entries
  417. * @num_reo_exception_ring_entries: num of rx exception ring entries
  418. * @num_tx_desc: num of tx descriptors
  419. * @num_tx_ext_desc: num of tx ext descriptors
  420. */
  421. struct wlan_dp_prealloc_cfg {
  422. int num_tx_ring_entries;
  423. int num_tx_comp_ring_entries;
  424. int num_wbm_rel_ring_entries;
  425. int num_rxdma_err_dst_ring_entries;
  426. int num_reo_exception_ring_entries;
  427. int num_tx_desc;
  428. int num_tx_ext_desc;
  429. };
  430. /**
  431. * wlan_cfg_soc_attach() - Attach configuration interface for SoC
  432. * @ctrl_obj - PSOC object
  433. *
  434. * Allocates context for Soc configuration parameters,
  435. * Read configuration information from device tree/ini file and
  436. * returns back handle
  437. *
  438. * Return: Handle to configuration context
  439. */
  440. struct wlan_cfg_dp_soc_ctxt *
  441. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
  442. /**
  443. * wlan_cfg_soc_detach() - Detach soc configuration handle
  444. * @wlan_cfg_ctx: soc configuration handle
  445. *
  446. * De-allocates memory allocated for SoC configuration
  447. *
  448. * Return:none
  449. */
  450. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  451. /**
  452. * wlan_cfg_pdev_attach() Attach configuration interface for pdev
  453. * @ctrl_obj - PSOC object
  454. *
  455. * Allocates context for pdev configuration parameters,
  456. * Read configuration information from device tree/ini file and
  457. * returns back handle
  458. *
  459. * Return: Handle to configuration context
  460. */
  461. struct wlan_cfg_dp_pdev_ctxt *
  462. wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
  463. /**
  464. * wlan_cfg_pdev_detach() Detach and free pdev configuration handle
  465. * @wlan_cfg_pdev_ctx - PDEV Configuration Handle
  466. *
  467. * Return: void
  468. */
  469. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  470. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num);
  471. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  472. int context, int mask);
  473. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  474. int context, int mask);
  475. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  476. int context, int mask);
  477. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  478. int context, int mask);
  479. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  480. int mask);
  481. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
  482. void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
  483. int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg);
  484. int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg);
  485. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  486. int context, int mask);
  487. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  488. int context, int mask);
  489. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  490. int context, int mask);
  491. /**
  492. * wlan_cfg_set_mon_delayed_replenish_entries() - number of buffers to replenish
  493. * for monitor buffer ring at initialization
  494. * @wlan_cfg_ctx - Configuration Handle
  495. * @replenish_entries - number of entries to replenish at initialization
  496. *
  497. */
  498. void wlan_cfg_set_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
  499. *wlan_cfg_ctx,
  500. uint32_t replenish_entries);
  501. /**
  502. * wlan_cfg_get_mon_delayed_replenish_entries() - get num of buffer to replenish
  503. * for monitor buffer ring at initialization
  504. * @wlan_cfg_ctx - Configuration Handle
  505. * @replenish_entries - number of entries to replenish at initialization
  506. *
  507. * Return: delayed_replenish_entries;
  508. */
  509. int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
  510. *wlan_cfg_ctx);
  511. /**
  512. * wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered
  513. * @wlan_cfg_ctx - Configuration Handle
  514. *
  515. * For WIN, DP_NUM_INTERRUPT_CONTEXTS will be equal to number of CPU cores.
  516. * Each context (for linux it is a NAPI context) will have a tx_ring_mask,
  517. * rx_ring_mask ,and rx_monitor_ring mask to indicate the rings
  518. * that are processed by the handler.
  519. *
  520. * Return: num_contexts
  521. */
  522. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  523. /**
  524. * wlan_cfg_get_tx_ring_mask() - Return Tx interrupt mask mapped to an
  525. * interrupt context
  526. * @wlan_cfg_ctx - Configuration Handle
  527. * @context - Numerical ID identifying the Interrupt/NAPI context
  528. *
  529. * Return: int_tx_ring_mask[context]
  530. */
  531. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  532. int context);
  533. /**
  534. * wlan_cfg_get_tcl_wbm_ring_num_for_index() - Get TCL/WBM ring number for index
  535. * @wlan_cfg_ctx - Configuration Handle
  536. * @index: index for which TCL/WBM ring numbers are needed
  537. * @tcl: pointer to TCL ring number, to be filled
  538. * @wbm: pointer to WBM ring number to be filled
  539. *
  540. * The function fills in tcl/wbm input pointers with TCL/WBM ring numbers for a
  541. * given index corresponding to soc->tcl_data_ring or soc->tx_comp_ring. This
  542. * is needed since WBM/TCL rings may not be sequentially available for HOST
  543. * to use. The function returns values as stored in tcl_wbm_map_array global
  544. * array.
  545. *
  546. * Return: None
  547. */
  548. static inline
  549. void wlan_cfg_get_tcl_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  550. int index, int *tcl, int *wbm)
  551. {
  552. *tcl = wlan_cfg_ctx->tcl_wbm_map_array[index].tcl_ring_num;
  553. *wbm = wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_ring_num;
  554. }
  555. /**
  556. * wlan_cfg_get_wbm_ring_num_for_index() - Get WBM ring number for index
  557. * @wlan_cfg_ctx - Configuration Handle
  558. * @index: index for which WBM ring numbers is needed
  559. *
  560. * Return: WBM Ring number for the index
  561. */
  562. static inline
  563. int wlan_cfg_get_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  564. int index)
  565. {
  566. return wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_ring_num;
  567. }
  568. /**
  569. * wlan_cfg_get_rbm_id_for_index() - Get WBM RBM ID for TX ring index
  570. * @wlan_cfg_ctx - Configuration Handle
  571. * @index: TCL index for which WBM rbm value is needed
  572. *
  573. * The function fills in wbm rbm value corresponding to a TX ring index in
  574. * soc->tcl_data_ring. This is needed since WBM ring numbers donot map
  575. * sequentially to wbm rbm values.
  576. * The function returns rbm id values as stored in tcl_wbm_map_array global
  577. * array.
  578. *
  579. * Return: WBM rbm value corresnponding to TX ring index
  580. */
  581. static inline
  582. int wlan_cfg_get_rbm_id_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, int index)
  583. {
  584. return wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_rbm_id;
  585. }
  586. /**
  587. * wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an
  588. * interrupt context
  589. * @wlan_cfg_ctx - Configuration Handle
  590. * @context - Numerical ID identifying the Interrupt/NAPI context
  591. *
  592. * Return: int_rx_ring_mask[context]
  593. */
  594. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  595. int context);
  596. /**
  597. * wlan_cfg_get_rx_mon_ring_mask() - Return Rx monitor ring interrupt mask
  598. * mapped to an interrupt context
  599. * @wlan_cfg_ctx - Configuration Handle
  600. * @context - Numerical ID identifying the Interrupt/NAPI context
  601. *
  602. * Return: int_rx_mon_ring_mask[context]
  603. */
  604. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  605. int context);
  606. /**
  607. * wlan_cfg_set_tx_mon_ring_mask() - Set Tx monitor ring interrupt mask
  608. * mapped to an interrupt context
  609. * @wlan_cfg_ctx - Configuration Handle
  610. * @context - Numerical ID identifying the Interrupt/NAPI context
  611. * @mask: Interrupt mask
  612. *
  613. * Return: None
  614. */
  615. void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  616. int context, int mask);
  617. /**
  618. * wlan_cfg_get_tx_mon_ring_mask() - Return Tx monitor ring interrupt mask
  619. * mapped to an interrupt context
  620. * @wlan_cfg_ctx - Configuration Handle
  621. * @context - Numerical ID identifying the Interrupt/NAPI context
  622. *
  623. * Return: int_tx_mon_ring_mask[context]
  624. */
  625. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  626. int context);
  627. /**
  628. * wlan_cfg_set_rxdma2host_ring_mask() - Set rxdma2host ring interrupt mask
  629. * for the given interrupt context
  630. * @wlan_cfg_ctx - Configuration Handle
  631. * @context - Numerical ID identifying the Interrupt/NAPI context
  632. *
  633. */
  634. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  635. int context, int mask);
  636. /**
  637. * wlan_cfg_get_rxdma2host_ring_mask() - Return rxdma2host ring interrupt mask
  638. * mapped to an interrupt context
  639. * @wlan_cfg_ctx - Configuration Handle
  640. * @context - Numerical ID identifying the Interrupt/NAPI context
  641. *
  642. * Return: int_rxdma2host_ring_mask[context]
  643. */
  644. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  645. int context);
  646. /**
  647. * wlan_cfg_set_host2rxdma_ring_mask() - Set host2rxdma ring interrupt mask
  648. * for the given interrupt context
  649. * @wlan_cfg_ctx - Configuration Handle
  650. * @context - Numerical ID identifying the Interrupt/NAPI context
  651. *
  652. */
  653. void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  654. int context, int mask);
  655. /**
  656. * wlan_cfg_get_host2rxdma_ring_mask() - Return host2rxdma ring interrupt mask
  657. * mapped to an interrupt context
  658. * @wlan_cfg_ctx - Configuration Handle
  659. * @context - Numerical ID identifying the Interrupt/NAPI context
  660. *
  661. * Return: int_host2rxdma_ring_mask[context]
  662. */
  663. int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  664. int context);
  665. /**
  666. * wlan_cfg_get_rx_near_full_grp_1_mask() - Return REO near full interrupt mask
  667. * mapped to an interrupt context
  668. * @cfg: Configuration Handle
  669. * @context - Numerical ID identifying the Interrupt/NAPI context
  670. *
  671. * Return: REO near full interrupt mask[context]
  672. */
  673. int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  674. int context);
  675. /**
  676. * wlan_cfg_get_rx_near_full_grp_2_mask() - Return REO near full interrupt mask
  677. * mapped to an interrupt context
  678. * @cfg: Configuration Handle
  679. * @context - Numerical ID identifying the Interrupt/NAPI context
  680. *
  681. * Return: REO near full interrupt mask[context]
  682. */
  683. int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  684. int context);
  685. /**
  686. * wlan_cfg_get_tx_ring_near_full_mask() - Return tx completion ring near full
  687. * interrupt mask mapped to an interrupt context
  688. * @cfg: Configuration Handle
  689. * @context - Numerical ID identifying the Interrupt/NAPI context
  690. *
  691. * Return: tx completion near full interrupt mask[context]
  692. */
  693. int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  694. int context);
  695. /**
  696. * wlan_cfg_set_host2rxdma_mon_ring_mask() - Set host2rxdma monitor ring
  697. * interrupt mask for the given interrupt context
  698. * @wlan_cfg_ctx - Configuration Handle
  699. * @context - Numerical ID identifying the Interrupt/NAPI context
  700. *
  701. */
  702. void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  703. int context, int mask);
  704. /**
  705. * wlan_cfg_get_host2rxdma_mon_ring_mask() - Return host2rxdma monitoe ring
  706. * interrupt mask mapped to an interrupt context
  707. * @wlan_cfg_ctx - Configuration Handle
  708. * @context - Numerical ID identifying the Interrupt/NAPI context
  709. *
  710. * Return: int_host2rxdma_mon_ring_mask[context]
  711. */
  712. int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  713. int context);
  714. /**
  715. * wlan_cfg_set_rxdma2host_mon_ring_mask() - Set rxdma2host monitor
  716. * destination ring interrupt mask
  717. * for the given interrupt context
  718. * @wlan_cfg_ctx - Configuration Handle
  719. * @context - Numerical ID identifying the Interrupt/NAPI context
  720. *
  721. */
  722. void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  723. int context, int mask);
  724. /**
  725. * wlan_cfg_get_rxdma2host_mon_ring_mask() - Return rxdma2host monitor
  726. * destination ring interrupt mask
  727. * mapped to an interrupt context
  728. * @wlan_cfg_ctx - Configuration Handle
  729. * @context - Numerical ID identifying the Interrupt/NAPI context
  730. *
  731. * Return: int_rxdma2host_mon_ring_mask[context]
  732. */
  733. int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  734. int context);
  735. /**
  736. * wlan_cfg_set_hw_macidx() - Set HW MAC Idx for the given PDEV index
  737. *
  738. * @wlan_cfg_ctx - Configuration Handle
  739. * @pdev_idx - Index of SW PDEV
  740. * @hw_macid - HW MAC Id
  741. *
  742. */
  743. void wlan_cfg_set_hw_mac_idx
  744. (struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, int hw_macid);
  745. /**
  746. * wlan_cfg_get_hw_mac_idx() - Get 0 based HW MAC index for the given
  747. * PDEV index
  748. *
  749. * @wlan_cfg_ctx - Configuration Handle
  750. * @pdev_idx - Index of SW PDEV
  751. *
  752. * Return: HW MAC index
  753. */
  754. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
  755. /**
  756. * wlan_cfg_get_target_pdev_id() - Get target PDEV ID for HW MAC ID
  757. *
  758. * @wlan_cfg_ctx - Configuration Handle
  759. * @hw_macid - Index of hw mac
  760. *
  761. * Return: PDEV ID
  762. */
  763. int
  764. wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
  765. /**
  766. * wlan_cfg_set_pdev_idx() - Set 0 based host PDEV index for the given
  767. * hw mac index
  768. *
  769. * @wlan_cfg_ctx - Configuration Handle
  770. * @pdev_idx - Index of SW PDEV
  771. * @hw_macid - Index of hw mac
  772. *
  773. * Return: PDEV index
  774. */
  775. void wlan_cfg_set_pdev_idx
  776. (struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, int hw_macid);
  777. /**
  778. * wlan_cfg_get_pdev_idx() - Get 0 based PDEV index for the given
  779. * hw mac index
  780. *
  781. * @wlan_cfg_ctx - Configuration Handle
  782. * @hw_macid - Index of hw mac
  783. *
  784. * Return: PDEV index
  785. */
  786. int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
  787. /**
  788. * wlan_cfg_get_rx_err_ring_mask() - Return Rx monitor ring interrupt mask
  789. * mapped to an interrupt context
  790. * @wlan_cfg_ctx - Configuration Handle
  791. * @context - Numerical ID identifying the Interrupt/NAPI context
  792. *
  793. * Return: int_rx_err_ring_mask[context]
  794. */
  795. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  796. context);
  797. /**
  798. * wlan_cfg_get_rx_wbm_rel_ring_mask() - Return Rx monitor ring interrupt mask
  799. * mapped to an interrupt context
  800. * @wlan_cfg_ctx - Configuration Handle
  801. * @context - Numerical ID identifying the Interrupt/NAPI context
  802. *
  803. * Return: int_wbm_rel_ring_mask[context]
  804. */
  805. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  806. context);
  807. /**
  808. * wlan_cfg_get_reo_status_ring_mask() - Return Rx monitor ring interrupt mask
  809. * mapped to an interrupt context
  810. * @wlan_cfg_ctx - Configuration Handle
  811. * @context - Numerical ID identifying the Interrupt/NAPI context
  812. *
  813. * Return: int_reo_status_ring_mask[context]
  814. */
  815. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  816. context);
  817. /**
  818. * wlan_cfg_get_ce_ring_mask() - Return CE ring interrupt mask
  819. * mapped to an interrupt context
  820. * @wlan_cfg_ctx - Configuration Handle
  821. * @context - Numerical ID identifying the Interrupt/NAPI context
  822. *
  823. * Return: int_ce_ring_mask[context]
  824. */
  825. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  826. int context);
  827. /**
  828. * wlan_cfg_get_max_clients() - Return maximum number of peers/stations
  829. * supported by device
  830. * @wlan_cfg_ctx - Configuration Handle
  831. *
  832. * Return: max_clients
  833. */
  834. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  835. /**
  836. * wlan_cfg_max_alloc_size() - Return Maximum allocation size for any dynamic
  837. * memory allocation request for this device
  838. * @wlan_cfg_ctx - Configuration Handle
  839. *
  840. * Return: max_alloc_size
  841. */
  842. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  843. /*
  844. * wlan_cfg_per_pdev_tx_ring() - Return true if Tx rings are mapped as
  845. * one per radio
  846. * @wlan_cfg_ctx - Configuration Handle
  847. *
  848. * Return: per_pdev_tx_ring
  849. */
  850. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  851. /*
  852. * wlan_cfg_num_tcl_data_rings() - Number of TCL Data rings (HOST mode)
  853. * @wlan_cfg_ctx
  854. *
  855. * Return: num_tcl_data_rings
  856. */
  857. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  858. /*
  859. * wlan_cfg_num_nss_tcl_data_rings() - Number of TCL Data rings (NSS offload)
  860. * @wlan_cfg_ctx
  861. *
  862. * Return: num_tcl_data_rings
  863. */
  864. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  865. /*
  866. * wlan_cfg_per_pdev_rx_ring() - Return true if Rx rings are mapped as
  867. * one per radio
  868. * @wlan_cfg_ctx
  869. *
  870. * Return: per_pdev_rx_ring
  871. */
  872. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  873. /*
  874. * wlan_cfg_per_pdev_lmac_ring() - Return true if error rings are mapped as
  875. * one per radio
  876. * @wlan_cfg_ctx
  877. *
  878. * Return: return 1 if per pdev error ring else 0
  879. */
  880. int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  881. /*
  882. * wlan_cfg_num_reo_dest_rings() - Number of REO Data rings (HOST mode)
  883. * @wlan_cfg_ctx - Configuration Handle
  884. *
  885. * Return: num_reo_dest_rings
  886. */
  887. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  888. /*
  889. * wlan_cfg_num_nss_reo_dest_rings() - Number of REO Data rings (NSS offload)
  890. * @wlan_cfg_ctx - Configuration Handle
  891. *
  892. * Return: num_reo_dest_rings
  893. */
  894. int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  895. /*
  896. * wlan_cfg_pkt_type() - Default 802.11 encapsulation type
  897. * @wlan_cfg_ctx - Configuration Handle
  898. *
  899. * Return: htt_pkt_type_ethernet
  900. */
  901. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  902. /*
  903. * wlan_cfg_get_num_tx_desc_pool() - Number of Tx Descriptor pools for the
  904. * device
  905. * @wlan_cfg_ctx - Configuration Handle
  906. *
  907. * Return: num_tx_desc_pool
  908. */
  909. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  910. /*
  911. * wlan_cfg_set_num_tx_desc_pool() - Set the number of Tx Descriptor pools for the
  912. * device
  913. * @wlan_cfg_ctx - Configuration Handle
  914. * @num_pool - Number of pool
  915. */
  916. void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
  917. /*
  918. * wlan_cfg_get_num_tx_ext_desc_pool() - Number of Tx MSDU ext Descriptor
  919. * pools
  920. * @wlan_cfg_ctx - Configuration Handle
  921. *
  922. * Return: num_tx_ext_desc_pool
  923. */
  924. int wlan_cfg_get_num_tx_ext_desc_pool(
  925. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  926. /*
  927. * wlan_cfg_get_reo_dst_ring_size() - Get REO destination ring size
  928. *
  929. * @wlan_cfg_ctx - Configuration Handle
  930. *
  931. * Return: reo_dst_ring_size
  932. */
  933. int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  934. /*
  935. * wlan_cfg_set_num_tx_desc_pool() - Set the REO Destination ring size
  936. *
  937. * @wlan_cfg_ctx - Configuration Handle
  938. * @reo_dst_ring_size - REO Destination ring size
  939. */
  940. void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  941. int reo_dst_ring_size);
  942. /*
  943. * wlan_cfg_set_raw_mode_war() - Set raw mode war configuration
  944. *
  945. * @wlan_cfg_ctx - Configuration Handle
  946. * @raw_mode_war - raw mode war configuration
  947. */
  948. void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
  949. bool raw_mode_war);
  950. /*
  951. * wlan_cfg_get_raw_mode_war() - Get raw mode war configuration
  952. *
  953. * @wlan_cfg_ctx - Configuration Handle
  954. *
  955. * Return: reo_dst_ring_size
  956. */
  957. bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg);
  958. /*
  959. * wlan_cfg_set_num_tx_ext_desc_pool() - Set the number of Tx MSDU ext Descriptor
  960. * pools
  961. * @wlan_cfg_ctx - Configuration Handle
  962. * @num_pool - Number of pool
  963. */
  964. void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
  965. /*
  966. * wlan_cfg_get_num_tx_desc() - Number of Tx Descriptors per pool
  967. * @wlan_cfg_ctx - Configuration Handle
  968. *
  969. * Return: num_tx_desc
  970. */
  971. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  972. /*
  973. * wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool
  974. * @wlan_cfg_ctx - Configuration Handle
  975. *
  976. * Return: num_tx_desc
  977. */
  978. int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  979. /*
  980. * wlan_cfg_set_num_tx_desc() - Set the number of Tx Descriptors per pool
  981. *
  982. * @wlan_cfg_ctx - Configuration Handle
  983. * @num_desc: Number of descriptor
  984. */
  985. void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc);
  986. /*
  987. * wlan_cfg_get_num_tx_ext_desc() - Number of Tx MSDU extension Descriptors
  988. * per pool
  989. * @wlan_cfg_ctx - Configuration Handle
  990. *
  991. * Return: num_tx_ext_desc
  992. */
  993. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  994. /*
  995. * wlan_cfg_set_num_tx_ext_desc() - Set the number of Tx MSDU extension Descriptors
  996. * per pool
  997. * @wlan_cfg_ctx - Configuration Handle
  998. * @num_desc: Number of descriptor
  999. */
  1000. void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc);
  1001. /*
  1002. * wlan_cfg_max_peer_id() - Get maximum peer ID
  1003. * @cfg: Configuration Handle
  1004. *
  1005. * Return: maximum peer ID
  1006. */
  1007. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg);
  1008. /*
  1009. * wlan_cfg_get_dma_mon_buf_ring_size() - Return Size of monitor buffer ring
  1010. * @wlan_cfg_pdev_ctx
  1011. *
  1012. * Return: dma_mon_buf_ring_size
  1013. */
  1014. int wlan_cfg_get_dma_mon_buf_ring_size(
  1015. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  1016. /*
  1017. * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring
  1018. * @wlan_cfg_pdev_ctx
  1019. *
  1020. * Return: dma_mon_stat_ring_size
  1021. */
  1022. int wlan_cfg_get_dma_mon_stat_ring_size(
  1023. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  1024. /*
  1025. * wlan_cfg_get_dma_mon_desc_ring_size - Get rxdma monitor size
  1026. * @wlan_cfg_soc_ctx
  1027. *
  1028. * Return: rxdma monitor desc ring size
  1029. */
  1030. int
  1031. wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
  1032. /*
  1033. * wlan_cfg_get_rx_dma_buf_ring_size() - Return Size of RxDMA buffer ring
  1034. * @wlan_cfg_pdev_ctx
  1035. *
  1036. * Return: rx_dma_buf_ring_size
  1037. */
  1038. int wlan_cfg_get_rx_dma_buf_ring_size(
  1039. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  1040. /*
  1041. * wlan_cfg_rx_pending_hl_threshold() - Return high threshold of rx pending
  1042. * @wlan_cfg_pdev_ctx
  1043. *
  1044. * Return: rx_pending_high_threshold
  1045. */
  1046. uint32_t
  1047. wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
  1048. /*
  1049. * wlan_cfg_rx_pending_lo_threshold() - Return low threshold of rx pending
  1050. * @wlan_cfg_pdev_ctx
  1051. *
  1052. * Return: rx_pending_low_threshold
  1053. */
  1054. uint32_t
  1055. wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
  1056. /*
  1057. * wlan_cfg_get_num_mac_rings() - Return the number of MAC RX DMA rings
  1058. * per pdev
  1059. * @wlan_cfg_pdev_ctx
  1060. *
  1061. * Return: number of mac DMA rings per pdev
  1062. */
  1063. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg);
  1064. /*
  1065. * wlan_cfg_is_lro_enabled - Return LRO enabled/disabled
  1066. * @wlan_cfg_dp_soc_ctxt
  1067. *
  1068. * Return: true - LRO enabled false - LRO disabled
  1069. */
  1070. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1071. /*
  1072. * wlan_cfg_is_gro_enabled - Return GRO enabled/disabled
  1073. * @wlan_cfg_dp_soc_ctxt
  1074. *
  1075. * Return: true - GRO enabled false - GRO disabled
  1076. */
  1077. bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1078. /*
  1079. * wlan_cfg_is_rx_hash_enabled - Return RX hash enabled/disabled
  1080. * @wlan_cfg_dp_soc_ctxt
  1081. *
  1082. * Return: true - enabled false - disabled
  1083. */
  1084. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1085. /*
  1086. * wlan_cfg_is_ipa_enabled - Return IPA enabled/disabled
  1087. * @wlan_cfg_dp_soc_ctxt
  1088. *
  1089. * Return: true - enabled false - disabled
  1090. */
  1091. bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1092. /*
  1093. * wlan_cfg_set_rx_hash - set rx hash enabled/disabled
  1094. * @wlan_cfg_soc_ctx
  1095. * @rx_hash
  1096. */
  1097. void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_hash);
  1098. /*
  1099. * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled
  1100. * @wlan_cfg_pdev_ctx
  1101. *
  1102. * Return: 1 - enabled 0 - disabled
  1103. */
  1104. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg);
  1105. /*
  1106. * wlan_cfg_set_dp_pdev_nss_enabled - set pdev nss enabled/disabled
  1107. * @wlan_cfg_pdev_ctx
  1108. */
  1109. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled);
  1110. /*
  1111. * wlan_cfg_get_dp_soc_nss_cfg - Return soc nss config
  1112. * @wlan_cfg_pdev_ctx
  1113. *
  1114. * Return: nss_cfg
  1115. */
  1116. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg);
  1117. /*
  1118. * wlan_cfg_set_dp_soc_nss_cfg - set soc nss config
  1119. * @wlan_cfg_pdev_ctx
  1120. *
  1121. */
  1122. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg);
  1123. /*
  1124. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for Tx
  1125. * @wlan_cfg_soc_ctx
  1126. *
  1127. * Return: Batch threshold
  1128. */
  1129. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  1130. /*
  1131. * wlan_cfg_get_int_timer_threshold_tx - Get interrupt mitigation cfg for Tx
  1132. * @wlan_cfg_soc_ctx
  1133. *
  1134. * Return: Timer threshold
  1135. */
  1136. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  1137. /*
  1138. * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
  1139. * @wlan_cfg_soc_ctx
  1140. *
  1141. * Return: Batch threshold
  1142. */
  1143. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  1144. /*
  1145. * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
  1146. * @wlan_cfg_soc_ctx
  1147. *
  1148. * Return: Timer threshold
  1149. */
  1150. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  1151. /*
  1152. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
  1153. * @wlan_cfg_soc_ctx
  1154. *
  1155. * Return: Batch threshold
  1156. */
  1157. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  1158. /*
  1159. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
  1160. * @wlan_cfg_soc_ctx
  1161. *
  1162. * Return: Timer threshold
  1163. */
  1164. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  1165. /*
  1166. * wlan_cfg_get_int_timer_threshold_mon - Get int mitigation cfg for mon srngs
  1167. * @wlan_cfg_soc_ctx
  1168. *
  1169. * Return: Timer threshold
  1170. */
  1171. int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg);
  1172. /*
  1173. * wlan_cfg_get_checksum_offload - Get checksum offload enable or disable status
  1174. * @wlan_cfg_soc_ctx
  1175. *
  1176. * Return: Checksum offload enable or disable
  1177. */
  1178. int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  1179. /*
  1180. * wlan_cfg_get_nan_checksum_offload - Get checksum offload enable/disable val
  1181. * @wlan_cfg_soc_ctx
  1182. *
  1183. * Return: Checksum offload enable or disable value for NAN mode
  1184. */
  1185. int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  1186. /*
  1187. * wlan_cfg_get_p2p_checksum_offload - Get checksum offload enable/disable val
  1188. * @wlan_cfg_soc_ctx
  1189. *
  1190. * Return: Checksum offload enable or disable value for P2P mode
  1191. */
  1192. int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  1193. /*
  1194. * wlan_cfg_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
  1195. * @wlan_cfg_soc_ctx
  1196. *
  1197. * Return: Tx Ring Size
  1198. */
  1199. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1200. /*
  1201. * wlan_cfg_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
  1202. * @wlan_cfg_soc_ctx
  1203. *
  1204. * Return: Tx Completion ring size
  1205. */
  1206. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1207. /*
  1208. * wlan_cfg_get_dp_soc_wbm_release_ring_size - Get wbm_release_ring size
  1209. * @wlan_cfg_soc_ctx
  1210. *
  1211. * Return: wbm_release_ring size
  1212. */
  1213. int
  1214. wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1215. /*
  1216. * wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size - Get command/credit ring size
  1217. * @wlan_cfg_soc_ctx
  1218. *
  1219. * Return: tcl_cmd_credit_ring size
  1220. */
  1221. int
  1222. wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1223. /*
  1224. * wlan_cfg_get_dp_soc_tcl_status_ring_size - Get tcl_status_ring size
  1225. * @wlan_cfg_soc_ctx
  1226. *
  1227. * Return: tcl_status_ring size
  1228. */
  1229. int
  1230. wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1231. /*
  1232. * wlan_cfg_get_dp_soc_reo_reinject_ring_size - Get reo_reinject_ring size
  1233. * @wlan_cfg_soc_ctx
  1234. *
  1235. * Return: reo_reinject_ring size
  1236. */
  1237. int
  1238. wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1239. /*
  1240. * wlan_cfg_get_dp_soc_rx_release_ring_size - Get rx_release_ring size
  1241. * @wlan_cfg_soc_ctx
  1242. *
  1243. * Return: rx_release_ring size
  1244. */
  1245. int
  1246. wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1247. /*
  1248. * wlan_cfg_get_dp_soc_reo_exception_ring_size - Get reo_exception_ring size
  1249. * @wlan_cfg_soc_ctx
  1250. *
  1251. * Return: reo_exception_ring size
  1252. */
  1253. int
  1254. wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1255. /*
  1256. * wlan_cfg_get_dp_soc_reo_cmd_ring_size - Get reo_cmd_ring size
  1257. * @wlan_cfg_soc_ctx
  1258. *
  1259. * Return: reo_cmd_ring size
  1260. */
  1261. int
  1262. wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1263. /*
  1264. * wlan_cfg_get_dp_soc_reo_status_ring_size - Get reo_status_ring size
  1265. * @wlan_cfg_soc_ctx
  1266. *
  1267. * Return: reo_status_ring size
  1268. */
  1269. int
  1270. wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1271. /*
  1272. * wlan_cfg_get_dp_soc_tx_desc_limit_0 - Get tx desc limit for 5G H
  1273. * @wlan_cfg_soc_ctx
  1274. *
  1275. * Return: tx desc limit for 5G H
  1276. */
  1277. int
  1278. wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg);
  1279. /*
  1280. * wlan_cfg_get_dp_soc_tx_desc_limit_1 - Get tx desc limit for 2G
  1281. * @wlan_cfg_soc_ctx
  1282. *
  1283. * Return: tx desc limit for 2G
  1284. */
  1285. int
  1286. wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg);
  1287. /*
  1288. * wlan_cfg_get_dp_soc_tx_desc_limit_2 - Get tx desc limit for 5G L
  1289. * @wlan_cfg_soc_ctx
  1290. *
  1291. * Return: tx desc limit for 5G L
  1292. */
  1293. int
  1294. wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg);
  1295. /*
  1296. * wlan_cfg_get_dp_soc_tx_device_limit - Get tx device limit
  1297. * @wlan_cfg_soc_ctx
  1298. *
  1299. * Return: tx device limit
  1300. */
  1301. int
  1302. wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
  1303. /*
  1304. * wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue
  1305. * @wlan_cfg_soc_ctx
  1306. *
  1307. * Return: tx sw internode queue
  1308. */
  1309. int
  1310. wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg);
  1311. /*
  1312. * wlan_cfg_get_dp_soc_rxdma_refill_ring_size - Get rxdma refill ring size
  1313. * @wlan_cfg_soc_ctx
  1314. *
  1315. * Return: rxdma refill ring size
  1316. */
  1317. int
  1318. wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1319. /*
  1320. * wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size - Get rxdma dst ring size
  1321. * @wlan_cfg_soc_ctx
  1322. *
  1323. * Return: rxdma error dst ring size
  1324. */
  1325. int
  1326. wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1327. /*
  1328. * wlan_cfg_get_dp_soc_rx_sw_desc_weight - Get rx sw desc weight
  1329. * @wlan_cfg_soc_ctx
  1330. *
  1331. * Return: rx_sw_desc_weight
  1332. */
  1333. int
  1334. wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg);
  1335. /*
  1336. * wlan_cfg_get_dp_soc_rx_sw_desc_num - Get rx sw desc num
  1337. * @wlan_cfg_soc_ctx
  1338. *
  1339. * Return: rx_sw_desc_num
  1340. */
  1341. int
  1342. wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg);
  1343. /*
  1344. * wlan_cfg_get_dp_caps - Get dp capablities
  1345. * @wlan_cfg_soc_ctx
  1346. * @dp_caps: enum for dp capablities
  1347. *
  1348. * Return: bool if a dp capabilities is enabled
  1349. */
  1350. bool
  1351. wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
  1352. enum cdp_capabilities dp_caps);
  1353. /**
  1354. * wlan_set_srng_cfg() - Fill per ring specific
  1355. * configuration parameters
  1356. * @wlan_cfg: global srng configuration table
  1357. *
  1358. * Return: None
  1359. */
  1360. void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg);
  1361. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  1362. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg);
  1363. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg);
  1364. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  1365. int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg);
  1366. int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg);
  1367. /**
  1368. * wlan_cfg_get_rx_flow_search_table_size() - Return the size of Rx FST
  1369. * in number of entries
  1370. *
  1371. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1372. *
  1373. * Return: rx_fst_size
  1374. */
  1375. uint16_t
  1376. wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1377. /**
  1378. * wlan_cfg_rx_fst_get_max_search() - Return the max skid length for FST search
  1379. *
  1380. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1381. *
  1382. * Return: max_search
  1383. */
  1384. uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg);
  1385. /**
  1386. * wlan_cfg_rx_fst_get_hash_key() - Return Toeplitz Hash Key used for FST
  1387. * search
  1388. *
  1389. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1390. *
  1391. * Return: 320-bit Hash Key
  1392. */
  1393. uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg);
  1394. /**
  1395. * wlan_cfg_set_rx_flow_tag_enabled() - set rx flow tag enabled flag in
  1396. * DP soc context
  1397. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1398. * @val: Rx flow tag feature flag value
  1399. *
  1400. * Return: None
  1401. */
  1402. void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  1403. bool val);
  1404. /**
  1405. * wlan_cfg_is_rx_flow_tag_enabled() - get rx flow tag enabled flag from
  1406. * DP soc context
  1407. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1408. *
  1409. * Return: true if feature is enabled, else false
  1410. */
  1411. bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1412. /**
  1413. * wlan_cfg_set_rx_flow_search_table_per_pdev() - Set flag to indicate that
  1414. * Rx FST is per pdev
  1415. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1416. * @val: boolean flag indicating Rx FST per pdev or per SOC
  1417. *
  1418. * Return: None
  1419. */
  1420. void
  1421. wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
  1422. bool val);
  1423. /**
  1424. * wlan_cfg_is_rx_flow_search_table_per_pdev() - get RX FST flag for per pdev
  1425. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1426. *
  1427. * Return: true if Rx FST is per pdev, else false
  1428. */
  1429. bool
  1430. wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg);
  1431. /**
  1432. * wlan_cfg_set_rx_flow_search_table_size() - set RX FST size in DP SoC context
  1433. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1434. * @val: Rx FST size in number of entries
  1435. *
  1436. * Return: None
  1437. */
  1438. void
  1439. wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  1440. uint16_t val);
  1441. /**
  1442. * wlan_cfg_set_rx_mon_protocol_flow_tag_enabled() - set mon rx tag enabled flag
  1443. * in DP soc context
  1444. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1445. * @val: Rx protocol or flow tag feature flag value in monitor mode from INI
  1446. *
  1447. * Return: None
  1448. */
  1449. void
  1450. wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  1451. bool val);
  1452. /**
  1453. * wlan_cfg_is_rx_mon_protocol_flow_tag_enabled() - get mon rx tag enabled flag
  1454. * from DP soc context
  1455. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1456. *
  1457. * Return: true if feature is enabled in monitor mode for protocol or flow
  1458. * tagging in INI, false otherwise
  1459. */
  1460. bool
  1461. wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1462. /**
  1463. * wlan_cfg_set_tx_per_pkt_vdev_id_check() - set flag to enable perpkt
  1464. * vdev id check in tx.
  1465. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1466. * @val: feature flag value
  1467. *
  1468. * Return: None
  1469. */
  1470. void
  1471. wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
  1472. bool val);
  1473. /**
  1474. * wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled() - get flag to check if
  1475. * perpkt vdev id check is enabled in tx.
  1476. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1477. *
  1478. * Return: true if feature is enabled, false otherwise
  1479. */
  1480. bool
  1481. wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1482. /**
  1483. * wlan_cfg_fill_interrupt_mask() - set interrupt mask
  1484. *
  1485. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1486. * @num_dp_msi: Number of DP interrupts available (0 for integrated)
  1487. * @interrupt_mode: Type of interrupt
  1488. * @is_monitor_mode: is monitor mode enabled
  1489. *
  1490. * Return: void
  1491. */
  1492. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  1493. int num_dp_msi, int interrupt_mode,
  1494. bool is_monitor_mode);
  1495. /**
  1496. * wlan_cfg_is_rx_fisa_enabled() - Get Rx FISA enabled flag
  1497. *
  1498. *
  1499. * @cfg: soc configuration context
  1500. *
  1501. * Return: true if enabled, false otherwise.
  1502. */
  1503. bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1504. /**
  1505. * wlan_cfg_is_rx_buffer_pool_enabled() - Get RX buffer pool enabled flag
  1506. *
  1507. *
  1508. * @cfg: soc configuration context
  1509. *
  1510. * Return: true if enabled, false otherwise.
  1511. */
  1512. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1513. /**
  1514. * wlan_cfg_is_rx_refill_buffer_pool_enabled() - Get RX refill buffer pool enabled flag
  1515. *
  1516. *
  1517. * @cfg: soc configuration context
  1518. *
  1519. * Return: true if enabled, false otherwise.
  1520. */
  1521. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1522. void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
  1523. bool val);
  1524. bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg);
  1525. /**
  1526. * wlan_cfg_get_reo_rings_mapping() - Get Reo destination ring bitmap
  1527. *
  1528. *
  1529. * @cfg: soc configuration context
  1530. *
  1531. * Return: reo ring bitmap.
  1532. */
  1533. uint32_t wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg);
  1534. /**
  1535. * wlan_cfg_set_peer_ext_stats() - set peer extended stats
  1536. *
  1537. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1538. * @val: Flag value read from INI
  1539. *
  1540. * Return: void
  1541. */
  1542. void
  1543. wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  1544. bool val);
  1545. /**
  1546. * wlan_cfg_is_peer_ext_stats_enabled() - Check if peer extended
  1547. * stats are enabled
  1548. *
  1549. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1550. *
  1551. * Return: bool
  1552. */
  1553. bool
  1554. wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1555. /**
  1556. * wlan_cfg_is_poll_mode_enabled() - Check if poll mode is enabled
  1557. *
  1558. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1559. *
  1560. * Return: bool
  1561. */
  1562. bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1563. /**
  1564. * wlan_cfg_is_fst_in_cmem_enabled() - Check if FST in CMEM is enabled
  1565. * @cfg: soc configuration context
  1566. *
  1567. * Return: true if enabled, false otherwise.
  1568. */
  1569. bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1570. /**
  1571. * wlan_cfg_is_swlm_enabled() - Get SWLMenabled flag
  1572. * @cfg: soc configuration context
  1573. *
  1574. * Return: true if enabled, false otherwise.
  1575. */
  1576. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1577. #ifdef IPA_OFFLOAD
  1578. /*
  1579. * wlan_cfg_ipa_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
  1580. * @wlan_cfg_soc_ctx: dp cfg context
  1581. *
  1582. * Return: IPA Tx Ring Size
  1583. */
  1584. uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1585. /*
  1586. * wlan_cfg_ipa_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
  1587. * @wlan_cfg_soc_ctx: dp cfg context
  1588. *
  1589. * Return: IPA Tx Completion ring size
  1590. */
  1591. uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1592. /*
  1593. * wlan_cfg_ipa_tx_alt_ring_size - Get Tx alt DMA ring size (TCL Data Ring)
  1594. * @wlan_cfg_soc_ctx: dp cfg context
  1595. *
  1596. * Return: IPA Tx alt Ring Size
  1597. */
  1598. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1599. /*
  1600. * wlan_cfg_ipa_tx_alt_comp_ring_size - Get Tx alt comp DMA ring size
  1601. * (TCL Data Ring)
  1602. * @wlan_cfg_soc_ctx: dp cfg context
  1603. *
  1604. * Return: IPA Tx alt comp Ring Size
  1605. */
  1606. int
  1607. wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1608. #else
  1609. static inline
  1610. uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  1611. {
  1612. return 0;
  1613. }
  1614. static inline
  1615. uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  1616. {
  1617. return 0;
  1618. }
  1619. #endif
  1620. /**
  1621. * wlan_cfg_radio0_default_reo_get - Get Radio0 default REO
  1622. * @cfg: soc configuration context
  1623. *
  1624. * Return: None
  1625. */
  1626. uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  1627. /**
  1628. * wlan_cfg_radio1_default_reo_get - Get Radio1 default REO
  1629. * @cfg: soc configuration context
  1630. *
  1631. * Return: None
  1632. */
  1633. uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  1634. /**
  1635. * wlan_cfg_radio2_default_reo_get() - Get Radio2 default REO
  1636. * @cfg: soc configuration context
  1637. *
  1638. * Return: None
  1639. */
  1640. uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  1641. /**
  1642. * wlan_cfg_set_rxdma1_enable() - Enable rxdma1
  1643. * @cfg: soc configuration context
  1644. *
  1645. * Return: None
  1646. */
  1647. void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1648. /**
  1649. * wlan_cfg_is_delay_mon_replenish() - Get if delayed monitor replenish
  1650. * is enabled
  1651. * @cfg: soc configuration context
  1652. *
  1653. * Return: true if enabled, false otherwise.
  1654. */
  1655. bool
  1656. wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg);
  1657. /**
  1658. * wlan_cfg_set_delay_mon_replenish() - Set delayed monitor replenish
  1659. * @cfg: soc configuration context
  1660. * @val: val to set
  1661. *
  1662. * Return: None
  1663. */
  1664. void
  1665. wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, bool val);
  1666. /**
  1667. * wlan_cfg_dp_soc_ctx_dump() - Dump few DP cfg soc parameters
  1668. * @cfg: soc configuration context
  1669. *
  1670. * Return:
  1671. */
  1672. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg);
  1673. #ifdef WLAN_SUPPORT_PPEDS
  1674. /*
  1675. * wlan_cfg_get_dp_soc_is_ppe_enabled() - API to get ppe enable flag
  1676. * @wlan_cfg_ctx - Configuration Handle
  1677. *
  1678. * Return: true if ppe is enabled else return false
  1679. */
  1680. bool
  1681. wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1682. /*
  1683. * wlan_cfg_get_dp_soc_reo2ppe_ring_size() - get ppe rx ring size
  1684. * @wlan_cfg_ctx - Configuration Handle
  1685. *
  1686. * Return: size of reo2ppe ring
  1687. */
  1688. int
  1689. wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1690. /*
  1691. * wlan_cfg_get_dp_soc_ppe2tcl_ring_size() - get ppe tx ring size
  1692. * @wlan_cfg_ctx - Configuration Handle
  1693. *
  1694. * Return: size of ppe2tcl ring
  1695. */
  1696. int
  1697. wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1698. /*
  1699. * wlan_cfg_get_dp_soc_ppe_release_ring_size() - get ppe tx comp ring size
  1700. * @wlan_cfg_ctx - Configuration Handle
  1701. *
  1702. * Return: size of ppe release ring
  1703. */
  1704. int
  1705. wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1706. #endif
  1707. /**
  1708. * wlan_cfg_get_prealloc_cfg() - Get dp prealloc related cfg param
  1709. * @ctrl_psoc - PSOC object
  1710. * @cfg - cfg ctx where values will be populated
  1711. *
  1712. * Return: None
  1713. */
  1714. void
  1715. wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
  1716. struct wlan_dp_prealloc_cfg *cfg);
  1717. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  1718. /**
  1719. * wlan_cfg_get_pkt_capture_mode() - Get packet capture mode config
  1720. * @cfg: config context
  1721. *
  1722. * Return: value of packet capture mode
  1723. */
  1724. uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg);
  1725. #else
  1726. static inline
  1727. uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
  1728. {
  1729. return 0;
  1730. }
  1731. #endif
  1732. /**
  1733. * wlan_cfg_get_dp_soc_rx_mon_buf_ring_size() - Rx MON buf ring size
  1734. * @cfg: Configuration Handle
  1735. *
  1736. * Return: Size of Rx MON buf ring size
  1737. */
  1738. uint32_t
  1739. wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1740. /**
  1741. * wlan_cfg_get_dp_soc_tx_mon_buf_ring_size() - Tx MON buf ring size
  1742. * @cfg: Configuration Handle
  1743. *
  1744. * Return: Size of Tx MON buf ring size
  1745. */
  1746. uint32_t
  1747. wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1748. /**
  1749. * wlan_cfg_get_dma_rx_mon_dest_ring_size() - Rx MON dest ring size
  1750. * @cfg: Configuration Handle
  1751. *
  1752. * Return: Size of Rx MON dest ring size
  1753. */
  1754. int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
  1755. /**
  1756. * wlan_cfg_get_dma_tx_mon_dest_ring_size() - Tx MON dest ring size
  1757. * @cfg: Configuration Handle
  1758. *
  1759. * Return: Size of Tx MON dest ring size
  1760. */
  1761. int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
  1762. /*
  1763. * wlan_cfg_get_rx_rel_ring_id() - get wbm2sw ring id for Rx release ring
  1764. * @wlan_cfg_ctx - Configuration Handle
  1765. *
  1766. * Return: wbm2sw ring id
  1767. */
  1768. uint8_t
  1769. wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg);
  1770. /**
  1771. * wlan_cfg_set_rx_rel_ring_id() - set wbm2sw ring id for Rx release ring
  1772. * @cfg: soc configuration context
  1773. *
  1774. * Return: None
  1775. */
  1776. void
  1777. wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  1778. uint8_t wbm2sw_ring_id);
  1779. /**
  1780. * wlan_cfg_set_vdev_stats_hw_offload_config() - Set hw vdev stats offload
  1781. * config
  1782. * @cfg: config context
  1783. * @value: value to be set
  1784. *
  1785. * Return: none
  1786. */
  1787. void
  1788. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  1789. bool value);
  1790. /**
  1791. * wlan_cfg_get_vdev_stats_hw_offload_config() - Get hw vdev stats offload
  1792. * config
  1793. * @cfg: config context
  1794. *
  1795. * Return: value of hw vdev stats config
  1796. */
  1797. bool
  1798. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg);
  1799. /**
  1800. * wlan_cfg_get_vdev_stats_hw_offload_timer()- Get hw vdev stats timer duration
  1801. * @cfg: config context
  1802. *
  1803. * Return: value of hw vdev stats timer duration
  1804. */
  1805. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg);
  1806. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  1807. /**
  1808. * wlan_cfg_mlo_rx_ring_map_get_by_chip_id() - get rx ring map
  1809. * @cfg: soc configuration context
  1810. * @chip_id: mlo_chip_id
  1811. *
  1812. * Return: rx_ring_map
  1813. */
  1814. uint8_t
  1815. wlan_cfg_mlo_rx_ring_map_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  1816. uint8_t chip_id);
  1817. /**
  1818. * wlan_cfg_mlo_default_rx_ring_get_by_chip_id() - get default RX ring
  1819. * @cfg: soc configuration context
  1820. * @chip_id: mlo_chip_id
  1821. *
  1822. * Return: default rx ring
  1823. */
  1824. uint8_t
  1825. wlan_cfg_mlo_default_rx_ring_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  1826. uint8_t chip_id);
  1827. /**
  1828. * wlan_cfg_mlo_lmac_peer_id_msb_get_by_chip_id() - get chip's lmac_peer_id_msb
  1829. * @cfg: soc configuration context
  1830. * @chip_id: mlo_chip_id
  1831. *
  1832. * Return: lmac_peer_id_msb
  1833. */
  1834. uint8_t
  1835. wlan_cfg_mlo_lmac_peer_id_msb_get_by_chip_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  1836. uint8_t chip_id);
  1837. #endif
  1838. #endif /*__WLAN_CFG_H*/