wlan_cfg.h 61 KB

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