wlan_cfg.h 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541
  1. /*
  2. * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef __WLAN_CFG_H
  19. #define __WLAN_CFG_H
  20. /*
  21. * Temporary place holders. These should come either from target config
  22. * or platform configuration
  23. */
  24. #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
  25. #define WLAN_CFG_DST_RING_CACHED_DESC 0
  26. #define MAX_PDEV_CNT 1
  27. #define WLAN_CFG_INT_NUM_CONTEXTS 7
  28. #define WLAN_CFG_RXDMA1_ENABLE 1
  29. /*
  30. * This mask defines how many transmit frames account for 1 NAPI work unit
  31. * 0 means each tx completion is 1 unit
  32. */
  33. #define DP_TX_NAPI_BUDGET_DIV_MASK 0
  34. /* PPDU Stats Configuration - Configure bitmask for enabling tx ppdu tlv's */
  35. #define DP_PPDU_TXLITE_STATS_BITMASK_CFG 0x3FFF
  36. #define NUM_RXDMA_RINGS_PER_PDEV 2
  37. /*Maximum Number of LMAC instances*/
  38. #define MAX_NUM_LMAC_HW 2
  39. #else
  40. #define WLAN_CFG_DST_RING_CACHED_DESC 1
  41. #define MAX_PDEV_CNT 3
  42. #define WLAN_CFG_INT_NUM_CONTEXTS 11
  43. #define NUM_RXDMA_RINGS_PER_PDEV 1
  44. #define MAX_NUM_LMAC_HW 3
  45. #endif
  46. #define WLAN_CFG_INT_NUM_CONTEXTS_MAX 11
  47. /* Tx configuration */
  48. #define MAX_LINK_DESC_BANKS 8
  49. #define MAX_TXDESC_POOLS 4
  50. #define MAX_TCL_DATA_RINGS 4
  51. /* Rx configuration */
  52. #define MAX_RXDESC_POOLS 4
  53. #define MAX_REO_DEST_RINGS 4
  54. #define MAX_RX_MAC_RINGS 2
  55. /* DP process status */
  56. #if defined(MAX_PDEV_CNT) && (MAX_PDEV_CNT == 1)
  57. #define CONFIG_PROCESS_RX_STATUS 1
  58. #define CONFIG_PROCESS_TX_STATUS 1
  59. #else
  60. #define CONFIG_PROCESS_RX_STATUS 0
  61. #define CONFIG_PROCESS_TX_STATUS 0
  62. #endif
  63. /* Miscellaneous configuration */
  64. #define MAX_IDLE_SCATTER_BUFS 16
  65. #define DP_MAX_IRQ_PER_CONTEXT 12
  66. #define MAX_HTT_METADATA_LEN 32
  67. #define DP_MAX_TIDS 17
  68. #define DP_NON_QOS_TID 16
  69. #define DP_NULL_DATA_TID 17
  70. #define WLAN_CFG_RX_FST_MAX_SEARCH 2
  71. #define WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN 40
  72. #define INVALID_PDEV_ID 0xFF
  73. struct wlan_cfg_dp_pdev_ctxt;
  74. /**
  75. * struct wlan_srng_cfg - Per ring configuration parameters
  76. * @timer_threshold: Config to control interrupts based on timer duration
  77. * @batch_count_threshold: Config to control interrupts based on
  78. * number of packets in the ring
  79. * @low_threshold: Config to control low threshold interrupts for SRC rings
  80. */
  81. struct wlan_srng_cfg {
  82. uint32_t timer_threshold;
  83. uint32_t batch_count_threshold;
  84. uint32_t low_threshold;
  85. };
  86. /**
  87. * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx)
  88. * @num_int_ctxts: Number of NAPI/Interrupt contexts to be registered for DP
  89. * @max_clients: Maximum number of peers/stations supported by device
  90. * @max_alloc_size: Maximum allocation size for any dynamic memory
  91. * allocation request for this device
  92. * @per_pdev_tx_ring: 0: TCL ring is not mapped per radio
  93. * 1: Each TCL ring is mapped to one radio/pdev
  94. * @num_tcl_data_rings: Number of TCL Data rings supported by device
  95. * @per_pdev_rx_ring: 0: REO ring is not mapped per radio
  96. * 1: Each REO ring is mapped to one radio/pdev
  97. * @num_tx_desc_pool: Number of Tx Descriptor pools
  98. * @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools
  99. * @num_tx_desc: Number of Tx Descriptors per pool
  100. * @min_tx_desc: Minimum number of Tx Descriptors per pool
  101. * @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool
  102. * @max_peer_id: Maximum value of peer id that FW can assign for a client
  103. * @htt_packet_type: Default 802.11 encapsulation type for any VAP created
  104. * @int_tx_ring_mask: Bitmap of Tx interrupts mapped to each NAPI/Intr context
  105. * @int_rx_ring_mask: Bitmap of Rx interrupts mapped to each NAPI/Intr context
  106. * @int_rx_mon_ring_mask: Bitmap of Rx monitor ring interrupts mapped to each
  107. * NAPI/Intr context
  108. * @int_rx_err_ring_mask: Bitmap of Rx err ring interrupts mapped to each
  109. * NAPI/Intr context
  110. * @int_wbm_rel_ring_mask: Bitmap of wbm rel ring interrupts mapped to each
  111. * NAPI/Intr context
  112. * @int_reo_status_ring_mask: Bitmap of reo status ring interrupts mapped to
  113. * each NAPI/Intr context
  114. * @int_ce_ring_mask: Bitmap of CE interrupts mapped to each NAPI/Intr context
  115. * @lro_enabled: enable/disable lro feature
  116. * @rx_hash: Enable hash based steering of rx packets
  117. * @tso_enabled: enable/disable tso feature
  118. * @lro_enabled: enable/disable LRO feature
  119. * @sg_enabled: enable disable scatter gather feature
  120. * @gro_enabled: enable disable GRO feature
  121. * @ipa_enabled: Flag indicating if IPA is enabled
  122. * @ol_tx_csum_enabled: Flag indicating if TX csum is enabled
  123. * @ol_rx_csum_enabled: Flag indicating if Rx csum is enabled
  124. * @rawmode_enabled: Flag indicating if RAW mode is enabled
  125. * @peer_flow_ctrl_enabled: Flag indicating if peer flow control is enabled
  126. * @napi_enabled: enable/disable interrupt mode for reaping tx and rx packets
  127. * @p2p_tcp_udp_checksumoffload: enable/disable checksum offload for P2P mode
  128. * @nan_tcp_udp_checksumoffload: enable/disable checksum offload for NAN mode
  129. * @tcp_udp_checksumoffload: enable/disable checksum offload
  130. * @nss_cfg: nss configuration
  131. * @rx_defrag_min_timeout: rx defrag minimum timeout
  132. * @wbm_release_ring: wbm release ring size
  133. * @tcl_cmd_credit_ring: tcl command/credit ring size
  134. * @tcl_status_ring: tcl status ring size
  135. * @reo_reinject_ring: reo reinject ring
  136. * @rx_release_ring: rx release ring size
  137. * @reo_exception_ring: reo exception ring size
  138. * @reo_cmd_ring: reo cmd ring size
  139. * @reo_status_ring: reo status ting size
  140. * @rxdma_refill_ring: rxdma refill ring size
  141. * @rxdma_err_dst_ring: rxdma error detination ring size
  142. * @raw_mode_war: enable/disable raw mode war
  143. * @enable_data_stall_detection: flag to enable data stall detection
  144. * @enable_force_rx_64_ba: flag to enable force 64 blockack in RX
  145. * @disable_intra_bss_fwd: flag to disable intra bss forwarding
  146. * @rxdma1_enable: flag to indicate if rxdma1 is enabled
  147. * @tx_desc_limit_0: tx_desc limit for 5G H
  148. * @tx_desc_limit_1: tx_desc limit for 2G
  149. * @tx_desc_limit_2: tx_desc limit for 5G L
  150. * @tx_device_limit: tx device limit
  151. * @tx_sw_internode_queue: tx sw internode queue
  152. * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop
  153. * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop
  154. * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates
  155. * @rx_enable_eol_data_check: flag to enable check for more ring data at end of
  156. * dp_rx_process loop
  157. * @tx_comp_enable_eol_data_check: flag to enable/disable checking for more data
  158. * at end of tx_comp_handler loop.
  159. * @rx_sw_desc_weight: rx sw descriptor weight configuration
  160. * @is_rx_mon_protocol_flow_tag_enabled: flag to enable/disable RX protocol or
  161. * flow tagging in monitor/mon-lite mode
  162. * @is_rx_flow_tag_enabled: flag to enable/disable RX flow tagging using FSE
  163. * @is_rx_flow_search_table_per_pdev: flag to indicate if a per-SOC or per-pdev
  164. * table should be used
  165. * @rx_flow_search_table_size: indicates the number of flows in the flow search
  166. * table
  167. * @rx_flow_max_search: max skid length for each hash entry
  168. * @rx_toeplitz_hash_key: toeplitz key pointer used for hash computation over
  169. * 5 tuple flow entry
  170. * @pktlog_buffer_size: packet log buffer size
  171. * @is_rx_fisa_enabled: flag to enable/disable FISA Rx
  172. * @pext_stats_enabled: Flag to enable and disabled peer extended stats
  173. * @is_rx_buff_pool_enabled: flag to enable/disable emergency RX buffer
  174. * pool support
  175. * @rx_pending_high_threshold: threshold of starting pkt drop
  176. * @rx_pending_low_threshold: threshold of stopping pkt drop
  177. * @is_swlm_enabled: flag to enable/disable SWLM
  178. * @tx_per_pkt_vdev_id_check: Enable tx perpkt vdev id check
  179. * @wow_check_rx_pending_enable: Enable RX frame pending check in WoW
  180. */
  181. struct wlan_cfg_dp_soc_ctxt {
  182. int num_int_ctxts;
  183. int max_clients;
  184. int max_alloc_size;
  185. int per_pdev_tx_ring;
  186. int num_tcl_data_rings;
  187. int num_nss_tcl_data_rings;
  188. int per_pdev_rx_ring;
  189. int per_pdev_lmac_ring;
  190. int num_reo_dest_rings;
  191. int num_nss_reo_dest_rings;
  192. int num_tx_desc_pool;
  193. int num_tx_ext_desc_pool;
  194. int num_tx_desc;
  195. int min_tx_desc;
  196. int num_tx_ext_desc;
  197. int max_peer_id;
  198. int htt_packet_type;
  199. int int_batch_threshold_tx;
  200. int int_timer_threshold_tx;
  201. int int_batch_threshold_rx;
  202. int int_timer_threshold_rx;
  203. int int_batch_threshold_other;
  204. int int_timer_threshold_other;
  205. int int_timer_threshold_mon;
  206. int tx_ring_size;
  207. int tx_comp_ring_size;
  208. int tx_comp_ring_size_nss;
  209. int int_tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  210. int int_rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  211. int int_rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  212. int int_host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  213. int int_rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  214. int int_ce_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  215. int int_rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  216. int int_rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  217. int int_reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  218. int int_rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  219. int int_host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  220. int hw_macid[MAX_PDEV_CNT];
  221. int hw_macid_pdev_id_map[MAX_NUM_LMAC_HW];
  222. int base_hw_macid;
  223. bool rx_hash;
  224. bool tso_enabled;
  225. bool lro_enabled;
  226. bool sg_enabled;
  227. bool gro_enabled;
  228. bool ipa_enabled;
  229. bool ol_tx_csum_enabled;
  230. bool ol_rx_csum_enabled;
  231. bool rawmode_enabled;
  232. bool peer_flow_ctrl_enabled;
  233. bool napi_enabled;
  234. bool p2p_tcp_udp_checksumoffload;
  235. bool nan_tcp_udp_checksumoffload;
  236. bool tcp_udp_checksumoffload;
  237. bool legacy_mode_checksumoffload_disable;
  238. bool defrag_timeout_check;
  239. int nss_cfg;
  240. uint32_t tx_flow_stop_queue_threshold;
  241. uint32_t tx_flow_start_queue_offset;
  242. int rx_defrag_min_timeout;
  243. int reo_dst_ring_size;
  244. int wbm_release_ring;
  245. int tcl_cmd_credit_ring;
  246. int tcl_status_ring;
  247. int reo_reinject_ring;
  248. int rx_release_ring;
  249. int reo_exception_ring;
  250. int reo_cmd_ring;
  251. int reo_status_ring;
  252. int rxdma_refill_ring;
  253. int rxdma_err_dst_ring;
  254. uint32_t per_pkt_trace;
  255. bool raw_mode_war;
  256. bool enable_data_stall_detection;
  257. bool enable_force_rx_64_ba;
  258. bool disable_intra_bss_fwd;
  259. bool rxdma1_enable;
  260. int max_ast_idx;
  261. int tx_desc_limit_0;
  262. int tx_desc_limit_1;
  263. int tx_desc_limit_2;
  264. int tx_device_limit;
  265. int tx_sw_internode_queue;
  266. int mon_drop_thresh;
  267. #ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT
  268. uint32_t tx_comp_loop_pkt_limit;
  269. uint32_t rx_reap_loop_pkt_limit;
  270. uint32_t rx_hp_oos_update_limit;
  271. bool rx_enable_eol_data_check;
  272. bool tx_comp_enable_eol_data_check;
  273. #endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */
  274. int rx_sw_desc_weight;
  275. int rx_sw_desc_num;
  276. bool is_rx_mon_protocol_flow_tag_enabled;
  277. bool is_rx_flow_tag_enabled;
  278. bool is_rx_flow_search_table_per_pdev;
  279. uint16_t rx_flow_search_table_size;
  280. uint16_t rx_flow_max_search;
  281. uint8_t *rx_toeplitz_hash_key;
  282. uint8_t pktlog_buffer_size;
  283. uint8_t is_rx_fisa_enabled;
  284. bool is_tso_desc_attach_defer;
  285. uint32_t delayed_replenish_entries;
  286. uint32_t reo_rings_mapping;
  287. bool pext_stats_enabled;
  288. bool is_rx_buff_pool_enabled;
  289. uint32_t rx_pending_high_threshold;
  290. uint32_t rx_pending_low_threshold;
  291. bool is_poll_mode_enabled;
  292. uint8_t is_swlm_enabled;
  293. bool fst_in_cmem;
  294. bool tx_per_pkt_vdev_id_check;
  295. uint8_t radio0_rx_default_reo;
  296. uint8_t radio1_rx_default_reo;
  297. uint8_t radio2_rx_default_reo;
  298. bool wow_check_rx_pending_enable;
  299. };
  300. /**
  301. * struct wlan_cfg_dp_pdev_ctxt - Configuration parameters for pdev (radio)
  302. * @rx_dma_buf_ring_size - Size of RxDMA buffer ring
  303. * @dma_mon_buf_ring_size - Size of RxDMA Monitor buffer ring
  304. * @dma_mon_dest_ring_size - Size of RxDMA Monitor Destination ring
  305. * @dma_mon_status_ring_size - Size of RxDMA Monitor Status ring
  306. * @rxdma_monitor_desc_ring - rxdma monitor desc ring size
  307. */
  308. struct wlan_cfg_dp_pdev_ctxt {
  309. int rx_dma_buf_ring_size;
  310. int dma_mon_buf_ring_size;
  311. int dma_mon_dest_ring_size;
  312. int dma_mon_status_ring_size;
  313. int rxdma_monitor_desc_ring;
  314. int num_mac_rings;
  315. int nss_enabled;
  316. };
  317. /**
  318. * wlan_cfg_soc_attach() - Attach configuration interface for SoC
  319. * @ctrl_obj - PSOC object
  320. *
  321. * Allocates context for Soc configuration parameters,
  322. * Read configuration information from device tree/ini file and
  323. * returns back handle
  324. *
  325. * Return: Handle to configuration context
  326. */
  327. struct wlan_cfg_dp_soc_ctxt *
  328. wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
  329. /**
  330. * wlan_cfg_soc_detach() - Detach soc configuration handle
  331. * @wlan_cfg_ctx: soc configuration handle
  332. *
  333. * De-allocates memory allocated for SoC configuration
  334. *
  335. * Return:none
  336. */
  337. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  338. /**
  339. * wlan_cfg_pdev_attach() Attach configuration interface for pdev
  340. * @ctrl_obj - PSOC object
  341. *
  342. * Allocates context for pdev configuration parameters,
  343. * Read configuration information from device tree/ini file and
  344. * returns back handle
  345. *
  346. * Return: Handle to configuration context
  347. */
  348. struct wlan_cfg_dp_pdev_ctxt *
  349. wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj);
  350. /**
  351. * wlan_cfg_pdev_detach() Detach and free pdev configuration handle
  352. * @wlan_cfg_pdev_ctx - PDEV Configuration Handle
  353. *
  354. * Return: void
  355. */
  356. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  357. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num);
  358. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  359. int context, int mask);
  360. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  361. int context, int mask);
  362. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  363. int context, int mask);
  364. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  365. int context, int mask);
  366. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  367. int mask);
  368. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
  369. void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
  370. int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg);
  371. int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg);
  372. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  373. int context, int mask);
  374. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  375. int context, int mask);
  376. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  377. int context, int mask);
  378. /**
  379. * wlan_cfg_set_mon_delayed_replenish_entries() - number of buffers to replenish
  380. * for monitor buffer ring at initialization
  381. * @wlan_cfg_ctx - Configuration Handle
  382. * @replenish_entries - number of entries to replenish at initialization
  383. *
  384. */
  385. void wlan_cfg_set_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
  386. *wlan_cfg_ctx,
  387. uint32_t replenish_entries);
  388. /**
  389. * wlan_cfg_get_mon_delayed_replenish_entries() - get num of buffer to replenish
  390. * for monitor buffer ring at initialization
  391. * @wlan_cfg_ctx - Configuration Handle
  392. * @replenish_entries - number of entries to replenish at initialization
  393. *
  394. * Return: delayed_replenish_entries;
  395. */
  396. int wlan_cfg_get_mon_delayed_replenish_entries(struct wlan_cfg_dp_soc_ctxt
  397. *wlan_cfg_ctx);
  398. /**
  399. * wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered
  400. * @wlan_cfg_ctx - Configuration Handle
  401. *
  402. * For WIN, DP_NUM_INTERRUPT_CONTEXTS will be equal to number of CPU cores.
  403. * Each context (for linux it is a NAPI context) will have a tx_ring_mask,
  404. * rx_ring_mask ,and rx_monitor_ring mask to indicate the rings
  405. * that are processed by the handler.
  406. *
  407. * Return: num_contexts
  408. */
  409. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  410. /**
  411. * wlan_cfg_get_tx_ring_mask() - Return Tx interrupt mask mapped to an
  412. * interrupt context
  413. * @wlan_cfg_ctx - Configuration Handle
  414. * @context - Numerical ID identifying the Interrupt/NAPI context
  415. *
  416. * Return: int_tx_ring_mask[context]
  417. */
  418. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  419. int context);
  420. /**
  421. * wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an
  422. * interrupt context
  423. * @wlan_cfg_ctx - Configuration Handle
  424. * @context - Numerical ID identifying the Interrupt/NAPI context
  425. *
  426. * Return: int_rx_ring_mask[context]
  427. */
  428. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  429. int context);
  430. /**
  431. * wlan_cfg_get_rx_mon_ring_mask() - Return Rx monitor ring interrupt mask
  432. * mapped to an interrupt context
  433. * @wlan_cfg_ctx - Configuration Handle
  434. * @context - Numerical ID identifying the Interrupt/NAPI context
  435. *
  436. * Return: int_rx_mon_ring_mask[context]
  437. */
  438. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  439. int context);
  440. /**
  441. * wlan_cfg_set_rxdma2host_ring_mask() - Set rxdma2host ring interrupt mask
  442. * for the given interrupt context
  443. * @wlan_cfg_ctx - Configuration Handle
  444. * @context - Numerical ID identifying the Interrupt/NAPI context
  445. *
  446. */
  447. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  448. int context, int mask);
  449. /**
  450. * wlan_cfg_get_rxdma2host_ring_mask() - Return rxdma2host ring interrupt mask
  451. * mapped to an interrupt context
  452. * @wlan_cfg_ctx - Configuration Handle
  453. * @context - Numerical ID identifying the Interrupt/NAPI context
  454. *
  455. * Return: int_rxdma2host_ring_mask[context]
  456. */
  457. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  458. int context);
  459. /**
  460. * wlan_cfg_set_host2rxdma_ring_mask() - Set host2rxdma ring interrupt mask
  461. * for the given interrupt context
  462. * @wlan_cfg_ctx - Configuration Handle
  463. * @context - Numerical ID identifying the Interrupt/NAPI context
  464. *
  465. */
  466. void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  467. int context, int mask);
  468. /**
  469. * wlan_cfg_get_host2rxdma_ring_mask() - Return host2rxdma ring interrupt mask
  470. * mapped to an interrupt context
  471. * @wlan_cfg_ctx - Configuration Handle
  472. * @context - Numerical ID identifying the Interrupt/NAPI context
  473. *
  474. * Return: int_host2rxdma_ring_mask[context]
  475. */
  476. int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  477. int context);
  478. /**
  479. * wlan_cfg_set_host2rxdma_mon_ring_mask() - Set host2rxdma monitor ring
  480. * interrupt mask for the given interrupt context
  481. * @wlan_cfg_ctx - Configuration Handle
  482. * @context - Numerical ID identifying the Interrupt/NAPI context
  483. *
  484. */
  485. void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  486. int context, int mask);
  487. /**
  488. * wlan_cfg_get_host2rxdma_mon_ring_mask() - Return host2rxdma monitoe ring
  489. * interrupt mask mapped to an interrupt context
  490. * @wlan_cfg_ctx - Configuration Handle
  491. * @context - Numerical ID identifying the Interrupt/NAPI context
  492. *
  493. * Return: int_host2rxdma_mon_ring_mask[context]
  494. */
  495. int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  496. int context);
  497. /**
  498. * wlan_cfg_set_rxdma2host_mon_ring_mask() - Set rxdma2host monitor
  499. * destination ring interrupt mask
  500. * for the given interrupt context
  501. * @wlan_cfg_ctx - Configuration Handle
  502. * @context - Numerical ID identifying the Interrupt/NAPI context
  503. *
  504. */
  505. void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  506. int context, int mask);
  507. /**
  508. * wlan_cfg_get_rxdma2host_mon_ring_mask() - Return rxdma2host monitor
  509. * destination ring interrupt mask
  510. * mapped to an interrupt context
  511. * @wlan_cfg_ctx - Configuration Handle
  512. * @context - Numerical ID identifying the Interrupt/NAPI context
  513. *
  514. * Return: int_rxdma2host_mon_ring_mask[context]
  515. */
  516. int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  517. int context);
  518. /**
  519. * wlan_cfg_set_hw_macidx() - Set HW MAC Idx for the given PDEV index
  520. *
  521. * @wlan_cfg_ctx - Configuration Handle
  522. * @pdev_idx - Index of SW PDEV
  523. * @hw_macid - HW MAC Id
  524. *
  525. */
  526. void wlan_cfg_set_hw_mac_idx
  527. (struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, int hw_macid);
  528. /**
  529. * wlan_cfg_get_hw_mac_idx() - Get 0 based HW MAC index for the given
  530. * PDEV index
  531. *
  532. * @wlan_cfg_ctx - Configuration Handle
  533. * @pdev_idx - Index of SW PDEV
  534. *
  535. * Return: HW MAC index
  536. */
  537. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
  538. /**
  539. * wlan_cfg_get_target_pdev_id() - Get target PDEV ID for HW MAC ID
  540. *
  541. * @wlan_cfg_ctx - Configuration Handle
  542. * @hw_macid - Index of hw mac
  543. *
  544. * Return: PDEV ID
  545. */
  546. int
  547. wlan_cfg_get_target_pdev_id(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
  548. /**
  549. * wlan_cfg_set_pdev_idx() - Set 0 based host PDEV index for the given
  550. * hw mac index
  551. *
  552. * @wlan_cfg_ctx - Configuration Handle
  553. * @pdev_idx - Index of SW PDEV
  554. * @hw_macid - Index of hw mac
  555. *
  556. * Return: PDEV index
  557. */
  558. void wlan_cfg_set_pdev_idx
  559. (struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, int hw_macid);
  560. /**
  561. * wlan_cfg_get_pdev_idx() - Get 0 based PDEV index for the given
  562. * hw mac index
  563. *
  564. * @wlan_cfg_ctx - Configuration Handle
  565. * @hw_macid - Index of hw mac
  566. *
  567. * Return: PDEV index
  568. */
  569. int wlan_cfg_get_pdev_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int hw_macid);
  570. /**
  571. * wlan_cfg_get_rx_err_ring_mask() - Return Rx monitor ring interrupt mask
  572. * mapped to an interrupt context
  573. * @wlan_cfg_ctx - Configuration Handle
  574. * @context - Numerical ID identifying the Interrupt/NAPI context
  575. *
  576. * Return: int_rx_err_ring_mask[context]
  577. */
  578. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  579. context);
  580. /**
  581. * wlan_cfg_get_rx_wbm_rel_ring_mask() - Return Rx monitor ring interrupt mask
  582. * mapped to an interrupt context
  583. * @wlan_cfg_ctx - Configuration Handle
  584. * @context - Numerical ID identifying the Interrupt/NAPI context
  585. *
  586. * Return: int_wbm_rel_ring_mask[context]
  587. */
  588. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  589. context);
  590. /**
  591. * wlan_cfg_get_reo_status_ring_mask() - Return Rx monitor ring interrupt mask
  592. * mapped to an interrupt context
  593. * @wlan_cfg_ctx - Configuration Handle
  594. * @context - Numerical ID identifying the Interrupt/NAPI context
  595. *
  596. * Return: int_reo_status_ring_mask[context]
  597. */
  598. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  599. context);
  600. /**
  601. * wlan_cfg_get_ce_ring_mask() - Return CE ring interrupt mask
  602. * mapped to an interrupt context
  603. * @wlan_cfg_ctx - Configuration Handle
  604. * @context - Numerical ID identifying the Interrupt/NAPI context
  605. *
  606. * Return: int_ce_ring_mask[context]
  607. */
  608. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  609. int context);
  610. /**
  611. * wlan_cfg_get_max_clients() - Return maximum number of peers/stations
  612. * supported by device
  613. * @wlan_cfg_ctx - Configuration Handle
  614. *
  615. * Return: max_clients
  616. */
  617. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  618. /**
  619. * wlan_cfg_max_alloc_size() - Return Maximum allocation size for any dynamic
  620. * memory allocation request for this device
  621. * @wlan_cfg_ctx - Configuration Handle
  622. *
  623. * Return: max_alloc_size
  624. */
  625. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  626. /*
  627. * wlan_cfg_per_pdev_tx_ring() - Return true if Tx rings are mapped as
  628. * one per radio
  629. * @wlan_cfg_ctx - Configuration Handle
  630. *
  631. * Return: per_pdev_tx_ring
  632. */
  633. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  634. /*
  635. * wlan_cfg_num_tcl_data_rings() - Number of TCL Data rings (HOST mode)
  636. * @wlan_cfg_ctx
  637. *
  638. * Return: num_tcl_data_rings
  639. */
  640. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  641. /*
  642. * wlan_cfg_num_nss_tcl_data_rings() - Number of TCL Data rings (NSS offload)
  643. * @wlan_cfg_ctx
  644. *
  645. * Return: num_tcl_data_rings
  646. */
  647. int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  648. /*
  649. * wlan_cfg_per_pdev_rx_ring() - Return true if Rx rings are mapped as
  650. * one per radio
  651. * @wlan_cfg_ctx
  652. *
  653. * Return: per_pdev_rx_ring
  654. */
  655. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  656. /*
  657. * wlan_cfg_per_pdev_lmac_ring() - Return true if error rings are mapped as
  658. * one per radio
  659. * @wlan_cfg_ctx
  660. *
  661. * Return: return 1 if per pdev error ring else 0
  662. */
  663. int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  664. /*
  665. * wlan_cfg_num_reo_dest_rings() - Number of REO Data rings (HOST mode)
  666. * @wlan_cfg_ctx - Configuration Handle
  667. *
  668. * Return: num_reo_dest_rings
  669. */
  670. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  671. /*
  672. * wlan_cfg_num_nss_reo_dest_rings() - Number of REO Data rings (NSS offload)
  673. * @wlan_cfg_ctx - Configuration Handle
  674. *
  675. * Return: num_reo_dest_rings
  676. */
  677. int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  678. /*
  679. * wlan_cfg_pkt_type() - Default 802.11 encapsulation type
  680. * @wlan_cfg_ctx - Configuration Handle
  681. *
  682. * Return: htt_pkt_type_ethernet
  683. */
  684. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  685. /*
  686. * wlan_cfg_get_num_tx_desc_pool() - Number of Tx Descriptor pools for the
  687. * device
  688. * @wlan_cfg_ctx - Configuration Handle
  689. *
  690. * Return: num_tx_desc_pool
  691. */
  692. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  693. /*
  694. * wlan_cfg_set_num_tx_desc_pool() - Set the number of Tx Descriptor pools for the
  695. * device
  696. * @wlan_cfg_ctx - Configuration Handle
  697. * @num_pool - Number of pool
  698. */
  699. void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
  700. /*
  701. * wlan_cfg_get_num_tx_ext_desc_pool() - Number of Tx MSDU ext Descriptor
  702. * pools
  703. * @wlan_cfg_ctx - Configuration Handle
  704. *
  705. * Return: num_tx_ext_desc_pool
  706. */
  707. int wlan_cfg_get_num_tx_ext_desc_pool(
  708. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  709. /*
  710. * wlan_cfg_get_reo_dst_ring_size() - Get REO destination ring size
  711. *
  712. * @wlan_cfg_ctx - Configuration Handle
  713. *
  714. * Return: reo_dst_ring_size
  715. */
  716. int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  717. /*
  718. * wlan_cfg_set_num_tx_desc_pool() - Set the REO Destination ring size
  719. *
  720. * @wlan_cfg_ctx - Configuration Handle
  721. * @reo_dst_ring_size - REO Destination ring size
  722. */
  723. void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  724. int reo_dst_ring_size);
  725. /*
  726. * wlan_cfg_set_raw_mode_war() - Set raw mode war configuration
  727. *
  728. * @wlan_cfg_ctx - Configuration Handle
  729. * @raw_mode_war - raw mode war configuration
  730. */
  731. void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg,
  732. bool raw_mode_war);
  733. /*
  734. * wlan_cfg_get_raw_mode_war() - Get raw mode war configuration
  735. *
  736. * @wlan_cfg_ctx - Configuration Handle
  737. *
  738. * Return: reo_dst_ring_size
  739. */
  740. bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg);
  741. /*
  742. * wlan_cfg_set_num_tx_ext_desc_pool() - Set the number of Tx MSDU ext Descriptor
  743. * pools
  744. * @wlan_cfg_ctx - Configuration Handle
  745. * @num_pool - Number of pool
  746. */
  747. void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool);
  748. /*
  749. * wlan_cfg_get_num_tx_desc() - Number of Tx Descriptors per pool
  750. * @wlan_cfg_ctx - Configuration Handle
  751. *
  752. * Return: num_tx_desc
  753. */
  754. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  755. /*
  756. * wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool
  757. * @wlan_cfg_ctx - Configuration Handle
  758. *
  759. * Return: num_tx_desc
  760. */
  761. int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  762. /*
  763. * wlan_cfg_set_num_tx_desc() - Set the number of Tx Descriptors per pool
  764. *
  765. * @wlan_cfg_ctx - Configuration Handle
  766. * @num_desc: Number of descriptor
  767. */
  768. void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc);
  769. /*
  770. * wlan_cfg_get_num_tx_ext_desc() - Number of Tx MSDU extension Descriptors
  771. * per pool
  772. * @wlan_cfg_ctx - Configuration Handle
  773. *
  774. * Return: num_tx_ext_desc
  775. */
  776. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  777. /*
  778. * wlan_cfg_set_num_tx_ext_desc() - Set the number of Tx MSDU extension Descriptors
  779. * per pool
  780. * @wlan_cfg_ctx - Configuration Handle
  781. * @num_desc: Number of descriptor
  782. */
  783. void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc);
  784. /*
  785. * wlan_cfg_max_peer_id() - Get maximum peer ID
  786. * @cfg: Configuration Handle
  787. *
  788. * Return: maximum peer ID
  789. */
  790. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg);
  791. /*
  792. * wlan_cfg_get_dma_mon_buf_ring_size() - Return Size of monitor buffer ring
  793. * @wlan_cfg_pdev_ctx
  794. *
  795. * Return: dma_mon_buf_ring_size
  796. */
  797. int wlan_cfg_get_dma_mon_buf_ring_size(
  798. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  799. /*
  800. * wlan_cfg_get_dma_mon_dest_ring_size() - Return Size of RxDMA Monitor
  801. * Destination ring
  802. * @wlan_cfg_pdev_ctx
  803. *
  804. * Return: dma_mon_dest_size
  805. */
  806. int wlan_cfg_get_dma_mon_dest_ring_size(
  807. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  808. /*
  809. * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring
  810. * @wlan_cfg_pdev_ctx
  811. *
  812. * Return: dma_mon_stat_ring_size
  813. */
  814. int wlan_cfg_get_dma_mon_stat_ring_size(
  815. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  816. /*
  817. * wlan_cfg_get_dma_mon_desc_ring_size - Get rxdma monitor size
  818. * @wlan_cfg_soc_ctx
  819. *
  820. * Return: rxdma monitor desc ring size
  821. */
  822. int
  823. wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
  824. /*
  825. * wlan_cfg_get_rx_dma_buf_ring_size() - Return Size of RxDMA buffer ring
  826. * @wlan_cfg_pdev_ctx
  827. *
  828. * Return: rx_dma_buf_ring_size
  829. */
  830. int wlan_cfg_get_rx_dma_buf_ring_size(
  831. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  832. /*
  833. * wlan_cfg_rx_pending_hl_threshold() - Return high threshold of rx pending
  834. * @wlan_cfg_pdev_ctx
  835. *
  836. * Return: rx_pending_high_threshold
  837. */
  838. uint32_t
  839. wlan_cfg_rx_pending_hl_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
  840. /*
  841. * wlan_cfg_rx_pending_lo_threshold() - Return low threshold of rx pending
  842. * @wlan_cfg_pdev_ctx
  843. *
  844. * Return: rx_pending_low_threshold
  845. */
  846. uint32_t
  847. wlan_cfg_rx_pending_lo_threshold(struct wlan_cfg_dp_soc_ctxt *cfg);
  848. /*
  849. * wlan_cfg_get_num_mac_rings() - Return the number of MAC RX DMA rings
  850. * per pdev
  851. * @wlan_cfg_pdev_ctx
  852. *
  853. * Return: number of mac DMA rings per pdev
  854. */
  855. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg);
  856. /*
  857. * wlan_cfg_is_lro_enabled - Return LRO enabled/disabled
  858. * @wlan_cfg_dp_soc_ctxt
  859. *
  860. * Return: true - LRO enabled false - LRO disabled
  861. */
  862. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  863. /*
  864. * wlan_cfg_is_gro_enabled - Return GRO enabled/disabled
  865. * @wlan_cfg_dp_soc_ctxt
  866. *
  867. * Return: true - GRO enabled false - GRO disabled
  868. */
  869. bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  870. /*
  871. * wlan_cfg_is_rx_hash_enabled - Return RX hash enabled/disabled
  872. * @wlan_cfg_dp_soc_ctxt
  873. *
  874. * Return: true - enabled false - disabled
  875. */
  876. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  877. /*
  878. * wlan_cfg_is_ipa_enabled - Return IPA enabled/disabled
  879. * @wlan_cfg_dp_soc_ctxt
  880. *
  881. * Return: true - enabled false - disabled
  882. */
  883. bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  884. /*
  885. * wlan_cfg_set_rx_hash - set rx hash enabled/disabled
  886. * @wlan_cfg_soc_ctx
  887. * @rx_hash
  888. */
  889. void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_hash);
  890. /*
  891. * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled
  892. * @wlan_cfg_pdev_ctx
  893. *
  894. * Return: 1 - enabled 0 - disabled
  895. */
  896. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg);
  897. /*
  898. * wlan_cfg_set_dp_pdev_nss_enabled - set pdev nss enabled/disabled
  899. * @wlan_cfg_pdev_ctx
  900. */
  901. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled);
  902. /*
  903. * wlan_cfg_get_dp_soc_nss_cfg - Return soc nss config
  904. * @wlan_cfg_pdev_ctx
  905. *
  906. * Return: nss_cfg
  907. */
  908. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg);
  909. /*
  910. * wlan_cfg_set_dp_soc_nss_cfg - set soc nss config
  911. * @wlan_cfg_pdev_ctx
  912. *
  913. */
  914. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg);
  915. /*
  916. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for Tx
  917. * @wlan_cfg_soc_ctx
  918. *
  919. * Return: Batch threshold
  920. */
  921. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  922. /*
  923. * wlan_cfg_get_int_timer_threshold_tx - Get interrupt mitigation cfg for Tx
  924. * @wlan_cfg_soc_ctx
  925. *
  926. * Return: Timer threshold
  927. */
  928. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  929. /*
  930. * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
  931. * @wlan_cfg_soc_ctx
  932. *
  933. * Return: Batch threshold
  934. */
  935. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  936. /*
  937. * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
  938. * @wlan_cfg_soc_ctx
  939. *
  940. * Return: Timer threshold
  941. */
  942. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  943. /*
  944. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
  945. * @wlan_cfg_soc_ctx
  946. *
  947. * Return: Batch threshold
  948. */
  949. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  950. /*
  951. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
  952. * @wlan_cfg_soc_ctx
  953. *
  954. * Return: Timer threshold
  955. */
  956. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  957. /*
  958. * wlan_cfg_get_int_timer_threshold_mon - Get int mitigation cfg for mon srngs
  959. * @wlan_cfg_soc_ctx
  960. *
  961. * Return: Timer threshold
  962. */
  963. int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg);
  964. /*
  965. * wlan_cfg_get_checksum_offload - Get checksum offload enable or disable status
  966. * @wlan_cfg_soc_ctx
  967. *
  968. * Return: Checksum offload enable or disable
  969. */
  970. int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  971. /*
  972. * wlan_cfg_get_nan_checksum_offload - Get checksum offload enable/disable val
  973. * @wlan_cfg_soc_ctx
  974. *
  975. * Return: Checksum offload enable or disable value for NAN mode
  976. */
  977. int wlan_cfg_get_nan_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  978. /*
  979. * wlan_cfg_get_p2p_checksum_offload - Get checksum offload enable/disable val
  980. * @wlan_cfg_soc_ctx
  981. *
  982. * Return: Checksum offload enable or disable value for P2P mode
  983. */
  984. int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg);
  985. /*
  986. * wlan_cfg_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
  987. * @wlan_cfg_soc_ctx
  988. *
  989. * Return: Tx Ring Size
  990. */
  991. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  992. /*
  993. * wlan_cfg_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
  994. * @wlan_cfg_soc_ctx
  995. *
  996. * Return: Tx Completion ring size
  997. */
  998. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  999. /*
  1000. * wlan_cfg_get_dp_soc_wbm_release_ring_size - Get wbm_release_ring size
  1001. * @wlan_cfg_soc_ctx
  1002. *
  1003. * Return: wbm_release_ring size
  1004. */
  1005. int
  1006. wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1007. /*
  1008. * wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size - Get command/credit ring size
  1009. * @wlan_cfg_soc_ctx
  1010. *
  1011. * Return: tcl_cmd_credit_ring size
  1012. */
  1013. int
  1014. wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1015. /*
  1016. * wlan_cfg_get_dp_soc_tcl_status_ring_size - Get tcl_status_ring size
  1017. * @wlan_cfg_soc_ctx
  1018. *
  1019. * Return: tcl_status_ring size
  1020. */
  1021. int
  1022. wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1023. /*
  1024. * wlan_cfg_get_dp_soc_reo_reinject_ring_size - Get reo_reinject_ring size
  1025. * @wlan_cfg_soc_ctx
  1026. *
  1027. * Return: reo_reinject_ring size
  1028. */
  1029. int
  1030. wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1031. /*
  1032. * wlan_cfg_get_dp_soc_rx_release_ring_size - Get rx_release_ring size
  1033. * @wlan_cfg_soc_ctx
  1034. *
  1035. * Return: rx_release_ring size
  1036. */
  1037. int
  1038. wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1039. /*
  1040. * wlan_cfg_get_dp_soc_reo_exception_ring_size - Get reo_exception_ring size
  1041. * @wlan_cfg_soc_ctx
  1042. *
  1043. * Return: reo_exception_ring size
  1044. */
  1045. int
  1046. wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1047. /*
  1048. * wlan_cfg_get_dp_soc_reo_cmd_ring_size - Get reo_cmd_ring size
  1049. * @wlan_cfg_soc_ctx
  1050. *
  1051. * Return: reo_cmd_ring size
  1052. */
  1053. int
  1054. wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1055. /*
  1056. * wlan_cfg_get_dp_soc_reo_status_ring_size - Get reo_status_ring size
  1057. * @wlan_cfg_soc_ctx
  1058. *
  1059. * Return: reo_status_ring size
  1060. */
  1061. int
  1062. wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1063. /*
  1064. * wlan_cfg_get_dp_soc_tx_desc_limit_0 - Get tx desc limit for 5G H
  1065. * @wlan_cfg_soc_ctx
  1066. *
  1067. * Return: tx desc limit for 5G H
  1068. */
  1069. int
  1070. wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg);
  1071. /*
  1072. * wlan_cfg_get_dp_soc_tx_desc_limit_1 - Get tx desc limit for 2G
  1073. * @wlan_cfg_soc_ctx
  1074. *
  1075. * Return: tx desc limit for 2G
  1076. */
  1077. int
  1078. wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg);
  1079. /*
  1080. * wlan_cfg_get_dp_soc_tx_desc_limit_2 - Get tx desc limit for 5G L
  1081. * @wlan_cfg_soc_ctx
  1082. *
  1083. * Return: tx desc limit for 5G L
  1084. */
  1085. int
  1086. wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg);
  1087. /*
  1088. * wlan_cfg_get_dp_soc_tx_device_limit - Get tx device limit
  1089. * @wlan_cfg_soc_ctx
  1090. *
  1091. * Return: tx device limit
  1092. */
  1093. int
  1094. wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg);
  1095. /*
  1096. * wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue
  1097. * @wlan_cfg_soc_ctx
  1098. *
  1099. * Return: tx sw internode queue
  1100. */
  1101. int
  1102. wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg);
  1103. /*
  1104. * wlan_cfg_get_dp_soc_rxdma_refill_ring_size - Get rxdma refill ring size
  1105. * @wlan_cfg_soc_ctx
  1106. *
  1107. * Return: rxdma refill ring size
  1108. */
  1109. int
  1110. wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1111. /*
  1112. * wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size - Get rxdma dst ring size
  1113. * @wlan_cfg_soc_ctx
  1114. *
  1115. * Return: rxdma error dst ring size
  1116. */
  1117. int
  1118. wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1119. /*
  1120. * wlan_cfg_get_dp_soc_rx_sw_desc_weight - Get rx sw desc weight
  1121. * @wlan_cfg_soc_ctx
  1122. *
  1123. * Return: rx_sw_desc_weight
  1124. */
  1125. int
  1126. wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg);
  1127. /*
  1128. * wlan_cfg_get_dp_soc_rx_sw_desc_num - Get rx sw desc num
  1129. * @wlan_cfg_soc_ctx
  1130. *
  1131. * Return: rx_sw_desc_num
  1132. */
  1133. int
  1134. wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg);
  1135. /*
  1136. * wlan_cfg_get_dp_caps - Get dp capablities
  1137. * @wlan_cfg_soc_ctx
  1138. * @dp_caps: enum for dp capablities
  1139. *
  1140. * Return: bool if a dp capabilities is enabled
  1141. */
  1142. bool
  1143. wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
  1144. enum cdp_capabilities dp_caps);
  1145. /**
  1146. * wlan_set_srng_cfg() - Fill per ring specific
  1147. * configuration parameters
  1148. * @wlan_cfg: global srng configuration table
  1149. *
  1150. * Return: None
  1151. */
  1152. void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg);
  1153. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  1154. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg);
  1155. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg);
  1156. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  1157. int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg);
  1158. int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg);
  1159. /**
  1160. * wlan_cfg_get_rx_flow_search_table_size() - Return the size of Rx FST
  1161. * in number of entries
  1162. *
  1163. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1164. *
  1165. * Return: rx_fst_size
  1166. */
  1167. uint16_t
  1168. wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  1169. /**
  1170. * wlan_cfg_rx_fst_get_max_search() - Return the max skid length for FST search
  1171. *
  1172. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1173. *
  1174. * Return: max_search
  1175. */
  1176. uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg);
  1177. /**
  1178. * wlan_cfg_rx_fst_get_hash_key() - Return Toeplitz Hash Key used for FST
  1179. * search
  1180. *
  1181. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1182. *
  1183. * Return: 320-bit Hash Key
  1184. */
  1185. uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg);
  1186. /**
  1187. * wlan_cfg_set_rx_flow_tag_enabled() - set rx flow tag enabled flag in
  1188. * DP soc context
  1189. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1190. * @val: Rx flow tag feature flag value
  1191. *
  1192. * Return: None
  1193. */
  1194. void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  1195. bool val);
  1196. /**
  1197. * wlan_cfg_is_rx_flow_tag_enabled() - get rx flow tag enabled flag from
  1198. * DP soc context
  1199. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1200. *
  1201. * Return: true if feature is enabled, else false
  1202. */
  1203. bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1204. /**
  1205. * wlan_cfg_set_rx_flow_search_table_per_pdev() - Set flag to indicate that
  1206. * Rx FST is per pdev
  1207. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1208. * @val: boolean flag indicating Rx FST per pdev or per SOC
  1209. *
  1210. * Return: None
  1211. */
  1212. void
  1213. wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg,
  1214. bool val);
  1215. /**
  1216. * wlan_cfg_is_rx_flow_search_table_per_pdev() - get RX FST flag for per pdev
  1217. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1218. *
  1219. * Return: true if Rx FST is per pdev, else false
  1220. */
  1221. bool
  1222. wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg);
  1223. /**
  1224. * wlan_cfg_set_rx_flow_search_table_size() - set RX FST size in DP SoC context
  1225. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1226. * @val: Rx FST size in number of entries
  1227. *
  1228. * Return: None
  1229. */
  1230. void
  1231. wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg,
  1232. uint16_t val);
  1233. /**
  1234. * wlan_cfg_set_rx_mon_protocol_flow_tag_enabled() - set mon rx tag enabled flag
  1235. * in DP soc context
  1236. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1237. * @val: Rx protocol or flow tag feature flag value in monitor mode from INI
  1238. *
  1239. * Return: None
  1240. */
  1241. void
  1242. wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg,
  1243. bool val);
  1244. /**
  1245. * wlan_cfg_is_rx_mon_protocol_flow_tag_enabled() - get mon rx tag enabled flag
  1246. * from DP soc context
  1247. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1248. *
  1249. * Return: true if feature is enabled in monitor mode for protocol or flow
  1250. * tagging in INI, false otherwise
  1251. */
  1252. bool
  1253. wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1254. /**
  1255. * wlan_cfg_set_tx_per_pkt_vdev_id_check() - set flag to enable perpkt
  1256. * vdev id check in tx.
  1257. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1258. * @val: feature flag value
  1259. *
  1260. * Return: None
  1261. */
  1262. void
  1263. wlan_cfg_set_tx_per_pkt_vdev_id_check(struct wlan_cfg_dp_soc_ctxt *cfg,
  1264. bool val);
  1265. /**
  1266. * wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled() - get flag to check if
  1267. * perpkt vdev id check is enabled in tx.
  1268. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1269. *
  1270. * Return: true if feature is enabled, false otherwise
  1271. */
  1272. bool
  1273. wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1274. /**
  1275. * wlan_cfg_fill_interrupt_mask() - set interrupt mask
  1276. *
  1277. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1278. * @interrupt_mode: interrupt_mode: MSI/LEGACY
  1279. * @is_monitor_mode: is monitor mode enabled
  1280. *
  1281. * Return: void
  1282. */
  1283. void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  1284. int interrupt_mode, bool is_monitor_mode);
  1285. /**
  1286. * wlan_cfg_is_rx_fisa_enabled() - Get Rx FISA enabled flag
  1287. *
  1288. *
  1289. * @cfg: soc configuration context
  1290. *
  1291. * Return: true if enabled, false otherwise.
  1292. */
  1293. bool wlan_cfg_is_rx_fisa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1294. /**
  1295. * wlan_cfg_is_rx_buffer_pool_enabled() - Get RX buffer pool enabled flag
  1296. *
  1297. *
  1298. * @cfg: soc configuration context
  1299. *
  1300. * Return: true if enabled, false otherwise.
  1301. */
  1302. bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1303. void wlan_cfg_set_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg,
  1304. bool val);
  1305. bool wlan_cfg_is_tso_desc_attach_defer(struct wlan_cfg_dp_soc_ctxt *cfg);
  1306. /**
  1307. * wlan_cfg_get_reo_rings_mapping() - Get Reo destination ring bitmap
  1308. *
  1309. *
  1310. * @cfg: soc configuration context
  1311. *
  1312. * Return: reo ring bitmap.
  1313. */
  1314. uint32_t wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg);
  1315. /**
  1316. * wlan_cfg_set_peer_ext_stats() - set peer extended stats
  1317. *
  1318. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1319. * @val: Flag value read from INI
  1320. *
  1321. * Return: void
  1322. */
  1323. void
  1324. wlan_cfg_set_peer_ext_stats(struct wlan_cfg_dp_soc_ctxt *cfg,
  1325. bool val);
  1326. /**
  1327. * wlan_cfg_is_peer_ext_stats_enabled() - Check if peer extended
  1328. * stats are enabled
  1329. *
  1330. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1331. *
  1332. * Return: bool
  1333. */
  1334. bool
  1335. wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1336. /**
  1337. * wlan_cfg_is_poll_mode_enabled() - Check if poll mode is enabled
  1338. *
  1339. * @wlan_cfg_dp_soc_ctxt: soc configuration context
  1340. *
  1341. * Return: bool
  1342. */
  1343. bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1344. /**
  1345. * wlan_cfg_is_fst_in_cmem_enabled() - Check if FST in CMEM is enabled
  1346. * @cfg: soc configuration context
  1347. *
  1348. * Return: true if enabled, false otherwise.
  1349. */
  1350. bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1351. /**
  1352. * wlan_cfg_is_swlm_enabled() - Get SWLMenabled flag
  1353. * @cfg: soc configuration context
  1354. *
  1355. * Return: true if enabled, false otherwise.
  1356. */
  1357. bool wlan_cfg_is_swlm_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  1358. /**
  1359. * wlan_cfg_is_dp_force_rx_64_ba() - Get force use 64 BA flag
  1360. * @cfg: config context
  1361. *
  1362. * Return: force use 64 BA flag
  1363. */
  1364. bool wlan_cfg_is_dp_force_rx_64_ba(struct wlan_cfg_dp_soc_ctxt *cfg);
  1365. #endif
  1366. /**
  1367. * wlan_cfg_radio0_default_reo_get - Get Radio0 default REO
  1368. * @cfg: soc configuration context
  1369. *
  1370. * Return: .
  1371. */
  1372. uint8_t wlan_cfg_radio0_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  1373. /**
  1374. * wlan_cfg_radio1_default_reo_get - Get Radio1 default REO
  1375. * @cfg: soc configuration context
  1376. *
  1377. * Return: .
  1378. */
  1379. uint8_t wlan_cfg_radio1_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  1380. /**
  1381. * wlan_cfg_radio2_default_reo_get() - Get Radio2 default REO
  1382. * @cfg: soc configuration context
  1383. *
  1384. * Return: .
  1385. */
  1386. uint8_t wlan_cfg_radio2_default_reo_get(struct wlan_cfg_dp_soc_ctxt *cfg);
  1387. /**
  1388. * wlan_cfg_set_rxdma1_enable() - Enable rxdma1
  1389. * @cfg: soc configuration context
  1390. *
  1391. * Return: .
  1392. */
  1393. void wlan_cfg_set_rxdma1_enable(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);