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