wlan_cfg.h 75 KB

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