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