wlan_cfg.h 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479
  1. /*
  2. * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2023 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. #ifdef CONFIG_BERYLLIUM
  38. #define WLAN_CFG_RX_FST_MAX_SEARCH 16
  39. #else
  40. #define WLAN_CFG_RX_FST_MAX_SEARCH 2
  41. #endif
  42. #define WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN 40
  43. #define INVALID_PDEV_ID 0xFF
  44. #define WLAN_CFG_RX_RING_MASK_0 0x1
  45. #define WLAN_CFG_RX_RING_MASK_1 0x2
  46. #define WLAN_CFG_RX_RING_MASK_2 0x4
  47. #define WLAN_CFG_RX_RING_MASK_3 0x8
  48. #define WLAN_CFG_RX_RING_MASK_4 0x10
  49. #define WLAN_CFG_RX_RING_MASK_5 0x20
  50. #define WLAN_CFG_RX_RING_MASK_6 0x40
  51. #define WLAN_CFG_RX_RING_MASK_7 0x80
  52. #ifdef WLAN_FEATURE_NEAR_FULL_IRQ
  53. #ifdef IPA_OFFLOAD
  54. #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1 (WLAN_CFG_RX_RING_MASK_0 | \
  55. WLAN_CFG_RX_RING_MASK_1 | \
  56. WLAN_CFG_RX_RING_MASK_2)
  57. #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_2 (WLAN_CFG_RX_RING_MASK_4 | \
  58. WLAN_CFG_RX_RING_MASK_5 | \
  59. WLAN_CFG_RX_RING_MASK_6)
  60. #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
  61. WLAN_CFG_TX_RING_MASK_4 | \
  62. WLAN_CFG_TX_RING_MASK_2)
  63. #else
  64. #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_1 (WLAN_CFG_RX_RING_MASK_0 | \
  65. WLAN_CFG_RX_RING_MASK_1 | \
  66. WLAN_CFG_RX_RING_MASK_2 | \
  67. WLAN_CFG_RX_RING_MASK_3)
  68. #define WLAN_CFG_RX_NEAR_FULL_IRQ_MASK_2 (WLAN_CFG_RX_RING_MASK_4 | \
  69. WLAN_CFG_RX_RING_MASK_5 | \
  70. WLAN_CFG_RX_RING_MASK_6 | \
  71. WLAN_CFG_RX_RING_MASK_7)
  72. #ifdef QCA_WIFI_KIWI_V2
  73. #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
  74. WLAN_CFG_TX_RING_MASK_4 | \
  75. WLAN_CFG_TX_RING_MASK_2 | \
  76. WLAN_CFG_TX_RING_MASK_5 | \
  77. WLAN_CFG_TX_RING_MASK_6)
  78. #else /* !QCA_WIFI_KIWI_V2 */
  79. #define WLAN_CFG_TX_RING_NEAR_FULL_IRQ_MASK (WLAN_CFG_TX_RING_MASK_0 | \
  80. WLAN_CFG_TX_RING_MASK_4 | \
  81. WLAN_CFG_TX_RING_MASK_2 | \
  82. WLAN_CFG_TX_RING_MASK_6 | \
  83. WLAN_CFG_TX_RING_MASK_7)
  84. #endif /* QCA_WIFI_KIWI_V2 */
  85. #endif
  86. #endif
  87. /* Max number of chips that can participate in MLO */
  88. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  89. #define WLAN_MAX_MLO_CHIPS 4
  90. #define WLAN_MAX_MLO_LINKS_PER_SOC 2
  91. #else
  92. #define WLAN_MAX_MLO_CHIPS 1
  93. #endif
  94. #define UMAC_RESET_IPC 451
  95. struct wlan_cfg_dp_pdev_ctxt;
  96. /**
  97. * struct wlan_cfg_tcl_wbm_ring_num_map - TCL WBM Ring number mapping
  98. * @tcl_ring_num: TCL Ring number
  99. * @wbm_ring_num: WBM Ring number
  100. * @wbm_rbm_id: WBM RBM ID to be used when enqueuing to TCL
  101. * @for_ipa: whether this TCL/WBM for IPA use or not
  102. */
  103. struct wlan_cfg_tcl_wbm_ring_num_map {
  104. uint8_t tcl_ring_num;
  105. uint8_t wbm_ring_num;
  106. uint8_t wbm_rbm_id;
  107. uint8_t for_ipa;
  108. };
  109. /**
  110. * struct wlan_srng_cfg - Per ring configuration parameters
  111. * @timer_threshold: Config to control interrupts based on timer duration
  112. * @batch_count_threshold: Config to control interrupts based on
  113. * number of packets in the ring
  114. * @low_threshold: Config to control low threshold interrupts for SRC rings
  115. */
  116. struct wlan_srng_cfg {
  117. uint32_t timer_threshold;
  118. uint32_t batch_count_threshold;
  119. uint32_t low_threshold;
  120. };
  121. /**
  122. * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx)
  123. * @num_int_ctxts: Number of NAPI/Interrupt contexts to be registered for DP
  124. * @max_clients: Maximum number of peers/stations supported by device
  125. * @max_alloc_size: Maximum allocation size for any dynamic memory
  126. * allocation request for this device
  127. * @per_pdev_tx_ring: 0: TCL ring is not mapped per radio
  128. * 1: Each TCL ring is mapped to one radio/pdev
  129. * @num_tx_comp_rings: Number of Tx comp rings supported by device
  130. * @num_tcl_data_rings: Number of TCL Data rings supported by device
  131. * @num_nss_tcl_data_rings:
  132. * @per_pdev_rx_ring: 0: REO ring is not mapped per radio
  133. * 1: Each REO ring is mapped to one radio/pdev
  134. * @per_pdev_lmac_ring:
  135. * @num_reo_dest_rings:
  136. * @num_nss_reo_dest_rings:
  137. * @num_tx_desc_pool: Number of Tx Descriptor pools
  138. * @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools
  139. * @num_global_tx_desc: Number of Global Tx Descriptors allowed
  140. * @num_global_spcl_tx_desc: Number of Global special Tx Descriptors allowed
  141. * @num_tx_desc: Number of Tx Descriptors per pool
  142. * @num_tx_spl_desc: Number of Tx Descriptors per pool to handle special frames
  143. * @min_tx_desc: Minimum number of Tx Descriptors per pool
  144. * @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool
  145. * @max_peer_id: Maximum value of peer id that FW can assign for a client
  146. * @htt_packet_type: Default 802.11 encapsulation type for any VAP created
  147. * @int_tx_ring_mask: Bitmap of Tx interrupts mapped to each NAPI/Intr context
  148. * @int_rx_ring_mask: Bitmap of Rx interrupts mapped to each NAPI/Intr context
  149. * @int_batch_threshold_ppe2tcl:
  150. * @int_timer_threshold_ppe2tcl:
  151. * @int_batch_threshold_tx:
  152. * @int_timer_threshold_tx:
  153. * @int_batch_threshold_rx:
  154. * @int_timer_threshold_rx:
  155. * @int_batch_threshold_other:
  156. * @int_timer_threshold_other:
  157. * @int_timer_threshold_mon:
  158. * @tx_ring_size:
  159. * @time_control_bp:
  160. * @tx_comp_ring_size:
  161. * @tx_comp_ring_size_nss:
  162. * @int_rx_mon_ring_mask: Bitmap of Rx monitor ring interrupts mapped to each
  163. * NAPI/Intr context
  164. * @int_tx_mon_ring_mask: Bitmap of Tx monitor ring interrupts mapped to each
  165. * NAPI/Intr context
  166. * @int_host2rxdma_mon_ring_mask:
  167. * @int_rxdma2host_mon_ring_mask:
  168. * @int_ce_ring_mask: Bitmap of CE interrupts mapped to each NAPI/Intr context
  169. * @int_rx_err_ring_mask: Bitmap of Rx err ring interrupts mapped to each
  170. * NAPI/Intr context
  171. * @int_rx_wbm_rel_ring_mask: Bitmap of wbm rel ring interrupts mapped to each
  172. * NAPI/Intr context
  173. * @int_reo_status_ring_mask: Bitmap of reo status ring interrupts mapped to
  174. * each NAPI/Intr context
  175. * @int_rxdma2host_ring_mask:
  176. * @int_host2rxdma_ring_mask:
  177. * @int_rx_ring_near_full_irq_1_mask: Bitmap of REO DST ring near full interrupt
  178. * mapped to each NAPI/INTR context
  179. * @int_rx_ring_near_full_irq_2_mask: Bitmap of REO DST ring near full interrupt
  180. * mapped to each NAPI/INTR context
  181. * @int_tx_ring_near_full_irq_mask: Bitmap of Tx completion ring near full
  182. * interrupt mapped to each NAPI/INTR context
  183. * @int_host2txmon_ring_mask: Bitmap of Tx monitor source ring interrupt
  184. * mapped to each NAPI/INTR context
  185. * @int_ppeds_wbm_release_ring_mask:
  186. * @int_ppe2tcl_ring_mask:
  187. * @int_reo2ppe_ring_mask:
  188. * @int_umac_reset_intr_mask: Bitmap of UMAC reset interrupt mapped to each
  189. * NAPI/INTR context
  190. * @hw_macid:
  191. * @hw_macid_pdev_id_map:
  192. * @base_hw_macid:
  193. * @rx_hash: Enable hash based steering of rx packets
  194. * @tso_enabled: enable/disable tso feature
  195. * @lro_enabled: enable/disable LRO feature
  196. * @sg_enabled: enable disable scatter gather feature
  197. * @gro_enabled: enable disable GRO feature
  198. * @tc_based_dynamic_gro: enable/disable tc based dynamic gro
  199. * @tc_ingress_prio: ingress prio to be checked for dynamic gro
  200. * @ipa_enabled: Flag indicating if IPA is enabled
  201. * @ol_tx_csum_enabled: Flag indicating if TX csum is enabled
  202. * @ol_rx_csum_enabled: Flag indicating if Rx csum is enabled
  203. * @rawmode_enabled: Flag indicating if RAW mode is enabled
  204. * @peer_flow_ctrl_enabled: Flag indicating if peer flow control is enabled
  205. * @napi_enabled: enable/disable interrupt mode for reaping tx and rx packets
  206. * @p2p_tcp_udp_checksumoffload: enable/disable checksum offload for P2P mode
  207. * @nan_tcp_udp_checksumoffload: enable/disable checksum offload for NAN mode
  208. * @tcp_udp_checksumoffload: enable/disable checksum offload
  209. * @legacy_mode_checksumoffload_disable:
  210. * @defrag_timeout_check:
  211. * @nss_cfg: nss configuration
  212. * @tx_flow_stop_queue_threshold:
  213. * @tx_flow_start_queue_offset:
  214. * @rx_defrag_min_timeout: rx defrag minimum timeout
  215. * @reo_dst_ring_size:
  216. * @wbm_release_ring: wbm release ring size
  217. * @tcl_cmd_credit_ring: tcl command/credit ring size
  218. * @tcl_status_ring: tcl status ring size
  219. * @reo_reinject_ring: reo reinject ring
  220. * @rx_release_ring: rx release ring size
  221. * @reo_exception_ring: reo exception ring size
  222. * @reo_cmd_ring: reo cmd ring size
  223. * @reo_status_ring: reo status ting size
  224. * @rxdma_refill_ring: rxdma refill ring size
  225. * @rxdma_refill_lt_disable: rxdma refill low threshold disable
  226. * @rxdma_err_dst_ring: rxdma error destination ring size
  227. * @per_pkt_trace:
  228. * @raw_mode_war: enable/disable raw mode war
  229. * @enable_data_stall_detection: enable/disable specific data stall detection
  230. * @disable_intra_bss_fwd: flag to disable intra bss forwarding
  231. * @rxdma1_enable: flag to indicate if rxdma1 is enabled
  232. * @delay_mon_replenish: delay monitor buffer replenish
  233. * @max_ast_idx:
  234. * @tx_desc_limit_0: tx_desc limit for 5 GHz High
  235. * @tx_desc_limit_1: tx_desc limit for 2 GHz
  236. * @tx_desc_limit_2: tx_desc limit for 5 GHz Low
  237. * @tx_device_limit: tx device limit
  238. * @tx_spl_device_limit: tx device limit for special frames
  239. * @tx_sw_internode_queue: tx sw internode queue
  240. * @mon_drop_thresh:
  241. * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop
  242. * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop
  243. * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates
  244. * @rx_enable_eol_data_check: flag to enable check for more ring data at end of
  245. * dp_rx_process loop
  246. * @tx_comp_enable_eol_data_check: flag to enable/disable checking for more data
  247. * at end of tx_comp_handler loop.
  248. * @rx_sw_desc_weight: rx sw descriptor weight configuration
  249. * @rx_sw_desc_num:
  250. * @is_rx_mon_protocol_flow_tag_enabled: flag to enable/disable RX protocol or
  251. * flow tagging in monitor/mon-lite mode
  252. * @is_rx_flow_tag_enabled: flag to enable/disable RX flow tagging using FSE
  253. * @is_rx_flow_search_table_per_pdev: flag to indicate if a per-SOC or per-pdev
  254. * table should be used
  255. * @rx_flow_search_table_size: indicates the number of flows in the flow search
  256. * table
  257. * @rx_flow_max_search: max skid length for each hash entry
  258. * @rx_toeplitz_hash_key: toeplitz key pointer used for hash computation over
  259. * 5 tuple flow entry
  260. * @pktlog_buffer_size: packet log buffer size
  261. * @is_rx_fisa_enabled: flag to enable/disable FISA Rx
  262. * @is_rx_fisa_lru_del_enabled:
  263. * @is_tso_desc_attach_defer:
  264. * @delayed_replenish_entries:
  265. * @reo_rings_mapping:
  266. * @pext_stats_enabled: Flag to enable and disabled peer extended stats
  267. * @is_rx_buff_pool_enabled: flag to enable/disable emergency RX buffer
  268. * pool support
  269. * @is_rx_refill_buff_pool_enabled: flag to enable/disable RX refill buffer
  270. * pool support
  271. * @rx_pending_high_threshold: threshold of starting pkt drop
  272. * @rx_pending_low_threshold: threshold of stopping pkt drop
  273. * @is_poll_mode_enabled:
  274. * @is_swlm_enabled: flag to enable/disable SWLM
  275. * @fst_in_cmem:
  276. * @tx_per_pkt_vdev_id_check: Enable tx perpkt vdev id check
  277. * @radio0_rx_default_reo:
  278. * @radio1_rx_default_reo:
  279. * @radio2_rx_default_reo:
  280. * @wow_check_rx_pending_enable: Enable RX frame pending check in WoW
  281. * @jitter_stats_enabled: true if jitter stats are enabled
  282. * @peer_link_stats_enabled: true if MLO Peer Link stats are enabled
  283. * @ipa_tx_ring_size: IPA tx ring size
  284. * @ipa_tx_comp_ring_size: IPA tx completion ring size
  285. * @ipa_tx_alt_ring_size: IPA tx alt ring size
  286. * @ipa_tx_alt_comp_ring_size: IPA tx alt completion ring size
  287. * @hw_cc_enabled: cookie conversion enabled
  288. * @tcl_wbm_map_array: TCL-WBM map array
  289. * @ppeds_enable: Enable PPE Direct Switch feature
  290. * @reo2ppe_ring: REO2PPE ring size
  291. * @ppe2tcl_ring: PPE2TCL ring size
  292. * @ppeds_num_tx_desc: Number of tx descs for PPE DS
  293. * @ppeds_tx_comp_napi_budget: Napi budget for tx completions
  294. * @ppeds_tx_desc_hotlist_len: PPE DS tx desc hotlist max length
  295. * @pkt_capture_mode: Packet capture mode config
  296. * @rx_mon_buf_ring_size: Rx monitor buf ring size
  297. * @tx_mon_buf_ring_size: Tx monitor buf ring size
  298. * @rx_rel_wbm2sw_ring_id: Rx WBM2SW ring id
  299. * @tx_rings_grp_bitmap: bitmap of group intr contexts which have
  300. * non-zero tx ring mask
  301. * @mlo_chip_rx_ring_map: map of chip_id to rx ring map
  302. * @vdev_stats_hw_offload_config: HW vdev stats config
  303. * @vdev_stats_hw_offload_timer: HW vdev stats timer duration
  304. * @num_rxdma_dst_rings_per_pdev: Number of Rx DMA rings per pdev
  305. * @txmon_hw_support: TxMON HW support
  306. * @txmon_sw_peer_filtering: TxMON sw peer filtering support
  307. * @num_rxdma_status_rings_per_pdev: Num RXDMA status rings
  308. * @tx_capt_max_mem_allowed: Max memory for Tx packet capture
  309. * @sawf_enabled: Is SAWF enabled
  310. * @sawf_stats: SAWF Statistics
  311. * @mpdu_retry_threshold_1: MPDU retry threshold 1 to increment tx bad count
  312. * @mpdu_retry_threshold_2: MPDU retry threshold 2 to increment tx bad count
  313. * @napi_scale_factor: scaling factor to be used for napi polls
  314. * @notify_frame_support: flag indicating capability to mark notify frames
  315. * @is_handle_invalid_decap_type_disabled: flag to indicate if invalid decap
  316. * type handling is disabled
  317. * @tx_pkt_inspect_for_ilp: flag to indicate if TX packet inspection for HW
  318. * based ILP feature is enabled
  319. * @pointer_timer_threshold_rx: RX REO2SW ring pointer update timer threshold
  320. * @pointer_num_threshold_rx: RX REO2SW ring pointer update entries threshold
  321. */
  322. struct wlan_cfg_dp_soc_ctxt {
  323. int num_int_ctxts;
  324. int max_clients;
  325. int max_alloc_size;
  326. int per_pdev_tx_ring;
  327. int num_tx_comp_rings;
  328. int num_tcl_data_rings;
  329. int num_nss_tcl_data_rings;
  330. int per_pdev_rx_ring;
  331. int per_pdev_lmac_ring;
  332. int num_reo_dest_rings;
  333. int num_nss_reo_dest_rings;
  334. int num_tx_desc_pool;
  335. int num_tx_ext_desc_pool;
  336. int num_global_tx_desc;
  337. int num_global_spcl_tx_desc;
  338. int num_tx_desc;
  339. int num_tx_spl_desc;
  340. int min_tx_desc;
  341. int num_tx_ext_desc;
  342. int max_peer_id;
  343. int htt_packet_type;
  344. int int_batch_threshold_ppe2tcl;
  345. int int_timer_threshold_ppe2tcl;
  346. int int_batch_threshold_tx;
  347. int int_timer_threshold_tx;
  348. int int_batch_threshold_rx;
  349. int int_timer_threshold_rx;
  350. int int_batch_threshold_other;
  351. int int_timer_threshold_other;
  352. int int_timer_threshold_mon;
  353. int tx_ring_size;
  354. int time_control_bp;
  355. int tx_comp_ring_size;
  356. int tx_comp_ring_size_nss;
  357. uint8_t int_tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  358. uint8_t int_rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  359. uint8_t int_rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  360. uint8_t int_tx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  361. uint8_t int_host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  362. uint8_t int_rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  363. uint8_t int_ce_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  364. uint8_t int_rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  365. uint8_t int_rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  366. uint8_t int_reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  367. uint8_t int_rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  368. uint8_t int_host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  369. uint8_t int_rx_ring_near_full_irq_1_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  370. uint8_t int_rx_ring_near_full_irq_2_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  371. uint8_t int_tx_ring_near_full_irq_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  372. uint8_t int_host2txmon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  373. uint8_t int_ppeds_wbm_release_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  374. uint8_t int_ppe2tcl_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  375. uint8_t int_reo2ppe_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  376. uint8_t int_umac_reset_intr_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  377. int hw_macid[MAX_PDEV_CNT];
  378. int hw_macid_pdev_id_map[MAX_NUM_LMAC_HW];
  379. int base_hw_macid;
  380. bool rx_hash;
  381. bool tso_enabled;
  382. bool lro_enabled;
  383. bool sg_enabled;
  384. bool gro_enabled;
  385. bool tc_based_dynamic_gro;
  386. uint32_t tc_ingress_prio;
  387. bool ipa_enabled;
  388. bool ol_tx_csum_enabled;
  389. bool ol_rx_csum_enabled;
  390. bool rawmode_enabled;
  391. bool peer_flow_ctrl_enabled;
  392. bool napi_enabled;
  393. bool p2p_tcp_udp_checksumoffload;
  394. bool nan_tcp_udp_checksumoffload;
  395. bool tcp_udp_checksumoffload;
  396. bool legacy_mode_checksumoffload_disable;
  397. bool defrag_timeout_check;
  398. int nss_cfg;
  399. uint32_t tx_flow_stop_queue_threshold;
  400. uint32_t tx_flow_start_queue_offset;
  401. int rx_defrag_min_timeout;
  402. int reo_dst_ring_size;
  403. int wbm_release_ring;
  404. int tcl_cmd_credit_ring;
  405. int tcl_status_ring;
  406. int reo_reinject_ring;
  407. int rx_release_ring;
  408. int reo_exception_ring;
  409. int reo_cmd_ring;
  410. int reo_status_ring;
  411. int rxdma_refill_ring;
  412. bool rxdma_refill_lt_disable;
  413. int rxdma_err_dst_ring;
  414. uint32_t per_pkt_trace;
  415. bool raw_mode_war;
  416. uint32_t enable_data_stall_detection;
  417. bool disable_intra_bss_fwd;
  418. bool rxdma1_enable;
  419. bool delay_mon_replenish;
  420. int max_ast_idx;
  421. int tx_desc_limit_0;
  422. int tx_desc_limit_1;
  423. int tx_desc_limit_2;
  424. int tx_device_limit;
  425. int tx_spl_device_limit;
  426. int tx_sw_internode_queue;
  427. int mon_drop_thresh;
  428. #ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT
  429. uint32_t tx_comp_loop_pkt_limit;
  430. uint32_t rx_reap_loop_pkt_limit;
  431. uint32_t rx_hp_oos_update_limit;
  432. bool rx_enable_eol_data_check;
  433. bool tx_comp_enable_eol_data_check;
  434. #endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */
  435. int rx_sw_desc_weight;
  436. int rx_sw_desc_num;
  437. bool is_rx_mon_protocol_flow_tag_enabled;
  438. bool is_rx_flow_tag_enabled;
  439. bool is_rx_flow_search_table_per_pdev;
  440. uint16_t rx_flow_search_table_size;
  441. uint16_t rx_flow_max_search;
  442. uint8_t *rx_toeplitz_hash_key;
  443. uint8_t pktlog_buffer_size;
  444. uint8_t is_rx_fisa_enabled;
  445. bool is_rx_fisa_lru_del_enabled;
  446. bool is_tso_desc_attach_defer;
  447. uint32_t delayed_replenish_entries;
  448. uint32_t reo_rings_mapping;
  449. bool pext_stats_enabled;
  450. bool is_rx_buff_pool_enabled;
  451. bool is_rx_refill_buff_pool_enabled;
  452. uint32_t rx_pending_high_threshold;
  453. uint32_t rx_pending_low_threshold;
  454. bool is_poll_mode_enabled;
  455. uint8_t is_swlm_enabled;
  456. bool fst_in_cmem;
  457. bool tx_per_pkt_vdev_id_check;
  458. uint8_t radio0_rx_default_reo;
  459. uint8_t radio1_rx_default_reo;
  460. uint8_t radio2_rx_default_reo;
  461. bool wow_check_rx_pending_enable;
  462. bool jitter_stats_enabled;
  463. bool peer_link_stats_enabled;
  464. #ifdef IPA_OFFLOAD
  465. uint32_t ipa_tx_ring_size;
  466. uint32_t ipa_tx_comp_ring_size;
  467. #ifdef IPA_WDI3_TX_TWO_PIPES
  468. int ipa_tx_alt_ring_size;
  469. int ipa_tx_alt_comp_ring_size;
  470. #endif /* IPA_WDI3_TX_TWO_PIPES */
  471. #endif /* IPA_OFFLOAD */
  472. bool hw_cc_enabled;
  473. struct wlan_cfg_tcl_wbm_ring_num_map *tcl_wbm_map_array;
  474. #ifdef WLAN_SUPPORT_PPEDS
  475. bool ppeds_enable;
  476. int reo2ppe_ring;
  477. int ppe2tcl_ring;
  478. int ppeds_num_tx_desc;
  479. int ppeds_tx_comp_napi_budget;
  480. int ppeds_tx_desc_hotlist_len;
  481. #endif
  482. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  483. uint32_t pkt_capture_mode;
  484. #endif
  485. uint32_t rx_mon_buf_ring_size;
  486. uint32_t tx_mon_buf_ring_size;
  487. uint8_t rx_rel_wbm2sw_ring_id;
  488. uint32_t tx_rings_grp_bitmap;
  489. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  490. uint8_t mlo_chip_rx_ring_map;
  491. #endif
  492. #ifdef QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT
  493. bool vdev_stats_hw_offload_config;
  494. int vdev_stats_hw_offload_timer;
  495. #endif
  496. uint8_t num_rxdma_dst_rings_per_pdev;
  497. bool txmon_hw_support;
  498. bool txmon_sw_peer_filtering;
  499. uint8_t num_rxdma_status_rings_per_pdev;
  500. #ifdef WLAN_TX_PKT_CAPTURE_ENH
  501. uint32_t tx_capt_max_mem_allowed;
  502. #endif
  503. #ifdef CONFIG_SAWF
  504. bool sawf_enabled;
  505. #endif
  506. #ifdef CONFIG_SAWF_STATS
  507. uint8_t sawf_stats;
  508. #endif
  509. uint8_t mpdu_retry_threshold_1;
  510. uint8_t mpdu_retry_threshold_2;
  511. uint8_t napi_scale_factor;
  512. uint8_t notify_frame_support;
  513. bool is_handle_invalid_decap_type_disabled;
  514. #ifdef DP_TX_PACKET_INSPECT_FOR_ILP
  515. bool tx_pkt_inspect_for_ilp;
  516. #endif
  517. uint16_t pointer_timer_threshold_rx;
  518. uint8_t pointer_num_threshold_rx;
  519. };
  520. /**
  521. * struct wlan_cfg_dp_pdev_ctxt - Configuration parameters for pdev (radio)
  522. * @rx_dma_buf_ring_size: Size of RxDMA buffer ring
  523. * @dma_mon_buf_ring_size: Size of RxDMA Monitor buffer ring
  524. * @dma_rx_mon_dest_ring_size: Size of RxDMA Monitor Destination ring
  525. * @dma_tx_mon_dest_ring_size: Size of Tx Monitor Destination ring
  526. * @dma_mon_status_ring_size: Size of RxDMA Monitor Status ring
  527. * @rxdma_monitor_desc_ring: rxdma monitor desc ring size
  528. * @num_mac_rings: Number of mac rings
  529. * @nss_enabled: 1 - NSS enabled, 0 - NSS disabled
  530. * @dma_tx_mon_buf_ring_size: Tx monitor BUF Ring size
  531. */
  532. struct wlan_cfg_dp_pdev_ctxt {
  533. int rx_dma_buf_ring_size;
  534. int dma_mon_buf_ring_size;
  535. int dma_rx_mon_dest_ring_size;
  536. int dma_tx_mon_dest_ring_size;
  537. int dma_mon_status_ring_size;
  538. int rxdma_monitor_desc_ring;
  539. int num_mac_rings;
  540. int nss_enabled;
  541. int dma_tx_mon_buf_ring_size;
  542. };
  543. /**
  544. * struct wlan_dp_prealloc_cfg - DP prealloc related config
  545. * @num_tx_ring_entries: num of tcl data ring entries
  546. * @num_tx_comp_ring_entries: num of tx comp ring entries
  547. * @num_wbm_rel_ring_entries: num of wbm err ring entries
  548. * @num_rxdma_err_dst_ring_entries: num of rxdma err ring entries
  549. * @num_reo_exception_ring_entries: num of rx exception ring entries
  550. * @num_tx_desc: num of tx descriptors
  551. * @num_tx_ext_desc: num of tx ext descriptors
  552. * @num_reo_dst_ring_entries: Number of entries in REO destination ring
  553. * @num_rxdma_buf_ring_entries: Number of entries in rxdma buf ring
  554. * @num_rxdma_refill_ring_entries: Number of entries in rxdma refill ring
  555. * @num_reo_status_ring_entries: Number of entries in REO status ring
  556. * @num_mon_status_ring_entries: Number of entries in monitor status ring
  557. */
  558. struct wlan_dp_prealloc_cfg {
  559. int num_tx_ring_entries;
  560. int num_tx_comp_ring_entries;
  561. int num_wbm_rel_ring_entries;
  562. int num_rxdma_err_dst_ring_entries;
  563. int num_reo_exception_ring_entries;
  564. int num_tx_desc;
  565. int num_tx_ext_desc;
  566. int num_reo_dst_ring_entries;
  567. int num_rxdma_buf_ring_entries;
  568. int num_rxdma_refill_ring_entries;
  569. int num_reo_status_ring_entries;
  570. int num_mon_status_ring_entries;
  571. };
  572. /**
  573. * wlan_cfg_soc_attach() - Attach configuration interface for SoC
  574. * @psoc: PSOC object
  575. *
  576. * Allocates context for Soc configuration parameters,
  577. * Read configuration information from device tree/ini file and
  578. * returns back handle
  579. *
  580. * Return: Handle to configuration context
  581. */
  582. struct wlan_cfg_dp_soc_ctxt *
  583. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc);
  584. /**
  585. * wlan_cfg_soc_detach() - Detach soc configuration handle
  586. * @wlan_cfg_ctx: soc configuration handle
  587. *
  588. * De-allocates memory allocated for SoC configuration
  589. *
  590. * Return:none
  591. */
  592. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  593. /**
  594. * wlan_cfg_pdev_attach() - Attach configuration interface for pdev
  595. * @ctrl_obj: PSOC object
  596. *
  597. * Allocates context for pdev configuration parameters,
  598. * Read configuration information from device tree/ini file and
  599. * returns back handle
  600. *
  601. * Return: Handle to configuration context
  602. */
  603. struct wlan_cfg_dp_pdev_ctxt *
  604. wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
  605. /**
  606. * wlan_cfg_pdev_detach() - Detach and free pdev configuration handle
  607. * @wlan_cfg_pdev_ctx: PDEV Configuration Handle
  608. *
  609. * Return: void
  610. */
  611. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  612. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num);
  613. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  614. int context, int mask);
  615. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  616. int context, int mask);
  617. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  618. int context, int mask);
  619. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  620. int context, int mask);
  621. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  622. int mask);
  623. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
  624. void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
  625. int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg);
  626. int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg);
  627. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  628. int context, int mask);
  629. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  630. int context, int mask);
  631. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  632. int context, int mask);
  633. /**
  634. * wlan_cfg_set_mon_delayed_replenish_entries() - number of buffers to replenish
  635. * for monitor buffer ring at initialization
  636. * @wlan_cfg_ctx: Configuration Handle
  637. * @replenish_entries: number of entries to replenish at initialization
  638. *
  639. */
  640. void wlan_cfg_set_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
  641. *wlan_cfg_ctx,
  642. uint32_t replenish_entries);
  643. /**
  644. * wlan_cfg_get_mon_delayed_replenish_entries() - get num of buffer to replenish
  645. * for monitor buffer ring at initialization
  646. * @wlan_cfg_ctx: Configuration Handle
  647. *
  648. * Return: delayed_replenish_entries;
  649. */
  650. int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
  651. *wlan_cfg_ctx);
  652. /**
  653. * wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered
  654. * @wlan_cfg_ctx: Configuration Handle
  655. *
  656. * For WIN, DP_NUM_INTERRUPT_CONTEXTS will be equal to number of CPU cores.
  657. * Each context (for linux it is a NAPI context) will have a tx_ring_mask,
  658. * rx_ring_mask ,and rx_monitor_ring mask to indicate the rings
  659. * that are processed by the handler.
  660. *
  661. * Return: num_contexts
  662. */
  663. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  664. /**
  665. * wlan_cfg_get_tx_ring_mask() - Return Tx interrupt mask mapped to an
  666. * interrupt context
  667. * @wlan_cfg_ctx: Configuration Handle
  668. * @context: Numerical ID identifying the Interrupt/NAPI context
  669. *
  670. * Return: int_tx_ring_mask[context]
  671. */
  672. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  673. int context);
  674. /**
  675. * wlan_cfg_get_tcl_wbm_ring_num_for_index() - Get TCL/WBM ring number for index
  676. * @wlan_cfg_ctx: Configuration Handle
  677. * @index: index for which TCL/WBM ring numbers are needed
  678. * @tcl: pointer to TCL ring number, to be filled
  679. * @wbm: pointer to WBM ring number to be filled
  680. *
  681. * The function fills in tcl/wbm input pointers with TCL/WBM ring numbers for a
  682. * given index corresponding to soc->tcl_data_ring or soc->tx_comp_ring. This
  683. * is needed since WBM/TCL rings may not be sequentially available for HOST
  684. * to use. The function returns values as stored in tcl_wbm_map_array global
  685. * array.
  686. *
  687. * Return: None
  688. */
  689. static inline
  690. void wlan_cfg_get_tcl_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  691. int index, int *tcl, int *wbm)
  692. {
  693. *tcl = wlan_cfg_ctx->tcl_wbm_map_array[index].tcl_ring_num;
  694. *wbm = wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_ring_num;
  695. }
  696. /**
  697. * wlan_cfg_get_wbm_ring_num_for_index() - Get WBM ring number for index
  698. * @wlan_cfg_ctx: Configuration Handle
  699. * @index: index for which WBM ring numbers is needed
  700. *
  701. * Return: WBM Ring number for the index
  702. */
  703. static inline
  704. int wlan_cfg_get_wbm_ring_num_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  705. int index)
  706. {
  707. return wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_ring_num;
  708. }
  709. /**
  710. * wlan_cfg_get_rbm_id_for_index() - Get WBM RBM ID for TX ring index
  711. * @wlan_cfg_ctx: Configuration Handle
  712. * @index: TCL index for which WBM rbm value is needed
  713. *
  714. * The function fills in wbm rbm value corresponding to a TX ring index in
  715. * soc->tcl_data_ring. This is needed since WBM ring numbers donot map
  716. * sequentially to wbm rbm values.
  717. * The function returns rbm id values as stored in tcl_wbm_map_array global
  718. * array.
  719. *
  720. * Return: WBM rbm value corresnponding to TX ring index
  721. */
  722. static inline
  723. int wlan_cfg_get_rbm_id_for_index(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, int index)
  724. {
  725. return wlan_cfg_ctx->tcl_wbm_map_array[index].wbm_rbm_id;
  726. }
  727. /**
  728. * wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an
  729. * interrupt context
  730. * @wlan_cfg_ctx: Configuration Handle
  731. * @context: Numerical ID identifying the Interrupt/NAPI context
  732. *
  733. * Return: int_rx_ring_mask[context]
  734. */
  735. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  736. int context);
  737. /**
  738. * wlan_cfg_get_rx_mon_ring_mask() - Return Rx monitor ring interrupt mask
  739. * mapped to an interrupt context
  740. * @wlan_cfg_ctx: Configuration Handle
  741. * @context: Numerical ID identifying the Interrupt/NAPI context
  742. *
  743. * Return: int_rx_mon_ring_mask[context]
  744. */
  745. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  746. int context);
  747. /**
  748. * wlan_cfg_set_tx_mon_ring_mask() - Set Tx monitor ring interrupt mask
  749. * mapped to an interrupt context
  750. * @cfg: Configuration Handle
  751. * @context: Numerical ID identifying the Interrupt/NAPI context
  752. * @mask: Interrupt mask
  753. *
  754. * Return: None
  755. */
  756. void wlan_cfg_set_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  757. int context, int mask);
  758. /**
  759. * wlan_cfg_get_tx_mon_ring_mask() - Return Tx monitor ring interrupt mask
  760. * mapped to an interrupt context
  761. * @wlan_cfg_ctx: Configuration Handle
  762. * @context: Numerical ID identifying the Interrupt/NAPI context
  763. *
  764. * Return: int_tx_mon_ring_mask[context]
  765. */
  766. int wlan_cfg_get_tx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  767. int context);
  768. /**
  769. * wlan_cfg_set_rxdma2host_ring_mask() - Set rxdma2host ring interrupt mask
  770. * for the given interrupt context
  771. * @cfg: Configuration Handle
  772. * @context: Numerical ID identifying the Interrupt/NAPI context
  773. * @mask: Interrupt mask
  774. *
  775. */
  776. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  777. int context, int mask);
  778. /**
  779. * wlan_cfg_get_rxdma2host_ring_mask() - Return rxdma2host ring interrupt mask
  780. * mapped to an interrupt context
  781. * @cfg: Configuration Handle
  782. * @context: Numerical ID identifying the Interrupt/NAPI context
  783. *
  784. * Return: int_rxdma2host_ring_mask[context]
  785. */
  786. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  787. int context);
  788. /**
  789. * wlan_cfg_set_host2rxdma_ring_mask() - Set host2rxdma ring interrupt mask
  790. * for the given interrupt context
  791. * @cfg: Configuration Handle
  792. * @context: Numerical ID identifying the Interrupt/NAPI context
  793. * @mask: Interrupt mask
  794. *
  795. */
  796. void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  797. int context, int mask);
  798. /**
  799. * wlan_cfg_get_host2rxdma_ring_mask() - Return host2rxdma ring interrupt mask
  800. * mapped to an interrupt context
  801. * @cfg: Configuration Handle
  802. * @context: Numerical ID identifying the Interrupt/NAPI context
  803. *
  804. * Return: int_host2rxdma_ring_mask[context]
  805. */
  806. int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  807. int context);
  808. /**
  809. * wlan_cfg_get_rx_near_full_grp_1_mask() - Return REO near full interrupt mask
  810. * mapped to an interrupt context
  811. * @cfg: Configuration Handle
  812. * @context: Numerical ID identifying the Interrupt/NAPI context
  813. *
  814. * Return: REO near full interrupt mask[context]
  815. */
  816. int wlan_cfg_get_rx_near_full_grp_1_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  817. int context);
  818. /**
  819. * wlan_cfg_get_rx_near_full_grp_2_mask() - Return REO near full interrupt mask
  820. * mapped to an interrupt context
  821. * @cfg: Configuration Handle
  822. * @context: Numerical ID identifying the Interrupt/NAPI context
  823. *
  824. * Return: REO near full interrupt mask[context]
  825. */
  826. int wlan_cfg_get_rx_near_full_grp_2_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  827. int context);
  828. /**
  829. * wlan_cfg_get_tx_ring_near_full_mask() - Return tx completion ring near full
  830. * interrupt mask mapped to an interrupt context
  831. * @cfg: Configuration Handle
  832. * @context: Numerical ID identifying the Interrupt/NAPI context
  833. *
  834. * Return: tx completion near full interrupt mask[context]
  835. */
  836. int wlan_cfg_get_tx_ring_near_full_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  837. int context);
  838. /**
  839. * wlan_cfg_set_host2rxdma_mon_ring_mask() - Set host2rxdma monitor ring
  840. * interrupt mask for the given interrupt context
  841. * @cfg: Configuration Handle
  842. * @context: Numerical ID identifying the Interrupt/NAPI context
  843. * @mask: Interrupt mask
  844. *
  845. */
  846. void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  847. int context, int mask);
  848. /**
  849. * wlan_cfg_get_host2rxdma_mon_ring_mask() - Return host2rxdma monitoe ring
  850. * interrupt mask mapped to an interrupt context
  851. * @cfg: Configuration Handle
  852. * @context: Numerical ID identifying the Interrupt/NAPI context
  853. *
  854. * Return: int_host2rxdma_mon_ring_mask[context]
  855. */
  856. int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  857. int context);
  858. /**
  859. * wlan_cfg_set_rxdma2host_mon_ring_mask() - Set rxdma2host monitor
  860. * destination ring interrupt mask
  861. * for the given interrupt context
  862. * @cfg: Configuration Handle
  863. * @context: Numerical ID identifying the Interrupt/NAPI context
  864. * @mask: Interrupt mask
  865. *
  866. */
  867. void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  868. int context, int mask);
  869. /**
  870. * wlan_cfg_get_rxdma2host_mon_ring_mask() - Return rxdma2host monitor
  871. * destination ring interrupt mask
  872. * mapped to an interrupt context
  873. * @cfg: Configuration Handle
  874. * @context: Numerical ID identifying the Interrupt/NAPI context
  875. *
  876. * Return: int_rxdma2host_mon_ring_mask[context]
  877. */
  878. int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  879. int context);
  880. /**
  881. * wlan_cfg_set_hw_mac_idx() - Set HW MAC Idx for the given PDEV index
  882. *
  883. * @cfg: Configuration Handle
  884. * @pdev_idx: Index of SW PDEV
  885. * @hw_macid: HW MAC Id
  886. *
  887. */
  888. void wlan_cfg_set_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg,
  889. int pdev_idx, int hw_macid);
  890. /**
  891. * wlan_cfg_get_hw_mac_idx() - Get 0 based HW MAC index for the given
  892. * PDEV index
  893. *
  894. * @cfg: Configuration Handle
  895. * @pdev_idx: Index of SW PDEV
  896. *
  897. * Return: HW MAC index
  898. */
  899. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
  900. /**
  901. * wlan_cfg_get_target_pdev_id() - Get target PDEV ID for HW MAC ID
  902. *
  903. * @cfg: Configuration Handle
  904. * @hw_macid: Index of hw mac
  905. *
  906. * Return: PDEV ID
  907. */
  908. int
  909. wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
  910. /**
  911. * wlan_cfg_set_pdev_idx() - Set 0 based host PDEV index for the given
  912. * hw mac index
  913. *
  914. * @cfg: Configuration Handle
  915. * @pdev_idx: Index of SW PDEV
  916. * @hw_macid: Index of hw mac
  917. *
  918. * Return: PDEV index
  919. */
  920. void wlan_cfg_set_pdev_idx
  921. (struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, int hw_macid);
  922. /**
  923. * wlan_cfg_get_pdev_idx() - Get 0 based PDEV index for the given
  924. * hw mac index
  925. *
  926. * @cfg: Configuration Handle
  927. * @hw_macid: Index of hw mac
  928. *
  929. * Return: PDEV index
  930. */
  931. int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
  932. /**
  933. * wlan_cfg_get_rx_err_ring_mask() - Return Rx monitor ring interrupt mask
  934. * mapped to an interrupt context
  935. * @cfg: Configuration Handle
  936. * @context: Numerical ID identifying the Interrupt/NAPI context
  937. *
  938. * Return: int_rx_err_ring_mask[context]
  939. */
  940. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  941. context);
  942. /**
  943. * wlan_cfg_get_rx_wbm_rel_ring_mask() - Return Rx monitor ring interrupt mask
  944. * mapped to an interrupt context
  945. * @cfg: Configuration Handle
  946. * @context: Numerical ID identifying the Interrupt/NAPI context
  947. *
  948. * Return: int_wbm_rel_ring_mask[context]
  949. */
  950. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  951. context);
  952. /**
  953. * wlan_cfg_get_reo_status_ring_mask() - Return Rx monitor ring interrupt mask
  954. * mapped to an interrupt context
  955. * @cfg: Configuration Handle
  956. * @context: Numerical ID identifying the Interrupt/NAPI context
  957. *
  958. * Return: int_reo_status_ring_mask[context]
  959. */
  960. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  961. context);
  962. /**
  963. * wlan_cfg_get_ce_ring_mask() - Return CE ring interrupt mask
  964. * mapped to an interrupt context
  965. * @wlan_cfg_ctx: Configuration Handle
  966. * @context: Numerical ID identifying the Interrupt/NAPI context
  967. *
  968. * Return: int_ce_ring_mask[context]
  969. */
  970. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  971. int context);
  972. /**
  973. * wlan_cfg_get_umac_reset_intr_mask() - Get UMAC reset interrupt mask
  974. * mapped to an interrupt context
  975. * @cfg: Configuration Handle
  976. * @context: Numerical ID identifying the Interrupt/NAPI context
  977. *
  978. * Return: int_umac_reset_intr_mask[context]
  979. */
  980. int wlan_cfg_get_umac_reset_intr_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  981. int context);
  982. /**
  983. * wlan_cfg_get_max_clients() - Return maximum number of peers/stations
  984. * supported by device
  985. * @wlan_cfg_ctx: Configuration Handle
  986. *
  987. * Return: max_clients
  988. */
  989. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  990. /**
  991. * wlan_cfg_max_alloc_size() - Return Maximum allocation size for any dynamic
  992. * memory allocation request for this device
  993. * @wlan_cfg_ctx: Configuration Handle
  994. *
  995. * Return: max_alloc_size
  996. */
  997. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  998. /**
  999. * wlan_cfg_per_pdev_tx_ring() - Return true if Tx rings are mapped as
  1000. * one per radio
  1001. * @wlan_cfg_ctx: Configuration Handle
  1002. *
  1003. * Return: per_pdev_tx_ring
  1004. */
  1005. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1006. /**
  1007. * wlan_cfg_num_tx_comp_rings() - Number of Tx comp rings (HOST mode)
  1008. * @wlan_cfg_ctx: Configuration Handle
  1009. *
  1010. * Return: num_tx_comp_rings
  1011. */
  1012. int wlan_cfg_num_tx_comp_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1013. /**
  1014. * wlan_cfg_num_tcl_data_rings() - Number of TCL Data rings (HOST mode)
  1015. * @wlan_cfg_ctx: Configuration Handle
  1016. *
  1017. * Return: num_tcl_data_rings
  1018. */
  1019. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1020. /**
  1021. * wlan_cfg_num_nss_tcl_data_rings() - Number of TCL Data rings (NSS offload)
  1022. * @wlan_cfg_ctx: Configuration Handle
  1023. *
  1024. * Return: num_tcl_data_rings
  1025. */
  1026. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1027. /**
  1028. * wlan_cfg_per_pdev_rx_ring() - Return true if Rx rings are mapped as
  1029. * one per radio
  1030. * @wlan_cfg_ctx: Configuration Handle
  1031. *
  1032. * Return: per_pdev_rx_ring
  1033. */
  1034. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1035. /**
  1036. * wlan_cfg_per_pdev_lmac_ring() - Return true if error rings are mapped as
  1037. * one per radio
  1038. * @wlan_cfg_ctx: Configuration Handle
  1039. *
  1040. * Return: return 1 if per pdev error ring else 0
  1041. */
  1042. int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1043. /**
  1044. * wlan_cfg_num_reo_dest_rings() - Number of REO Data rings (HOST mode)
  1045. * @wlan_cfg_ctx: Configuration Handle
  1046. *
  1047. * Return: num_reo_dest_rings
  1048. */
  1049. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1050. /**
  1051. * wlan_cfg_num_nss_reo_dest_rings() - Number of REO Data rings (NSS offload)
  1052. * @wlan_cfg_ctx: Configuration Handle
  1053. *
  1054. * Return: num_reo_dest_rings
  1055. */
  1056. int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1057. /**
  1058. * wlan_cfg_pkt_type() - Default 802.11 encapsulation type
  1059. * @wlan_cfg_ctx: Configuration Handle
  1060. *
  1061. * Return: htt_pkt_type_ethernet
  1062. */
  1063. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1064. /**
  1065. * wlan_cfg_get_num_tx_desc_pool() - Number of Tx Descriptor pools for the
  1066. * device
  1067. * @wlan_cfg_ctx: Configuration Handle
  1068. *
  1069. * Return: num_tx_desc_pool
  1070. */
  1071. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1072. /**
  1073. * wlan_cfg_set_num_tx_desc_pool() - Set the number of Tx Descriptor pools for the
  1074. * device
  1075. * @cfg: Configuration Handle
  1076. * @num_pool: Number of pool
  1077. */
  1078. void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
  1079. /**
  1080. * wlan_cfg_get_num_tx_ext_desc_pool() - Number of Tx MSDU ext Descriptor
  1081. * pools
  1082. * @wlan_cfg_ctx: Configuration Handle
  1083. *
  1084. * Return: num_tx_ext_desc_pool
  1085. */
  1086. int wlan_cfg_get_num_tx_ext_desc_pool(
  1087. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1088. /**
  1089. * wlan_cfg_get_reo_dst_ring_size() - Get REO destination ring size
  1090. *
  1091. * @cfg: Configuration Handle
  1092. *
  1093. * Return: reo_dst_ring_size
  1094. */
  1095. int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1096. /**
  1097. * wlan_cfg_set_reo_dst_ring_size() - Set the REO Destination ring size
  1098. *
  1099. * @cfg: Configuration Handle
  1100. * @reo_dst_ring_size: REO Destination ring size
  1101. */
  1102. void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  1103. int reo_dst_ring_size);
  1104. /**
  1105. * wlan_cfg_set_raw_mode_war() - Set raw mode war configuration
  1106. *
  1107. * @cfg: Configuration Handle
  1108. * @raw_mode_war: raw mode war configuration
  1109. */
  1110. void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
  1111. bool raw_mode_war);
  1112. /**
  1113. * wlan_cfg_get_raw_mode_war() - Get raw mode war configuration
  1114. *
  1115. * @cfg: Configuration Handle
  1116. *
  1117. * Return: reo_dst_ring_size
  1118. */
  1119. bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg);
  1120. /**
  1121. * wlan_cfg_set_num_tx_ext_desc_pool() - Set the number of Tx MSDU ext Descriptor
  1122. * pools
  1123. * @cfg: Configuration Handle
  1124. * @num_pool: Number of pool
  1125. */
  1126. void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
  1127. /**
  1128. * wlan_cfg_get_num_global_tx_desc() - Number of global Tx Descriptors allowed
  1129. * @wlan_cfg_ctx: Configuration Handle
  1130. *
  1131. * Return: num_global_tx_desc
  1132. */
  1133. int wlan_cfg_get_num_global_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1134. /**
  1135. * wlan_cfg_get_num_global_spcl_tx_desc() - Number of global special Tx Descriptors
  1136. * allowed
  1137. * @wlan_cfg_ctx: Configuration Handle
  1138. *
  1139. * Return: num_global_spcl_tx_desc
  1140. */
  1141. int wlan_cfg_get_num_global_spcl_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1142. /**
  1143. * wlan_cfg_get_num_tx_desc() - Number of Tx Descriptors per pool
  1144. * @wlan_cfg_ctx: Configuration Handle
  1145. *
  1146. * Return: num_tx_desc
  1147. */
  1148. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1149. /**
  1150. * wlan_cfg_get_num_tx_spl_desc() - Number of Tx Descriptors for special
  1151. * frames per pool
  1152. * @wlan_cfg_ctx: Configuration Handle
  1153. *
  1154. * Return: num_tx_desc
  1155. */
  1156. int wlan_cfg_get_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1157. /**
  1158. * wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool
  1159. * @wlan_cfg_ctx: Configuration Handle
  1160. *
  1161. * Return: num_tx_desc
  1162. */
  1163. int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1164. /**
  1165. * wlan_cfg_set_num_tx_desc() - Set the number of Tx Descriptors per pool
  1166. *
  1167. * @cfg: Configuration Handle
  1168. * @num_desc: Number of descriptor
  1169. */
  1170. void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc);
  1171. /**
  1172. * wlan_cfg_get_num_tx_ext_desc() - Number of Tx MSDU extension Descriptors
  1173. * per pool
  1174. * @wlan_cfg_ctx: Configuration Handle
  1175. *
  1176. * Return: num_tx_ext_desc
  1177. */
  1178. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1179. /**
  1180. * wlan_cfg_set_num_tx_ext_desc() - Set the number of Tx MSDU extension
  1181. * Descriptors per pool
  1182. * @cfg: Configuration Handle
  1183. * @num_ext_desc: Number of descriptor
  1184. */
  1185. void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg,
  1186. int num_ext_desc);
  1187. /**
  1188. * wlan_cfg_max_peer_id() - Get maximum peer ID
  1189. * @cfg: Configuration Handle
  1190. *
  1191. * Return: maximum peer ID
  1192. */
  1193. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg);
  1194. /**
  1195. * wlan_cfg_get_dma_mon_buf_ring_size(): Return Size of monitor buffer ring
  1196. * @wlan_cfg_pdev_ctx: pdev configuration context
  1197. *
  1198. * Return: dma_mon_buf_ring_size
  1199. */
  1200. int wlan_cfg_get_dma_mon_buf_ring_size(
  1201. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  1202. /**
  1203. * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring
  1204. * @wlan_cfg_pdev_ctx: pdev configuration context
  1205. *
  1206. * Return: dma_mon_stat_ring_size
  1207. */
  1208. int wlan_cfg_get_dma_mon_stat_ring_size(
  1209. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  1210. /**
  1211. * wlan_cfg_get_dma_mon_desc_ring_size - Get rxdma monitor size
  1212. * @cfg: soc configuration context
  1213. *
  1214. * Return: rxdma monitor desc ring size
  1215. */
  1216. int
  1217. wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
  1218. /**
  1219. * wlan_cfg_get_rx_dma_buf_ring_size() - Return Size of RxDMA buffer ring
  1220. * @wlan_cfg_pdev_ctx: pdev configuration context
  1221. *
  1222. * Return: rx_dma_buf_ring_size
  1223. */
  1224. int wlan_cfg_get_rx_dma_buf_ring_size(
  1225. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  1226. /**
  1227. * wlan_cfg_rx_pending_hl_threshold() - Return high threshold of rx pending
  1228. * @cfg: pdev configuration context
  1229. *
  1230. * Return: rx_pending_high_threshold
  1231. */
  1232. uint32_t
  1233. wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
  1234. /**
  1235. * wlan_cfg_rx_pending_lo_threshold() - Return low threshold of rx pending
  1236. * @cfg: soc configuration context
  1237. *
  1238. * Return: rx_pending_low_threshold
  1239. */
  1240. uint32_t
  1241. wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
  1242. /**
  1243. * wlan_cfg_get_num_mac_rings() - Return the number of MAC RX DMA rings
  1244. * per pdev
  1245. * @cfg: pdev configuration context
  1246. *
  1247. * Return: number of mac DMA rings per pdev
  1248. */
  1249. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg);
  1250. /**
  1251. * wlan_cfg_is_lro_enabled - Return LRO enabled/disabled
  1252. * @cfg: soc configuration context
  1253. *
  1254. * Return: true - LRO enabled false - LRO disabled
  1255. */
  1256. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1257. /**
  1258. * wlan_cfg_is_gro_enabled - Return GRO enabled/disabled
  1259. * @cfg: soc configuration context
  1260. *
  1261. * Return: true - GRO enabled false - GRO disabled
  1262. */
  1263. bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1264. /**
  1265. * wlan_cfg_is_rx_hash_enabled - Return RX hash enabled/disabled
  1266. * @cfg: soc configuration context
  1267. *
  1268. * Return: true - enabled false - disabled
  1269. */
  1270. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1271. /**
  1272. * wlan_cfg_is_ipa_enabled - Return IPA enabled/disabled
  1273. * @cfg: soc configuration context
  1274. *
  1275. * Return: true - enabled false - disabled
  1276. */
  1277. bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1278. /**
  1279. * wlan_cfg_set_rx_hash - set rx hash enabled/disabled
  1280. * @cfg: soc configuration context
  1281. * @rx_hash: true - enabled false - disabled
  1282. */
  1283. void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_hash);
  1284. /**
  1285. * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled
  1286. * @cfg: pdev configuration context
  1287. *
  1288. * Return: 1 - enabled 0 - disabled
  1289. */
  1290. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg);
  1291. /**
  1292. * wlan_cfg_set_dp_pdev_nss_enabled - set pdev nss enabled/disabled
  1293. * @cfg: pdev configuration context
  1294. * @nss_enabled: 1 - enabled 0 - disabled
  1295. */
  1296. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg,
  1297. int nss_enabled);
  1298. /**
  1299. * wlan_cfg_get_dp_soc_nss_cfg - Return soc nss config
  1300. * @cfg: soc configuration context
  1301. *
  1302. * Return: nss_cfg
  1303. */
  1304. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg);
  1305. /**
  1306. * wlan_cfg_set_dp_soc_nss_cfg - set soc nss config
  1307. * @cfg: soc configuration context
  1308. * @nss_cfg: NSS configuration
  1309. *
  1310. */
  1311. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg);
  1312. /**
  1313. * wlan_cfg_get_int_timer_threshold_ppe2tcl - Get intr mitigation for ppe2tcl
  1314. * @cfg: soc configuration context
  1315. *
  1316. * Return: Timer threshold
  1317. */
  1318. int wlan_cfg_get_int_timer_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg);
  1319. /**
  1320. * wlan_cfg_get_int_batch_threshold_ppe2tcl - Get intr mitigation for ppe2tcl
  1321. * @cfg: soc configuration context
  1322. *
  1323. * Return: Batch threshold
  1324. */
  1325. int wlan_cfg_get_int_batch_threshold_ppe2tcl(struct wlan_cfg_dp_soc_ctxt *cfg);
  1326. /**
  1327. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for Tx
  1328. * @cfg: soc configuration context
  1329. *
  1330. * Return: Batch threshold
  1331. */
  1332. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  1333. /**
  1334. * wlan_cfg_get_int_timer_threshold_tx - Get interrupt mitigation cfg for Tx
  1335. * @cfg: soc configuration context
  1336. *
  1337. * Return: Timer threshold
  1338. */
  1339. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  1340. /**
  1341. * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
  1342. * @cfg: soc configuration context
  1343. *
  1344. * Return: Batch threshold
  1345. */
  1346. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  1347. /**
  1348. * wlan_cfg_get_int_timer_threshold_rx - Get interrupt mitigation cfg for Rx
  1349. * @cfg: soc configuration context
  1350. *
  1351. * Return: Timer threshold
  1352. */
  1353. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  1354. /**
  1355. * wlan_cfg_get_int_batch_threshold_other - Get interrupt mitigation cfg for
  1356. * other srngs
  1357. * @cfg: soc configuration context
  1358. *
  1359. * Return: Batch threshold
  1360. */
  1361. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  1362. /**
  1363. * wlan_cfg_get_int_timer_threshold_other - Get interrupt mitigation cfg for
  1364. * other srngs
  1365. * @cfg: soc configuration context
  1366. *
  1367. * Return: Timer threshold
  1368. */
  1369. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  1370. /**
  1371. * wlan_cfg_get_int_timer_threshold_mon - Get int mitigation cfg for mon srngs
  1372. * @cfg: soc configuration context
  1373. *
  1374. * Return: Timer threshold
  1375. */
  1376. int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg);
  1377. /**
  1378. * wlan_cfg_get_checksum_offload - Get checksum offload enable or disable status
  1379. * @cfg: soc configuration context
  1380. *
  1381. * Return: Checksum offload enable or disable
  1382. */
  1383. int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  1384. /**
  1385. * wlan_cfg_get_nan_checksum_offload - Get checksum offload enable/disable val
  1386. * @cfg: soc configuration context
  1387. *
  1388. * Return: Checksum offload enable or disable value for NAN mode
  1389. */
  1390. int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  1391. /**
  1392. * wlan_cfg_get_p2p_checksum_offload - Get checksum offload enable/disable val
  1393. * @cfg: soc configuration context
  1394. *
  1395. * Return: Checksum offload enable or disable value for P2P mode
  1396. */
  1397. int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  1398. /**
  1399. * wlan_cfg_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
  1400. * @cfg: soc configuration context
  1401. *
  1402. * Return: Tx Ring Size
  1403. */
  1404. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1405. /**
  1406. * wlan_cfg_time_control_bp - Get time for interval in bp prints
  1407. * @cfg: soc configuration context
  1408. *
  1409. * Return: interval time
  1410. */
  1411. int wlan_cfg_time_control_bp(struct wlan_cfg_dp_soc_ctxt *cfg);
  1412. /**
  1413. * wlan_cfg_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
  1414. * @cfg: soc configuration context
  1415. *
  1416. * Return: Tx Completion ring size
  1417. */
  1418. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1419. /**
  1420. * wlan_cfg_get_dp_soc_wbm_release_ring_size - Get wbm_release_ring size
  1421. * @cfg: soc configuration context
  1422. *
  1423. * Return: wbm_release_ring size
  1424. */
  1425. int
  1426. wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1427. /**
  1428. * wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size - Get command/credit ring size
  1429. * @cfg: soc configuration context
  1430. *
  1431. * Return: tcl_cmd_credit_ring size
  1432. */
  1433. int
  1434. wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1435. /**
  1436. * wlan_cfg_get_dp_soc_tcl_status_ring_size - Get tcl_status_ring size
  1437. * @cfg: soc configuration context
  1438. *
  1439. * Return: tcl_status_ring size
  1440. */
  1441. int
  1442. wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1443. /**
  1444. * wlan_cfg_get_dp_soc_reo_reinject_ring_size - Get reo_reinject_ring size
  1445. * @cfg: soc configuration context
  1446. *
  1447. * Return: reo_reinject_ring size
  1448. */
  1449. int
  1450. wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1451. /**
  1452. * wlan_cfg_get_dp_soc_rx_release_ring_size - Get rx_release_ring size
  1453. * @cfg: soc configuration context
  1454. *
  1455. * Return: rx_release_ring size
  1456. */
  1457. int
  1458. wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1459. /**
  1460. * wlan_cfg_get_dp_soc_reo_exception_ring_size - Get reo_exception_ring size
  1461. * @cfg: soc configuration context
  1462. *
  1463. * Return: reo_exception_ring size
  1464. */
  1465. int
  1466. wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1467. /**
  1468. * wlan_cfg_get_dp_soc_reo_cmd_ring_size - Get reo_cmd_ring size
  1469. * @cfg: soc configuration context
  1470. *
  1471. * Return: reo_cmd_ring size
  1472. */
  1473. int
  1474. wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1475. /**
  1476. * wlan_cfg_get_dp_soc_reo_status_ring_size - Get reo_status_ring size
  1477. * @cfg: soc configuration context
  1478. *
  1479. * Return: reo_status_ring size
  1480. */
  1481. int
  1482. wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1483. /**
  1484. * wlan_cfg_get_dp_soc_tx_desc_limit_0 - Get tx desc limit for 5G H
  1485. * @cfg: soc configuration context
  1486. *
  1487. * Return: tx desc limit for 5G H
  1488. */
  1489. int
  1490. wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg);
  1491. /**
  1492. * wlan_cfg_get_dp_soc_tx_desc_limit_1 - Get tx desc limit for 2G
  1493. * @cfg: soc configuration context
  1494. *
  1495. * Return: tx desc limit for 2G
  1496. */
  1497. int
  1498. wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg);
  1499. /**
  1500. * wlan_cfg_get_dp_soc_tx_desc_limit_2 - Get tx desc limit for 5G L
  1501. * @cfg: soc configuration context
  1502. *
  1503. * Return: tx desc limit for 5G L
  1504. */
  1505. int
  1506. wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg);
  1507. /**
  1508. * wlan_cfg_get_dp_soc_tx_device_limit - Get tx device limit
  1509. * @cfg: soc configuration context
  1510. *
  1511. * Return: tx device limit
  1512. */
  1513. int
  1514. wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
  1515. /**
  1516. * wlan_cfg_get_dp_soc_tx_spl_device_limit - Get tx device limit for special
  1517. * frames
  1518. * @cfg: Configuration Handle
  1519. *
  1520. * Return: tx device limit for special frames
  1521. */
  1522. int
  1523. wlan_cfg_get_dp_soc_tx_spl_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
  1524. /**
  1525. * wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue
  1526. * @cfg: soc configuration context
  1527. *
  1528. * Return: tx sw internode queue
  1529. */
  1530. int
  1531. wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg);
  1532. /**
  1533. * wlan_cfg_get_dp_soc_rxdma_refill_ring_size - Get rxdma refill ring size
  1534. * @cfg: soc configuration context
  1535. *
  1536. * Return: rxdma refill ring size
  1537. */
  1538. int
  1539. wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1540. /**
  1541. * wlan_cfg_get_dp_soc_rxdma_refill_lt_disable - Get RxDMA refill LT status
  1542. * @cfg: soc configuration context
  1543. *
  1544. * Return: true if Low threshold disable else false
  1545. */
  1546. bool
  1547. wlan_cfg_get_dp_soc_rxdma_refill_lt_disable(struct wlan_cfg_dp_soc_ctxt *cfg);
  1548. /**
  1549. * wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size - Get rxdma dst ring size
  1550. * @cfg: soc configuration context
  1551. *
  1552. * Return: rxdma error dst ring size
  1553. */
  1554. int
  1555. wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1556. /**
  1557. * wlan_cfg_get_dp_soc_rx_sw_desc_weight - Get rx sw desc weight
  1558. * @cfg: soc configuration context
  1559. *
  1560. * Return: rx_sw_desc_weight
  1561. */
  1562. int
  1563. wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg);
  1564. /**
  1565. * wlan_cfg_get_dp_soc_rx_sw_desc_num - Get rx sw desc num
  1566. * @cfg: soc configuration context
  1567. *
  1568. * Return: rx_sw_desc_num
  1569. */
  1570. int
  1571. wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg);
  1572. /**
  1573. * wlan_cfg_get_dp_caps - Get dp capabilities
  1574. * @cfg: soc configuration context
  1575. * @dp_caps: enum for dp capabilities
  1576. *
  1577. * Return: bool if a dp capabilities is enabled
  1578. */
  1579. bool
  1580. wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
  1581. enum cdp_capabilities dp_caps);
  1582. /**
  1583. * wlan_set_srng_cfg() - Fill per ring specific
  1584. * configuration parameters
  1585. * @wlan_cfg: global srng configuration table
  1586. *
  1587. * Return: None
  1588. */
  1589. void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg);
  1590. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  1591. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg);
  1592. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg);
  1593. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  1594. int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg);
  1595. int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg);
  1596. /**
  1597. * wlan_cfg_get_rx_flow_search_table_size() - Return the size of Rx FST
  1598. * in number of entries
  1599. *
  1600. * @cfg: soc configuration context
  1601. *
  1602. * Return: rx_fst_size
  1603. */
  1604. uint16_t
  1605. wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1606. /**
  1607. * wlan_cfg_rx_fst_get_max_search() - Return the max skid length for FST search
  1608. *
  1609. * @cfg: soc configuration context
  1610. *
  1611. * Return: max_search
  1612. */
  1613. uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg);
  1614. /**
  1615. * wlan_cfg_rx_fst_get_hash_key() - Return Toeplitz Hash Key used for FST
  1616. * search
  1617. *
  1618. * @cfg: soc configuration context
  1619. *
  1620. * Return: 320-bit Hash Key
  1621. */
  1622. uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg);
  1623. /**
  1624. * wlan_cfg_set_rx_flow_tag_enabled() - set rx flow tag enabled flag in
  1625. * DP soc context
  1626. * @cfg: soc configuration context
  1627. * @val: Rx flow tag feature flag value
  1628. *
  1629. * Return: None
  1630. */
  1631. void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  1632. bool val);
  1633. /**
  1634. * wlan_cfg_is_rx_flow_tag_enabled() - get rx flow tag enabled flag from
  1635. * DP soc context
  1636. * @cfg: soc configuration context
  1637. *
  1638. * Return: true if feature is enabled, else false
  1639. */
  1640. bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1641. /**
  1642. * wlan_cfg_set_rx_flow_search_table_per_pdev() - Set flag to indicate that
  1643. * Rx FST is per pdev
  1644. * @cfg: soc configuration context
  1645. * @val: boolean flag indicating Rx FST per pdev or per SOC
  1646. *
  1647. * Return: None
  1648. */
  1649. void
  1650. wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
  1651. bool val);
  1652. /**
  1653. * wlan_cfg_is_rx_flow_search_table_per_pdev() - get RX FST flag for per pdev
  1654. * @cfg: soc configuration context
  1655. *
  1656. * Return: true if Rx FST is per pdev, else false
  1657. */
  1658. bool
  1659. wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg);
  1660. /**
  1661. * wlan_cfg_set_rx_flow_search_table_size() - set RX FST size in DP SoC context
  1662. * @cfg: soc configuration context
  1663. * @val: Rx FST size in number of entries
  1664. *
  1665. * Return: None
  1666. */
  1667. void
  1668. wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  1669. uint16_t val);
  1670. /**
  1671. * wlan_cfg_set_rx_mon_protocol_flow_tag_enabled() - set mon rx tag enabled flag
  1672. * in DP soc context
  1673. * @cfg: soc configuration context
  1674. * @val: Rx protocol or flow tag feature flag value in monitor mode from INI
  1675. *
  1676. * Return: None
  1677. */
  1678. void
  1679. wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  1680. bool val);
  1681. /**
  1682. * wlan_cfg_is_rx_mon_protocol_flow_tag_enabled() - get mon rx tag enabled flag
  1683. * from DP soc context
  1684. * @cfg: soc configuration context
  1685. *
  1686. * Return: true if feature is enabled in monitor mode for protocol or flow
  1687. * tagging in INI, false otherwise
  1688. */
  1689. bool
  1690. wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1691. /**
  1692. * wlan_cfg_set_tx_per_pkt_vdev_id_check() - set flag to enable perpkt
  1693. * vdev id check in tx.
  1694. * @cfg: soc configuration context
  1695. * @val: feature flag value
  1696. *
  1697. * Return: None
  1698. */
  1699. void
  1700. wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
  1701. bool val);
  1702. /**
  1703. * wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled() - get flag to check if
  1704. * perpkt vdev id check is enabled in tx.
  1705. * @cfg: soc configuration context
  1706. *
  1707. * Return: true if feature is enabled, false otherwise
  1708. */
  1709. bool
  1710. wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1711. /**
  1712. * wlan_cfg_fill_interrupt_mask() - set interrupt mask
  1713. *
  1714. * @wlan_cfg_ctx: soc configuration context
  1715. * @num_dp_msi: Number of DP interrupts available (0 for integrated)
  1716. * @interrupt_mode: Type of interrupt
  1717. * @is_monitor_mode: is monitor mode enabled
  1718. *
  1719. * Return: void
  1720. */
  1721. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  1722. int num_dp_msi, int interrupt_mode,
  1723. bool is_monitor_mode);
  1724. /**
  1725. * wlan_cfg_is_rx_fisa_enabled() - Get Rx FISA enabled flag
  1726. *
  1727. *
  1728. * @cfg: soc configuration context
  1729. *
  1730. * Return: true if enabled, false otherwise.
  1731. */
  1732. bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1733. /**
  1734. * wlan_cfg_is_rx_fisa_lru_del_enabled() - Get Rx FISA LRU del enabled flag
  1735. *
  1736. *
  1737. * @cfg: soc configuration context
  1738. *
  1739. * Return: true if enabled, false otherwise.
  1740. */
  1741. bool wlan_cfg_is_rx_fisa_lru_del_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1742. /**
  1743. * wlan_cfg_is_rx_buffer_pool_enabled() - Get RX buffer pool enabled flag
  1744. *
  1745. *
  1746. * @cfg: soc configuration context
  1747. *
  1748. * Return: true if enabled, false otherwise.
  1749. */
  1750. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1751. /**
  1752. * wlan_cfg_is_rx_refill_buffer_pool_enabled() - Get RX refill buffer pool enabled flag
  1753. *
  1754. *
  1755. * @cfg: soc configuration context
  1756. *
  1757. * Return: true if enabled, false otherwise.
  1758. */
  1759. bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1760. void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
  1761. bool val);
  1762. bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg);
  1763. /**
  1764. * wlan_cfg_get_reo_rings_mapping() - Get Reo destination ring bitmap
  1765. *
  1766. *
  1767. * @cfg: soc configuration context
  1768. *
  1769. * Return: reo ring bitmap.
  1770. */
  1771. uint32_t wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg);
  1772. /**
  1773. * wlan_cfg_set_peer_ext_stats() - set peer extended stats
  1774. *
  1775. * @cfg: soc configuration context
  1776. * @val: Flag value read from INI
  1777. *
  1778. * Return: void
  1779. */
  1780. void
  1781. wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  1782. bool val);
  1783. /**
  1784. * wlan_cfg_set_peer_jitter_stats() - set peer jitter stats
  1785. *
  1786. * @cfg: soc configuration context
  1787. * @val: Flag value read from INI
  1788. *
  1789. * Return: bool
  1790. */
  1791. void
  1792. wlan_cfg_set_peer_jitter_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  1793. bool val);
  1794. /**
  1795. * wlan_cfg_is_peer_ext_stats_enabled() - Check if peer extended
  1796. * stats are enabled
  1797. *
  1798. * @cfg: soc configuration context
  1799. *
  1800. * Return: bool
  1801. */
  1802. bool
  1803. wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1804. /**
  1805. * wlan_cfg_is_peer_jitter_stats_enabled() - check if jitter stats are enabled
  1806. *
  1807. * @cfg: soc configuration context
  1808. *
  1809. * Return: bool
  1810. */
  1811. bool
  1812. wlan_cfg_is_peer_jitter_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1813. /**
  1814. * wlan_cfg_is_poll_mode_enabled() - Check if poll mode is enabled
  1815. *
  1816. * @cfg: soc configuration context
  1817. *
  1818. * Return: bool
  1819. */
  1820. bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1821. /**
  1822. * wlan_cfg_is_fst_in_cmem_enabled() - Check if FST in CMEM is enabled
  1823. * @cfg: soc configuration context
  1824. *
  1825. * Return: true if enabled, false otherwise.
  1826. */
  1827. bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1828. /**
  1829. * wlan_cfg_is_swlm_enabled() - Get SWLMenabled flag
  1830. * @cfg: soc configuration context
  1831. *
  1832. * Return: true if enabled, false otherwise.
  1833. */
  1834. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1835. /**
  1836. * wlan_cfg_set_peer_link_stats() - set peer link stats
  1837. *
  1838. * @cfg: soc configuration context
  1839. * @val: Flag value read from INI
  1840. *
  1841. * Return: void
  1842. */
  1843. void
  1844. wlan_cfg_set_peer_link_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  1845. bool val);
  1846. /**
  1847. * wlan_cfg_is_peer_link_stats_enabled() - check if link peer stats are enabled
  1848. *
  1849. * @cfg: soc configuration context
  1850. *
  1851. * Return: bool
  1852. */
  1853. bool
  1854. wlan_cfg_is_peer_link_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1855. #ifdef IPA_OFFLOAD
  1856. /**
  1857. * wlan_cfg_ipa_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
  1858. * @cfg: dp cfg context
  1859. *
  1860. * Return: IPA Tx Ring Size
  1861. */
  1862. uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1863. /**
  1864. * wlan_cfg_ipa_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
  1865. * @cfg: dp cfg context
  1866. *
  1867. * Return: IPA Tx Completion ring size
  1868. */
  1869. uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1870. /**
  1871. * wlan_cfg_ipa_tx_alt_ring_size - Get Tx alt DMA ring size (TCL Data Ring)
  1872. * @cfg: dp cfg context
  1873. *
  1874. * Return: IPA Tx alt Ring Size
  1875. */
  1876. int wlan_cfg_ipa_tx_alt_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1877. /**
  1878. * wlan_cfg_ipa_tx_alt_comp_ring_size - Get Tx alt comp DMA ring size
  1879. * (TCL Data Ring)
  1880. * @cfg: dp cfg context
  1881. *
  1882. * Return: IPA Tx alt comp Ring Size
  1883. */
  1884. int
  1885. wlan_cfg_ipa_tx_alt_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1886. #else
  1887. static inline
  1888. uint32_t wlan_cfg_ipa_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  1889. {
  1890. return 0;
  1891. }
  1892. static inline
  1893. uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  1894. {
  1895. return 0;
  1896. }
  1897. #endif
  1898. /**
  1899. * wlan_cfg_radio0_default_reo_get - Get Radio0 default REO
  1900. * @cfg: soc configuration context
  1901. *
  1902. * Return: None
  1903. */
  1904. uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  1905. /**
  1906. * wlan_cfg_radio1_default_reo_get - Get Radio1 default REO
  1907. * @cfg: soc configuration context
  1908. *
  1909. * Return: None
  1910. */
  1911. uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  1912. /**
  1913. * wlan_cfg_radio2_default_reo_get() - Get Radio2 default REO
  1914. * @cfg: soc configuration context
  1915. *
  1916. * Return: None
  1917. */
  1918. uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  1919. /**
  1920. * wlan_cfg_set_rxdma1_enable() - Enable rxdma1
  1921. * @wlan_cfg_ctx: soc configuration context
  1922. *
  1923. * Return: None
  1924. */
  1925. void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  1926. /**
  1927. * wlan_cfg_is_delay_mon_replenish() - Get if delayed monitor replenish
  1928. * is enabled
  1929. * @cfg: soc configuration context
  1930. *
  1931. * Return: true if enabled, false otherwise.
  1932. */
  1933. bool
  1934. wlan_cfg_is_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg);
  1935. /**
  1936. * wlan_cfg_set_delay_mon_replenish() - Set delayed monitor replenish
  1937. * @cfg: soc configuration context
  1938. * @val: val to set
  1939. *
  1940. * Return: None
  1941. */
  1942. void
  1943. wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, bool val);
  1944. /**
  1945. * wlan_cfg_dp_soc_ctx_dump() - Dump few DP cfg soc parameters
  1946. * @cfg: soc configuration context
  1947. *
  1948. * Return:
  1949. */
  1950. void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg);
  1951. #ifdef WLAN_SUPPORT_PPEDS
  1952. /**
  1953. * wlan_cfg_get_dp_soc_is_ppeds_enabled() - API to get ppe enable flag
  1954. * @cfg: Configuration Handle
  1955. *
  1956. * Return: true if ppe is enabled else return false
  1957. */
  1958. bool
  1959. wlan_cfg_get_dp_soc_is_ppeds_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1960. /**
  1961. * wlan_cfg_get_dp_soc_reo2ppe_ring_size() - get ppe rx ring size
  1962. * @cfg: Configuration Handle
  1963. *
  1964. * Return: size of reo2ppe ring
  1965. */
  1966. int
  1967. wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1968. /**
  1969. * wlan_cfg_get_dp_soc_ppe2tcl_ring_size() - get ppe tx ring size
  1970. * @cfg: Configuration Handle
  1971. *
  1972. * Return: size of ppe2tcl ring
  1973. */
  1974. int
  1975. wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1976. /**
  1977. * wlan_cfg_get_dp_soc_ppeds_num_tx_desc() - Number of ppeds tx Descriptors
  1978. * @cfg: Configuration Handle
  1979. *
  1980. * Return: num_tx_desc
  1981. */
  1982. int
  1983. wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg);
  1984. /**
  1985. * wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len() - Max hotlist len of tx descs
  1986. * @cfg: Configuration Handle
  1987. *
  1988. * Return: hotlist len
  1989. */
  1990. int
  1991. wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg);
  1992. /**
  1993. * wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget() - ppeds Tx comp napi budget
  1994. * @cfg: Configuration Handle
  1995. *
  1996. * Return: napi budget
  1997. */
  1998. int
  1999. wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg);
  2000. #else
  2001. static inline bool
  2002. wlan_cfg_get_dp_soc_is_ppeds_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
  2003. {
  2004. return false;
  2005. }
  2006. static inline int
  2007. wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  2008. {
  2009. return 0;
  2010. }
  2011. static inline int
  2012. wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
  2013. {
  2014. return 0;
  2015. }
  2016. static inline int
  2017. wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
  2018. {
  2019. return 0;
  2020. }
  2021. static inline int
  2022. wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg)
  2023. {
  2024. return 0;
  2025. }
  2026. static inline int
  2027. wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg)
  2028. {
  2029. return 0;
  2030. }
  2031. #endif
  2032. /**
  2033. * wlan_cfg_get_prealloc_cfg() - Get dp prealloc related cfg param
  2034. * @ctrl_psoc: PSOC object
  2035. * @cfg: cfg ctx where values will be populated
  2036. *
  2037. * Return: None
  2038. */
  2039. void
  2040. wlan_cfg_get_prealloc_cfg(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
  2041. struct wlan_dp_prealloc_cfg *cfg);
  2042. #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
  2043. /**
  2044. * wlan_cfg_get_pkt_capture_mode() - Get packet capture mode config
  2045. * @cfg: config context
  2046. *
  2047. * Return: value of packet capture mode
  2048. */
  2049. uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg);
  2050. #else
  2051. static inline
  2052. uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
  2053. {
  2054. return 0;
  2055. }
  2056. #endif
  2057. /**
  2058. * wlan_cfg_get_dp_soc_rx_mon_buf_ring_size() - Rx MON buf ring size
  2059. * @cfg: Configuration Handle
  2060. *
  2061. * Return: Size of Rx MON buf ring size
  2062. */
  2063. uint32_t
  2064. wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  2065. /**
  2066. * wlan_cfg_get_dp_soc_tx_mon_buf_ring_size() - Tx MON buf ring size
  2067. * @cfg: Configuration Handle
  2068. *
  2069. * Return: Size of Tx MON buf ring size
  2070. */
  2071. uint32_t
  2072. wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  2073. /**
  2074. * wlan_cfg_get_dma_rx_mon_dest_ring_size() - Rx MON dest ring size
  2075. * @cfg: Configuration Handle
  2076. *
  2077. * Return: Size of Rx MON dest ring size
  2078. */
  2079. int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
  2080. /**
  2081. * wlan_cfg_get_dma_tx_mon_dest_ring_size() - Tx MON dest ring size
  2082. * @cfg: Configuration Handle
  2083. *
  2084. * Return: Size of Tx MON dest ring size
  2085. */
  2086. int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
  2087. /**
  2088. * wlan_cfg_get_rx_rel_ring_id() - get wbm2sw ring id for Rx release ring
  2089. * @cfg: Configuration Handle
  2090. *
  2091. * Return: wbm2sw ring id
  2092. */
  2093. uint8_t
  2094. wlan_cfg_get_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg);
  2095. /**
  2096. * wlan_cfg_set_rx_rel_ring_id() - set wbm2sw ring id for Rx release ring
  2097. * @cfg: soc configuration context
  2098. * @wbm2sw_ring_id: wbm2sw ring id
  2099. *
  2100. * Return: None
  2101. */
  2102. void
  2103. wlan_cfg_set_rx_rel_ring_id(struct wlan_cfg_dp_soc_ctxt *cfg,
  2104. uint8_t wbm2sw_ring_id);
  2105. /**
  2106. * wlan_cfg_set_vdev_stats_hw_offload_config() - Set hw vdev stats offload
  2107. * config
  2108. * @cfg: config context
  2109. * @value: value to be set
  2110. *
  2111. * Return: none
  2112. */
  2113. void
  2114. wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg,
  2115. bool value);
  2116. /**
  2117. * wlan_cfg_get_vdev_stats_hw_offload_config() - Get hw vdev stats offload
  2118. * config
  2119. * @cfg: config context
  2120. *
  2121. * Return: value of hw vdev stats config
  2122. */
  2123. bool
  2124. wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg);
  2125. /**
  2126. * wlan_cfg_get_vdev_stats_hw_offload_timer()- Get hw vdev stats timer duration
  2127. * @cfg: config context
  2128. *
  2129. * Return: value of hw vdev stats timer duration
  2130. */
  2131. int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg);
  2132. /**
  2133. * wlan_cfg_set_sawf_config() - Set SAWF config enable/disable
  2134. * @cfg: config context
  2135. * @value: value to be set
  2136. *
  2137. * Return: none
  2138. */
  2139. void
  2140. wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool value);
  2141. /**
  2142. * wlan_cfg_get_sawf_config() - Get SAWF config enable/disable
  2143. * @cfg: config context
  2144. *
  2145. * Return: true or false
  2146. */
  2147. bool
  2148. wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg);
  2149. /**
  2150. * wlan_cfg_set_sawf_stats_config() - Set SAWF stats config
  2151. * @cfg: config context
  2152. * @value: value to be set
  2153. *
  2154. * Return: void
  2155. */
  2156. void
  2157. wlan_cfg_set_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg, uint8_t value);
  2158. /**
  2159. * wlan_cfg_get_sawf_stats_config() - Get SAWF stats config
  2160. * @cfg: config context
  2161. *
  2162. * Return: value for sawf_stats_config
  2163. */
  2164. uint8_t
  2165. wlan_cfg_get_sawf_stats_config(struct wlan_cfg_dp_soc_ctxt *cfg);
  2166. #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
  2167. /**
  2168. * wlan_cfg_mlo_rx_ring_map_get() - get rx ring map
  2169. * @cfg: soc configuration context
  2170. *
  2171. * Return: rx_ring_map
  2172. */
  2173. uint8_t
  2174. wlan_cfg_mlo_rx_ring_map_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  2175. #endif
  2176. /**
  2177. * wlan_cfg_set_host2txmon_ring_mask() - Set host2txmon ring
  2178. * interrupt mask mapped to an interrupt context
  2179. * @cfg: Configuration Handle
  2180. * @context: interrupt context
  2181. * @mask: interrupt mask
  2182. *
  2183. * Return: None
  2184. */
  2185. void wlan_cfg_set_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2186. int context, int mask);
  2187. /**
  2188. * wlan_cfg_get_host2txmon_ring_mask() - Return host2txmon ring
  2189. * interrupt mask mapped to an interrupt context
  2190. * @cfg: Configuration Handle
  2191. * @context: Numerical ID identifying the Interrupt/NAPI context
  2192. *
  2193. * Return: int_host2txmon_ring_mask[context]
  2194. */
  2195. int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  2196. int context);
  2197. /**
  2198. * wlan_cfg_set_txmon_hw_support () - Set txmon hw support
  2199. * @cfg: Configuration Handle
  2200. * @txmon_hw_support: value to set
  2201. *
  2202. * Return: None
  2203. */
  2204. void wlan_cfg_set_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg,
  2205. bool txmon_hw_support);
  2206. /**
  2207. * wlan_cfg_get_txmon_hw_support () - Get txmon hw support
  2208. * @cfg: Configuration Handle
  2209. *
  2210. * Return: txmon_hw_support
  2211. */
  2212. bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg);
  2213. void wlan_cfg_set_txmon_sw_peer_filtering(struct wlan_cfg_dp_soc_ctxt *cfg,
  2214. bool txmon_sw_peer_filtering);
  2215. bool wlan_cfg_get_txmon_sw_peer_filtering(struct wlan_cfg_dp_soc_ctxt *cfg);
  2216. #ifdef WLAN_TX_PKT_CAPTURE_ENH
  2217. /**
  2218. * wlan_cfg_get_tx_capt_max_mem - Get max memory allowed for TX capture feature
  2219. * @cfg: Configuration Handle
  2220. *
  2221. * Return: user given size in bytes
  2222. */
  2223. static inline int
  2224. wlan_cfg_get_tx_capt_max_mem(struct wlan_cfg_dp_soc_ctxt *cfg)
  2225. {
  2226. return cfg->tx_capt_max_mem_allowed;
  2227. }
  2228. #endif /* WLAN_TX_PKT_CAPTURE_ENH */
  2229. /**
  2230. * wlan_cfg_get_napi_scale_factor() - Get napi scale factor
  2231. * @cfg: soc configuration context
  2232. *
  2233. * Return: napi scale factor
  2234. */
  2235. uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg);
  2236. /**
  2237. * wlan_cfg_soc_update_tgt_params() - Update band specific params
  2238. * @wlan_cfg_ctx: SOC cfg context
  2239. * @ctrl_obj: PSOC object
  2240. *
  2241. * Return: void
  2242. */
  2243. void
  2244. wlan_cfg_soc_update_tgt_params(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  2245. struct cdp_ctrl_objmgr_psoc *ctrl_obj);
  2246. /**
  2247. * wlan_cfg_get_pointer_timer_threshold_rx() - Get timer threshold for RX
  2248. * pointer update
  2249. * @cfg: soc configuration context
  2250. *
  2251. * Return: timer threshold for RX REO Dest ring pointer update
  2252. */
  2253. uint16_t
  2254. wlan_cfg_get_pointer_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  2255. /**
  2256. * wlan_cfg_get_pointer_num_threshold_rx() - Get number threshold for RX
  2257. * pointer update
  2258. * @cfg: soc configuration context
  2259. *
  2260. * Return: entries number threshold for RX REO Dest ring pointer update
  2261. */
  2262. uint8_t
  2263. wlan_cfg_get_pointer_num_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  2264. #endif /*__WLAN_CFG_H*/