wlan_cfg.h 60 KB

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