1 /* 2 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /** 20 * DOC: This target interface shall be used 21 * to communicate with target using WMI. 22 */ 23 #ifndef _WLAN_TARGET_IF_H_ 24 #define _WLAN_TARGET_IF_H_ 25 26 #include "qdf_types.h" 27 #include "qdf_util.h" 28 #include "wlan_objmgr_psoc_obj.h" 29 #include "wmi_unified_api.h" 30 #include "wmi_unified_priv.h" 31 #include "wmi_unified_param.h" 32 33 #define TGT_WMI_PDEV_ID_SOC 0 /* WMI SOC ID */ 34 35 /* ASCII "TGT\0" */ 36 #define TGT_MAGIC 0x54575400 37 38 #define target_if_fatal(params...) \ 39 QDF_TRACE_FATAL(QDF_MODULE_ID_TARGET_IF, params) 40 #define target_if_err(params...) \ 41 QDF_TRACE_ERROR(QDF_MODULE_ID_TARGET_IF, params) 42 #define target_if_warn(params...) \ 43 QDF_TRACE_WARN(QDF_MODULE_ID_TARGET_IF, params) 44 #define target_if_info(params...) \ 45 QDF_TRACE_INFO(QDF_MODULE_ID_TARGET_IF, params) 46 #define target_if_debug(params...) \ 47 QDF_TRACE_DEBUG(QDF_MODULE_ID_TARGET_IF, params) 48 #define TARGET_IF_ENTER() \ 49 QDF_TRACE_ENTER(QDF_MODULE_ID_TARGET_IF, "enter") 50 #define TARGET_IF_EXIT() \ 51 QDF_TRACE_EXIT(QDF_MODULE_ID_TARGET_IF, "exit") 52 #define target_if_err_rl(params...) \ 53 QDF_TRACE_ERROR_RL(QDF_MODULE_ID_TARGET_IF, params) 54 55 56 #define targetif_nofl_fatal(params...) \ 57 QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_TARGET_IF, params) 58 #define targetif_nofl_err(params...) \ 59 QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_TARGET_IF, params) 60 #define targetif_nofl_warn(params...) \ 61 QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_TARGET_IF, params) 62 #define targetif_nofl_info(params...) \ 63 QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_TARGET_IF, params) 64 #define targetif_nofl_debug(params...) \ 65 QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_TARGET_IF, params) 66 67 typedef struct wlan_objmgr_psoc *(*get_psoc_handle_callback)( 68 void *scn_handle); 69 70 typedef struct wlan_objmgr_pdev *(*get_pdev_handle_callback)( 71 void *scn_handle); 72 73 typedef int (*wmi_legacy_service_ready_callback)(uint32_t event_id, 74 void *handle, 75 uint8_t *event_data, 76 uint32_t length); 77 78 /** 79 * struct target_if_ctx - target_interface context 80 * @magic: magic for target if ctx 81 * @get_psoc_hdl_cb: function pointer to get psoc 82 * @get_pdev_hdl_cb: function pointer to get pdev 83 * @lock: spin lock for protecting the ctx 84 */ 85 struct target_if_ctx { 86 uint32_t magic; 87 get_psoc_handle_callback get_psoc_hdl_cb; 88 get_pdev_handle_callback get_pdev_hdl_cb; 89 wmi_legacy_service_ready_callback service_ready_cb; 90 qdf_spinlock_t lock; 91 }; 92 93 struct target_psoc_info; 94 /** 95 * struct host_fw_ver - holds host fw version 96 * @host_ver: Host version 97 * @target_ver: Target version ID 98 * @target_rev: Target revision ID 99 * @wlan_ver: FW SW version 100 * @wlan_ver_1: FW SW version second dword 101 * @abi_ver: ABI version 102 */ 103 struct host_fw_ver { 104 uint32_t host_ver; 105 uint32_t target_ver; 106 uint32_t target_rev; 107 uint32_t wlan_ver; 108 uint32_t wlan_ver_1; 109 uint32_t abi_ver; 110 }; 111 112 struct common_dbglog_handle; 113 struct common_accelerator_handle; 114 115 /** 116 * struct comp_hdls - Non-umac/lower layer components handles, it is a sub 117 * structure of target psoc information 118 * @hif_hdl: HIF handle 119 * @htc_hdl: HTC handle 120 * @wmi_hdl: WMI handle 121 * @accelerator_hdl: NSS offload/IPA handle 122 * @dbglog_hdl: Debug log handle 123 */ 124 struct comp_hdls { 125 struct hif_opaque_softc *hif_hdl; 126 HTC_HANDLE htc_hdl; 127 struct wmi_unified *wmi_hdl; 128 struct common_accelerator_handle *accelerator_hdl; 129 struct common_dbglog_handle *dbglog_hdl; 130 }; 131 132 /** 133 * struct target_supported_modes - List of HW modes supported by target. 134 * 135 * @num_modes: Number of modes supported 136 * @hw_mode_ids: List of HW mode ids 137 * @phy_bit_map: List of Phy bit maps 138 */ 139 struct target_supported_modes { 140 uint8_t num_modes; 141 uint32_t hw_mode_ids[WMI_HOST_HW_MODE_MAX]; 142 uint32_t phy_bit_map[WMI_HOST_HW_MODE_MAX]; 143 }; 144 145 /** 146 * struct target_version_info - Target version information 147 * 148 * @reg_db_version_major: REG DB version major 149 * @reg_db_version_minor: REG DB version minor 150 * @bdf_reg_db_version_major: BDF REG DB version major 151 * @bdf_reg_db_version_minor: BDF REG DB version minor 152 */ 153 struct target_version_info { 154 uint8_t reg_db_version_major; 155 uint8_t reg_db_version_minor; 156 uint8_t bdf_reg_db_version_major; 157 uint8_t bdf_reg_db_version_minor; 158 }; 159 160 /** 161 * struct tgt_info - FW or lower layer related info(required by target_if), 162 * it is a sub structure of taarget psoc information 163 * @version: Host FW version struct 164 * @wlan_res_cfg: target_resource_config info 165 * @wlan_ext_res_cfg: wmi_host_ext_resource_config info 166 * @wmi_service_ready: is service ready received 167 * @wmi_ready: is ready event received 168 * @total_mac_phy_cnt: num of mac phys 169 * @num_radios: number of radios 170 * @wlan_init_status: Target init status 171 * @target_type: Target type 172 * @max_descs: Max descriptors 173 * @preferred_hw_mode: preferred hw mode 174 * @wmi_timeout: wait timeout for target events 175 * @event: qdf_event for target events 176 * @service_bitmap: WMI service bitmap 177 * @target_cap: target capabilities 178 * @service_ext2_param: service ready ext2 event params 179 * @service_ext_param: ext service params 180 * @mac_phy_cap: phy caps array 181 * @mac_phy_caps_ext2: mac phy caps ext2 params 182 * @dbr_ring_cap: dbr_ring capability info 183 * @reg_cap: regulatory caps array 184 * @scaling_params: Spectral bin scaling parameters 185 * @num_mem_chunks: number of mem chunks allocated 186 * @hw_mode_caps: HW mode caps of preferred mode 187 * @mem_chunks: allocated memory blocks for FW 188 * @scan_radio_caps: scan radio capabilities 189 * @device_mode: Global Device mode 190 */ 191 struct tgt_info { 192 struct host_fw_ver version; 193 target_resource_config wlan_res_cfg; 194 wmi_host_ext_resource_config wlan_ext_res_cfg; 195 bool wmi_service_ready; 196 bool wmi_ready; 197 uint8_t total_mac_phy_cnt; 198 uint8_t num_radios; 199 uint32_t wlan_init_status; 200 uint32_t target_type; 201 uint32_t max_descs; 202 uint32_t preferred_hw_mode; 203 uint32_t wmi_timeout; 204 qdf_event_t event; 205 uint32_t service_bitmap[PSOC_SERVICE_BM_SIZE]; 206 struct wlan_psoc_target_capability_info target_caps; 207 struct wlan_psoc_host_service_ext_param service_ext_param; 208 struct wlan_psoc_host_service_ext2_param service_ext2_param; 209 struct wlan_psoc_host_mac_phy_caps 210 mac_phy_cap[PSOC_MAX_MAC_PHY_CAP]; 211 struct wlan_psoc_host_mac_phy_caps_ext2 212 mac_phy_caps_ext2[PSOC_MAX_MAC_PHY_CAP]; 213 struct wlan_psoc_host_dbr_ring_caps *dbr_ring_cap; 214 struct wlan_psoc_host_spectral_scaling_params *scaling_params; 215 uint32_t num_mem_chunks; 216 struct wmi_host_mem_chunk mem_chunks[MAX_MEM_CHUNKS]; 217 struct wlan_psoc_host_hw_mode_caps hw_mode_cap; 218 struct target_supported_modes hw_modes; 219 uint8_t pdev_id_to_phy_id_map[WLAN_UMAC_MAX_PDEVS]; 220 bool is_pdevid_to_phyid_map; 221 struct wlan_psoc_host_scan_radio_caps *scan_radio_caps; 222 uint32_t device_mode; 223 }; 224 225 /** 226 * struct target_ops - Holds feature specific function pointers, which would be 227 * invoked as part of service ready or ext service ready 228 * @ext_resource_config_enable: Ext resource config 229 * @peer_config: Peer config enable 230 * @mesh_support_enable: Mesh support enable 231 * @smart_antenna_enable: Smart antenna enable 232 * @atf_config_enable: ATF config enable 233 * @qwrap_config_enable: QWRAP config enable 234 * @btcoex_config_enable: BTCOEX config enable 235 * @lteu_ext_support_enable: LTE-U Ext config enable 236 * @set_init_cmd_dev_based_params: Sets Init command params 237 * @alloc_pdevs: Allocates PDEVs 238 * @update_pdev_tgt_info: Updates PDEV target info 239 * @mem_mgr_alloc_chunk: Allocates memory through MEM manager 240 * @mem_mgr_free_chunks: Free memory chunks through MEM manager 241 * @print_svc_ready_ex_param: Print service ready ext params 242 * @add_11ax_modes: Adds 11ax modes to reg cap 243 * @set_default_tgt_config: Sets target config with default values 244 * @sw_version_check: Checks the SW version 245 * @smart_log_enable: Enable Smart Logs feature 246 * @cfr_support_enable: CFR support enable 247 * @set_pktlog_checksum: Set the pktlog checksum from FW ready event to pl_dev 248 * @csa_switch_count_status: CSA event handler 249 */ 250 struct target_ops { 251 QDF_STATUS (*ext_resource_config_enable) 252 (struct wlan_objmgr_psoc *psoc, 253 struct target_psoc_info *tgt_info, uint8_t *event); 254 void (*peer_config) 255 (struct wlan_objmgr_psoc *psoc, 256 struct target_psoc_info *tgt_info, uint8_t *event); 257 void (*mesh_support_enable) 258 (struct wlan_objmgr_psoc *psoc, 259 struct target_psoc_info *tgt_info, uint8_t *event); 260 void (*smart_antenna_enable) 261 (struct wlan_objmgr_psoc *psoc, 262 struct target_psoc_info *tgt_info, uint8_t *event); 263 void (*atf_config_enable) 264 (struct wlan_objmgr_psoc *psoc, 265 struct target_psoc_info *tgt_info, uint8_t *event); 266 void (*qwrap_config_enable) 267 (struct wlan_objmgr_psoc *psoc, 268 struct target_psoc_info *tgt_info, uint8_t *event); 269 void (*btcoex_config_enable) 270 (struct wlan_objmgr_psoc *psoc, 271 struct target_psoc_info *tgt_info, uint8_t *event); 272 void (*lteu_ext_support_enable) 273 (struct wlan_objmgr_psoc *psoc, 274 struct target_psoc_info *tgt_info, uint8_t *event); 275 void (*set_init_cmd_dev_based_params) 276 (struct wlan_objmgr_psoc *psoc, 277 struct target_psoc_info *tgt_info); 278 QDF_STATUS (*alloc_pdevs) 279 (struct wlan_objmgr_psoc *psoc, 280 struct target_psoc_info *tgt_info); 281 QDF_STATUS (*update_pdev_tgt_info) 282 (struct wlan_objmgr_psoc *psoc, 283 struct target_psoc_info *tgt_info); 284 uint32_t (*mem_mgr_alloc_chunk)(struct wlan_objmgr_psoc *psoc, 285 struct target_psoc_info *tgt_info, 286 u_int32_t req_id, u_int32_t idx, u_int32_t num_units, 287 u_int32_t unit_len, u_int32_t num_unit_info); 288 QDF_STATUS (*mem_mgr_free_chunks)(struct wlan_objmgr_psoc *psoc, 289 struct target_psoc_info *tgt_hdl); 290 void (*print_svc_ready_ex_param)( 291 struct wlan_objmgr_psoc *psoc, 292 struct target_psoc_info *tgt_info); 293 void (*add_11ax_modes)( 294 struct wlan_objmgr_psoc *psoc, 295 struct target_psoc_info *tgt_info); 296 void (*set_default_tgt_config)( 297 struct wlan_objmgr_psoc *psoc, 298 struct target_psoc_info *tgt_info); 299 QDF_STATUS (*sw_version_check)( 300 struct wlan_objmgr_psoc *psoc, 301 struct target_psoc_info *tgt_hdl, 302 uint8_t *evt_buf); 303 void (*eapol_minrate_enable) 304 (struct wlan_objmgr_psoc *psoc, 305 struct target_psoc_info *tgt_info, uint8_t *event); 306 void (*cfr_support_enable) 307 (struct wlan_objmgr_psoc *psoc, 308 struct target_psoc_info *tgt_info, uint8_t *event); 309 void (*set_pktlog_checksum) 310 (struct wlan_objmgr_pdev *pdev, uint32_t checksum); 311 int (*csa_switch_count_status)( 312 struct wlan_objmgr_psoc *psoc, 313 struct pdev_csa_switch_count_status csa_status); 314 }; 315 316 317 318 /** 319 * struct target_psoc_info - target psoc information 320 * @hdls: component handles (htc/htt/wmi) sub structure 321 * @info: target related info sub structure 322 * @feature_ptr: stores legacy pointer or few driver specific structures 323 * @tif_ops: holds driver specific function pointers 324 */ 325 struct target_psoc_info { 326 struct comp_hdls hdls; 327 struct tgt_info info; 328 void *feature_ptr; 329 struct target_ops *tif_ops; 330 }; 331 332 /** 333 * struct target_pdev_info - target pdev information 334 * @wmi_handle: WMI handle 335 * @accelerator_hdl: NSS offload/IPA handles 336 * @pdev_idx: pdev id (of FW) 337 * @phy_idx: phy id (of FW) 338 * @hw_link_id: Unique link id across SoC required in multi-soc ML 339 * @feature_ptr: stores legacy pointer or few driver specific structures 340 */ 341 struct target_pdev_info { 342 struct wmi_unified *wmi_handle; 343 struct common_accelerator_handle *accelerator_hdl; 344 int32_t pdev_idx; 345 int32_t phy_idx; 346 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 347 uint16_t hw_link_id; 348 #endif 349 void *feature_ptr; 350 }; 351 352 /** 353 * struct target_mu_caps - max number of users per-PPDU for OFDMA/MU-MIMO 354 * @ofdma_dl: max users for Downlink OFDMA transmissions 355 * @ofdma_ul: max users for Uplink OFDMA transmissions 356 * @mumimo_dl: max users for Downlink MU-MIMO transmissions 357 * @mumimo_ul: max users for Uplink MU-MIMO transmissions 358 */ 359 struct target_mu_caps { 360 uint16_t ofdma_dl; 361 uint16_t ofdma_ul; 362 uint16_t mumimo_dl; 363 uint16_t mumimo_ul; 364 }; 365 366 367 /** 368 * target_if_init() - target_if Initialization 369 * @get_wmi_handle: function pointer to get wmi handle 370 * 371 * 372 * Return: QDF_STATUS 373 */ 374 QDF_STATUS target_if_init(get_psoc_handle_callback psoc_hdl_cb); 375 376 /** 377 * target_if_deinit() - Close target_if 378 * @scn_handle: scn handle 379 * 380 * Return: QDF_STATUS_SUCCESS - in case of success 381 */ 382 QDF_STATUS target_if_deinit(void); 383 384 /** 385 * target_if_store_pdev_target_if_ctx() - stores objmgr pdev in target if ctx 386 * @pdev_hdl_cb: function pointer to get objmgr pdev 387 * 388 * Return: QDF_STATUS_SUCCESS - in case of success 389 */ 390 QDF_STATUS target_if_store_pdev_target_if_ctx( 391 get_pdev_handle_callback pdev_hdl_cb); 392 393 /** 394 * wlan_get_tgt_if_ctx() -Get target if ctx 395 * 396 * Return: target if ctx 397 */ 398 struct target_if_ctx *target_if_get_ctx(void); 399 400 /** 401 * target_if_get_psoc_from_scn_hdl() - get psoc from scn handle 402 * @scn_handle: scn handle 403 * 404 * This API is generally used while processing wmi event. 405 * In wmi event SCN handle will be passed by wmi hence 406 * using this API we can get psoc from scn handle. 407 * 408 * Return: index for matching scn handle 409 */ 410 struct wlan_objmgr_psoc *target_if_get_psoc_from_scn_hdl(void *scn_handle); 411 412 /** 413 * target_if_get_pdev_from_scn_hdl() - get pdev from scn handle 414 * @scn_handle: scn handle 415 * 416 * This API is generally used while processing wmi event. 417 * In wmi event SCN handle will be passed by wmi hence 418 * using this API we can get pdev from scn handle. 419 * 420 * Return: pdev for matching scn handle 421 */ 422 struct wlan_objmgr_pdev *target_if_get_pdev_from_scn_hdl(void *scn_handle); 423 424 /** target_if_register_tx_ops() - register tx_ops 425 * @tx_ops: tx_ops structure 426 * 427 * This function is to be used by components to populate 428 * the OL function pointers (tx_ops) required by the component 429 * for UMAC-LMAC interaction, with the appropriate handler 430 * 431 * Return: QDF STATUS 432 */ 433 QDF_STATUS target_if_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops); 434 435 /** 436 * target_if_get_psoc_legacy_service_ready_cb() - get psoc from scn handle 437 * 438 * This API is generally used while processing wmi event. 439 * In wmi event SCN handle will be passed by wmi hence 440 * using this API we can get psoc from scn handle. 441 * 442 * Return: wmi_legacy_service_ready_callback 443 */ 444 wmi_legacy_service_ready_callback 445 target_if_get_psoc_legacy_service_ready_cb(void); 446 447 /** 448 * target_if_register_legacy_service_ready_cb() - get legacy 449 * service ready handler from scn handle 450 * 451 * @service_ready_cb: function pointer to service ready callback 452 * 453 * Return: QDF Status 454 */ 455 QDF_STATUS target_if_register_legacy_service_ready_cb( 456 wmi_legacy_service_ready_callback service_ready_cb); 457 458 /** 459 * target_if_alloc_pdev_tgt_info() - alloc pdev tgt info 460 * @pdev: pointer to pdev 461 * 462 * API to allocate memory for target_pdev_info 463 * 464 * Return: SUCCESS on successful memory allocation or Failure 465 */ 466 QDF_STATUS target_if_alloc_pdev_tgt_info(struct wlan_objmgr_pdev *pdev); 467 468 /** 469 * target_if_free_pdev_tgt_info() - free pdev tgt info 470 * @pdev: pointer to pdev 471 * 472 * API to free allocated memory for target_pdev_info 473 * 474 * Return: SUCCESS on successful memory deallocation or Failure 475 */ 476 QDF_STATUS target_if_free_pdev_tgt_info(struct wlan_objmgr_pdev *pdev); 477 478 /** 479 * target_if_alloc_psoc_tgt_info() - alloc psoc tgt info 480 * @psoc: pointer to psoc 481 * 482 * API to allocate memory for target_psoc_info 483 * 484 * Return: SUCCESS on successful memory allocation or Failure 485 */ 486 QDF_STATUS target_if_alloc_psoc_tgt_info(struct wlan_objmgr_psoc *psoc); 487 488 /** 489 * target_if_free_psoc_tgt_info() - free psoc tgt info 490 * @psoc: pointer to psoc 491 * 492 * API to free allocated memory for target_psoc_info 493 * 494 * Return: SUCCESS on successful memory deallocation or Failure 495 */ 496 QDF_STATUS target_if_free_psoc_tgt_info(struct wlan_objmgr_psoc *psoc); 497 498 /** 499 * target_is_tgt_type_ar900b() - Check if the target type is AR900B 500 * @target_type: target type to be checked. 501 * 502 * Return: true if the target_type is AR900B, else false. 503 */ 504 bool target_is_tgt_type_ar900b(uint32_t target_type); 505 506 /** 507 * target_is_tgt_type_ipq4019() - Check if the target type is IPQ4019 508 * @target_type: target type to be checked. 509 * 510 * Return: true if the target_type is IPQ4019, else false. 511 */ 512 bool target_is_tgt_type_ipq4019(uint32_t target_type); 513 514 /** 515 * target_is_tgt_type_qca9984() - Check if the target type is QCA9984 516 * @target_type: target type to be checked. 517 * 518 * Return: true if the target_type is QCA9984, else false. 519 */ 520 bool target_is_tgt_type_qca9984(uint32_t target_type); 521 522 /** 523 * target_is_tgt_type_qca9888() - Check if the target type is QCA9888 524 * @target_type: target type to be checked. 525 * 526 * Return: true if the target_type is QCA9888, else false. 527 */ 528 bool target_is_tgt_type_qca9888(uint32_t target_type); 529 530 /** 531 * target_is_tgt_type_adrastea() - Check if the target type is QCS40X 532 * @target_type: target type to be checked. 533 * 534 * Return: true if the target_type is QCS40X, else false. 535 */ 536 bool target_is_tgt_type_adrastea(uint32_t target_type); 537 538 /** 539 * target_is_tgt_type_qcn9000() - Check if the target type is QCN9000 (pine) 540 * @target_type: target type to be checked. 541 * 542 * Return: true if the target_type is QCN9000, else false. 543 */ 544 bool target_is_tgt_type_qcn9000(uint32_t target_type); 545 546 /** 547 * target_is_tgt_type_qcn6122() - Check if the target type is QCN6122 (Spruce) 548 * @target_type: target type to be checked. 549 * 550 * Return: true if the target_type is QCN6122, else false. 551 */ 552 bool target_is_tgt_type_qcn6122(uint32_t target_type); 553 554 /** 555 * target_is_tgt_type_qcn7605() - Check if the target type is QCN7605 556 * @target_type: target type to be checked. 557 * 558 * Return: true if the target_type is QCN7605, else false. 559 */ 560 bool target_is_tgt_type_qcn7605(uint32_t target_type); 561 562 /** 563 * target_psoc_set_wlan_init_status() - set info wlan_init_status 564 * @psoc_info: pointer to structure target_psoc_info 565 * @wlan_init_status: FW init status 566 * 567 * API to set wlan_init_status 568 * 569 * Return: void 570 */ 571 static inline void target_psoc_set_wlan_init_status 572 (struct target_psoc_info *psoc_info, uint32_t wlan_init_status) 573 { 574 if (!psoc_info) 575 return; 576 577 psoc_info->info.wlan_init_status = wlan_init_status; 578 } 579 580 /** 581 * target_psoc_get_wlan_init_status() - get info wlan_init_status 582 * @psoc_info: pointer to structure target_psoc_info 583 * 584 * API to get wlan_init_status 585 * 586 * Return: uint32_t 587 */ 588 static inline uint32_t target_psoc_get_wlan_init_status 589 (struct target_psoc_info *psoc_info) 590 { 591 if (!psoc_info) 592 return (uint32_t)-1; 593 594 return psoc_info->info.wlan_init_status; 595 } 596 597 /** 598 * target_psoc_set_target_type() - set info target_type 599 * @psoc_info: pointer to structure target_psoc_info 600 * @target_type: Target type 601 * 602 * API to set target_type 603 * 604 * Return: void 605 */ 606 static inline void target_psoc_set_target_type 607 (struct target_psoc_info *psoc_info, uint32_t target_type) 608 { 609 if (!psoc_info) 610 return; 611 612 psoc_info->info.target_type = target_type; 613 } 614 615 /** 616 * target_psoc_get_target_type() - get info target_type 617 * @psoc_info: pointer to structure target_psoc_info 618 * 619 * API to get target_type 620 * 621 * Return: unit32_t 622 */ 623 static inline uint32_t target_psoc_get_target_type 624 (struct target_psoc_info *psoc_info) 625 { 626 if (!psoc_info) 627 return (uint32_t)-1; 628 629 return psoc_info->info.target_type; 630 } 631 632 /** 633 * target_psoc_set_max_descs() - set info max_descs 634 * @psoc_info: pointer to structure target_psoc_info 635 * @max_descs: Max descriptors 636 * 637 * API to set max_descs 638 * 639 * Return: void 640 */ 641 static inline void target_psoc_set_max_descs 642 (struct target_psoc_info *psoc_info, uint32_t max_descs) 643 { 644 if (!psoc_info) 645 return; 646 647 psoc_info->info.max_descs = max_descs; 648 } 649 650 /** 651 * target_psoc_get_max_descs() - get info max_descs 652 * @psoc_info: pointer to structure target_psoc_info 653 * 654 * API to get max_descs 655 * 656 * Return: unint32_t 657 */ 658 static inline uint32_t target_psoc_get_max_descs 659 (struct target_psoc_info *psoc_info) 660 { 661 if (!psoc_info) 662 return (uint32_t)-1; 663 664 return psoc_info->info.max_descs; 665 } 666 667 /** 668 * target_psoc_set_wmi_service_ready() - set info wmi_service_ready 669 * @psoc_info: pointer to structure target_psoc_info 670 * @wmi_service_ready: service ready flag 671 * 672 * API to set wmi_service_ready 673 * 674 * Return: void 675 */ 676 static inline void target_psoc_set_wmi_service_ready 677 (struct target_psoc_info *psoc_info, bool wmi_service_ready) 678 { 679 if (!psoc_info) 680 return; 681 682 psoc_info->info.wmi_service_ready = wmi_service_ready; 683 } 684 685 /** 686 * target_psoc_get_wmi_service_ready() - get info wmi_service_ready 687 * @psoc_info: pointer to structure target_psoc_info 688 * 689 * API to get wmi_service_ready 690 * 691 * Return: bool 692 */ 693 static inline bool target_psoc_get_wmi_service_ready 694 (struct target_psoc_info *psoc_info) 695 { 696 return psoc_info->info.wmi_service_ready; 697 } 698 699 /** 700 * target_psoc_set_wmi_ready() - set info wmi_ready 701 * @psoc_info: pointer to structure target_psoc_info 702 * @wmi_ready: Ready event flag 703 * 704 * API to set wmi_ready 705 * 706 * Return: void 707 */ 708 static inline void target_psoc_set_wmi_ready 709 (struct target_psoc_info *psoc_info, bool wmi_ready) 710 { 711 if (!psoc_info) 712 return; 713 714 psoc_info->info.wmi_ready = wmi_ready; 715 } 716 717 /** 718 * target_psoc_get_wmi_ready() - get info wmi_ready 719 * @psoc_info: pointer to structure target_psoc_info 720 * 721 * API to get wmi_ready 722 * 723 * Return: bool 724 */ 725 static inline bool target_psoc_get_wmi_ready 726 (struct target_psoc_info *psoc_info) 727 { 728 return psoc_info->info.wmi_ready; 729 } 730 731 /** 732 * target_psoc_set_preferred_hw_mode() - set preferred_hw_mode 733 * @psoc_info: pointer to structure target_psoc_info 734 * @preferred_hw_mode: Preferred HW mode 735 * 736 * API to set preferred_hw_mode 737 * 738 * Return: void 739 */ 740 static inline void target_psoc_set_preferred_hw_mode( 741 struct target_psoc_info *psoc_info, uint32_t preferred_hw_mode) 742 { 743 if (!psoc_info) 744 return; 745 746 psoc_info->info.preferred_hw_mode = preferred_hw_mode; 747 } 748 749 /** 750 * target_psoc_get_preferred_hw_mode() - get preferred_hw_mode 751 * @psoc_info: pointer to structure target_psoc_info 752 * 753 * API to get preferred_hw_mode 754 * 755 * Return: unint32_t 756 */ 757 static inline uint32_t target_psoc_get_preferred_hw_mode 758 (struct target_psoc_info *psoc_info) 759 { 760 if (!psoc_info) 761 return WMI_HOST_HW_MODE_MAX; 762 763 return psoc_info->info.preferred_hw_mode; 764 } 765 766 /** 767 * target_psoc_get_supported_hw_modes() - get supported_hw_mode in target 768 * @psoc_info: pointer to structure target_psoc_info 769 * 770 * API to get list of supported HW modes 771 * 772 * Return: pointer to target_supported_modes 773 */ 774 static inline struct target_supported_modes *target_psoc_get_supported_hw_modes 775 (struct target_psoc_info *psoc_info) 776 { 777 if (!psoc_info) 778 return NULL; 779 780 return &psoc_info->info.hw_modes; 781 } 782 783 /** 784 * target_psoc_set_wmi_timeout() - set wmi_timeout 785 * @psoc_info: pointer to structure target_psoc_info 786 * @wmi_timeout: WMI timeout value in sec 787 * 788 * API to set wmi_timeout 789 * 790 * Return: void 791 */ 792 static inline void target_psoc_set_wmi_timeout 793 (struct target_psoc_info *psoc_info, uint32_t wmi_timeout) 794 { 795 if (!psoc_info) 796 return; 797 798 psoc_info->info.wmi_timeout = wmi_timeout; 799 } 800 801 /** 802 * target_psoc_get_wmi_timeout() - get wmi_timeout 803 * @psoc_info: pointer to structure target_psoc_info 804 * 805 * API to get wmi_timeout 806 * 807 * Return: unint32_t 808 */ 809 static inline uint32_t target_psoc_get_wmi_timeout 810 (struct target_psoc_info *psoc_info) 811 { 812 if (!psoc_info) 813 return (uint32_t)-1; 814 815 return psoc_info->info.wmi_timeout; 816 } 817 818 /** 819 * target_psoc_set_total_mac_phy_cnt() - set total_mac_phy 820 * @psoc_info: pointer to structure target_psoc_infoa 821 * @total_mac_phy_cnt: Total MAC PHY cnt 822 * 823 * API to set total_mac_phy 824 * 825 * Return: void 826 */ 827 static inline void target_psoc_set_total_mac_phy_cnt 828 (struct target_psoc_info *psoc_info, uint8_t total_mac_phy_cnt) 829 { 830 if (!psoc_info) 831 return; 832 833 psoc_info->info.total_mac_phy_cnt = total_mac_phy_cnt; 834 } 835 836 /** 837 * target_psoc_get_total_mac_phy_cnt() - get total_mac_phy 838 * @psoc_info: pointer to structure target_psoc_info 839 * 840 * API to get total_mac_phy 841 * 842 * Return: unint8_t 843 */ 844 static inline uint8_t target_psoc_get_total_mac_phy_cnt( 845 struct target_psoc_info *psoc_info) 846 { 847 if (!psoc_info) 848 return 0; 849 850 return psoc_info->info.total_mac_phy_cnt; 851 } 852 853 /** 854 * target_psoc_set_num_radios() - set num of radios 855 * @psoc_info: pointer to structure target_psoc_info 856 * @num_radios: Number of radios 857 * 858 * API to set number of radios 859 * 860 * Return: number of radios 861 */ 862 static inline void target_psoc_set_num_radios( 863 struct target_psoc_info *psoc_info, uint8_t num_radios) 864 { 865 if (!psoc_info) 866 return; 867 868 psoc_info->info.num_radios = num_radios; 869 } 870 871 /** 872 * target_psoc_set_pdev_id_to_phy_id_map() - set pdev to phy id mapping 873 * @psoc_info: pointer to structure target_psoc_info 874 * @pdev_id: pdev id 875 * @phy_id: phy_id 876 * 877 * API to set pdev id to phy id mapping 878 * 879 * Return: void 880 */ 881 static inline void target_psoc_set_pdev_id_to_phy_id_map( 882 struct target_psoc_info *psoc_info, 883 uint8_t *phy_id_map) 884 { 885 if (!psoc_info) 886 return; 887 888 psoc_info->info.is_pdevid_to_phyid_map = true; 889 qdf_mem_copy(psoc_info->info.pdev_id_to_phy_id_map, phy_id_map, 890 PSOC_MAX_PHY_REG_CAP); 891 } 892 893 /** 894 * target_psoc_get_num_radios() - get number of radios 895 * @psoc_info: pointer to structure target_psoc_info 896 * 897 * API to get number_of_radios 898 * 899 * Return: number of radios 900 */ 901 static inline uint8_t target_psoc_get_num_radios 902 (struct target_psoc_info *psoc_info) 903 { 904 if (!psoc_info) 905 return 0; 906 907 return psoc_info->info.num_radios; 908 } 909 910 /** 911 * target_psoc_get_num_radios_for_mode() - get number of radios for a hw-mode 912 * @psoc_info: pointer to structure target_psoc_info 913 * 914 * API to get number_of_radios for a HW mode 915 * 916 * Return: number of radios 917 */ 918 919 static inline uint8_t target_psoc_get_num_radios_for_mode 920 (struct target_psoc_info *psoc_info, uint8_t mode) 921 { 922 uint8_t mac_phy_count; 923 uint8_t num_radios = 0; 924 struct tgt_info *info = &psoc_info->info; 925 926 if (!psoc_info) 927 return 0; 928 929 for (mac_phy_count = 0; 930 mac_phy_count < target_psoc_get_total_mac_phy_cnt(psoc_info); 931 mac_phy_count++) { 932 num_radios += 933 (info->mac_phy_cap[mac_phy_count].hw_mode_id == mode); 934 } 935 936 return num_radios; 937 } 938 939 /** 940 * target_psoc_set_service_bitmap() - set service_bitmap 941 * @psoc_info: pointer to structure target_psoc_info 942 * @service_bitmap: FW service bitmap 943 * 944 * API to set service_bitmap 945 * 946 * Return: void 947 */ 948 static inline void target_psoc_set_service_bitmap 949 (struct target_psoc_info *psoc_info, uint32_t *service_bitmap) 950 { 951 qdf_mem_copy(psoc_info->info.service_bitmap, service_bitmap, 952 sizeof(psoc_info->info.service_bitmap)); 953 } 954 955 /** 956 * target_psoc_get_service_bitmap() - get service_bitmap 957 * @psoc_info: pointer to structure target_psoc_info 958 * 959 * API to get service_bitmap 960 * 961 * Return: unint32_t 962 */ 963 static inline uint32_t *target_psoc_get_service_bitmap 964 (struct target_psoc_info *psoc_info) 965 { 966 return psoc_info->info.service_bitmap; 967 } 968 969 /** 970 * target_psoc_set_num_mem_chunks - set num_mem_chunks 971 * @psoc_info: pointer to structure target_psoc_info 972 & @num_mem_chunks: Num Memory chunks allocated for FW 973 * 974 * API to set num_mem_chunks 975 * 976 * Return: void 977 */ 978 static inline void target_psoc_set_num_mem_chunks( 979 struct target_psoc_info *psoc_info, uint32_t num_mem_chunks) 980 { 981 if (!psoc_info) 982 return; 983 psoc_info->info.num_mem_chunks = num_mem_chunks; 984 } 985 986 /** 987 * target_psoc_get_num_mem_chunks() - get num_mem_chunks 988 * @psoc_info: pointer to structure target_psoc_info 989 * 990 * API to get total_mac_phy 991 * 992 * Return: unint8_t 993 */ 994 static inline uint32_t target_psoc_get_num_mem_chunks 995 (struct target_psoc_info *psoc_info) 996 { 997 if (!psoc_info) 998 return (uint32_t)-1; 999 1000 return psoc_info->info.num_mem_chunks; 1001 } 1002 /** 1003 * target_psoc_set_hif_hdl - set hif_hdl 1004 * @psoc_info: pointer to structure target_psoc_info 1005 * @hif_hdl: HIF handle 1006 * 1007 * API to set hif_hdl 1008 * 1009 * Return: void 1010 */ 1011 static inline void target_psoc_set_hif_hdl 1012 (struct target_psoc_info *psoc_info, 1013 struct hif_opaque_softc *hif_hdl) 1014 { 1015 if (!psoc_info) 1016 return; 1017 1018 psoc_info->hdls.hif_hdl = hif_hdl; 1019 } 1020 1021 /** 1022 * target_psoc_get_hif_hdl() - get hif_hdl 1023 * @psoc_info: pointer to structure target_psoc_info 1024 * 1025 * API to get hif_hdl 1026 * 1027 * Return: hif_hdl 1028 */ 1029 static inline struct hif_opaque_softc *target_psoc_get_hif_hdl 1030 (struct target_psoc_info *psoc_info) 1031 { 1032 if (!psoc_info) 1033 return NULL; 1034 1035 return psoc_info->hdls.hif_hdl; 1036 } 1037 1038 /** 1039 * target_psoc_set_hif_hdl - set htc_hdl 1040 * @psoc_info: pointer to structure target_psoc_info 1041 * @htc_hdl: HTC handle 1042 * 1043 * API to set htc_hdl 1044 * 1045 * Return: void 1046 */ 1047 static inline void target_psoc_set_htc_hdl( 1048 struct target_psoc_info *psoc_info, 1049 HTC_HANDLE htc_hdl) 1050 { 1051 if (!psoc_info) 1052 return; 1053 1054 psoc_info->hdls.htc_hdl = htc_hdl; 1055 } 1056 1057 /** 1058 * target_psoc_get_htc_hdl() - get htc_hdl 1059 * @psoc_info: pointer to structure target_psoc_info 1060 * 1061 * API to get htc_hdl 1062 * 1063 * Return: htc_hdl 1064 */ 1065 static inline HTC_HANDLE target_psoc_get_htc_hdl 1066 (struct target_psoc_info *psoc_info) 1067 { 1068 if (!psoc_info) 1069 return NULL; 1070 1071 return psoc_info->hdls.htc_hdl; 1072 } 1073 /** 1074 * target_psoc_set_wmi_hdl - set wmi_hdl 1075 * @psoc_info: pointer to structure target_psoc_info 1076 * @wmi_hdl: WMI handle 1077 * 1078 * API to set wmi_hdl 1079 * 1080 * Return: void 1081 */ 1082 static inline void target_psoc_set_wmi_hdl 1083 (struct target_psoc_info *psoc_info, 1084 struct wmi_unified *wmi_hdl) 1085 { 1086 if (!psoc_info) 1087 return; 1088 1089 psoc_info->hdls.wmi_hdl = wmi_hdl; 1090 } 1091 1092 /** 1093 * target_psoc_get_wmi_hdl() - get wmi_hdl 1094 * @psoc_info: pointer to structure target_psoc_info 1095 * 1096 * API to get wmi_hdl 1097 * 1098 * Return: wmi_hdl 1099 */ 1100 static inline struct wmi_unified *target_psoc_get_wmi_hdl 1101 (struct target_psoc_info *psoc_info) 1102 { 1103 if (!psoc_info) 1104 return NULL; 1105 1106 return psoc_info->hdls.wmi_hdl; 1107 } 1108 1109 /** 1110 * target_psoc_set_accelerator_hdl - set accelerator_hdl 1111 * @psoc_info: pointer to structure target_psoc_info 1112 * @accelerator_hdl: Accelator handle 1113 * 1114 * API to set accelerator_hdl 1115 * 1116 * Return: void 1117 */ 1118 static inline void target_psoc_set_accelerator_hdl 1119 (struct target_psoc_info *psoc_info, 1120 struct common_accelerator_handle *accelerator_hdl) 1121 { 1122 if (!psoc_info) 1123 return; 1124 1125 psoc_info->hdls.accelerator_hdl = accelerator_hdl; 1126 } 1127 1128 /** 1129 * target_psoc_get_accelerator_hdl() - get accelerator_hdl 1130 * @psoc_info: pointer to structure target_psoc_info 1131 * 1132 * API to get accelerator_hdl 1133 * 1134 * Return: accelerator_hdl 1135 */ 1136 static inline 1137 struct common_accelerator_handle *target_psoc_get_accelerator_hdl 1138 (struct target_psoc_info *psoc_info) 1139 { 1140 if (!psoc_info) 1141 return NULL; 1142 1143 return psoc_info->hdls.accelerator_hdl; 1144 } 1145 1146 /** 1147 * target_psoc_set_feature_ptr - set feature_ptr 1148 * @psoc_info: pointer to structure target_psoc_info 1149 * @feature_ptr: set feature pointer 1150 * 1151 * API to set feature_ptr 1152 * 1153 * Return: void 1154 */ 1155 static inline void target_psoc_set_feature_ptr 1156 (struct target_psoc_info *psoc_info, void *feature_ptr) 1157 { 1158 if (!psoc_info) 1159 return; 1160 1161 psoc_info->feature_ptr = feature_ptr; 1162 } 1163 1164 /** 1165 * target_psoc_get_feature_ptr() - get feature_ptr 1166 * @psoc_info: pointer to structure target_psoc_info 1167 * 1168 * API to get feature_ptr 1169 * 1170 * Return: feature_ptr 1171 */ 1172 static inline void *target_psoc_get_feature_ptr 1173 (struct target_psoc_info *psoc_info) 1174 { 1175 if (!psoc_info) 1176 return NULL; 1177 1178 return psoc_info->feature_ptr; 1179 } 1180 1181 /** 1182 * target_psoc_get_version()- get host_fw_ver version 1183 * @psoc_info: pointer to structure target_psoc_info 1184 * 1185 * API to get host_fw_ver version 1186 * 1187 * Return: void 1188 */ 1189 static inline struct host_fw_ver *target_psoc_get_version 1190 (struct target_psoc_info *psoc_info) 1191 { 1192 return &psoc_info->info.version; 1193 } 1194 1195 /** 1196 * target_psoc_get_target_ver()- get target version 1197 * @psoc_info: pointer to structure target_psoc_info 1198 * 1199 * API to get target version 1200 * 1201 * Return: target version 1202 */ 1203 static inline uint32_t target_psoc_get_target_ver 1204 (struct target_psoc_info *psoc_info) 1205 { 1206 return psoc_info->info.version.target_ver; 1207 } 1208 1209 /** 1210 * target_psoc_set_target_ver()- set target version 1211 * @psoc_info: pointer to structure target_psoc_info 1212 * @target_ver: Target version 1213 * 1214 * API to set target version 1215 * 1216 * Return: void 1217 */ 1218 static inline void target_psoc_set_target_ver 1219 (struct target_psoc_info *psoc_info, uint32_t target_ver) 1220 { 1221 if (!psoc_info) 1222 return; 1223 1224 psoc_info->info.version.target_ver = target_ver; 1225 } 1226 1227 /** 1228 * target_psoc_set_target_rev()- set target revision 1229 * @psoc_info: pointer to structure target_psoc_info 1230 * @target_rev: Target revision 1231 * 1232 * API to get target version 1233 * 1234 * Return: void 1235 */ 1236 static inline void target_psoc_set_target_rev 1237 (struct target_psoc_info *psoc_info, uint32_t target_rev) 1238 { 1239 if (!psoc_info) 1240 return; 1241 1242 psoc_info->info.version.target_rev = target_rev; 1243 } 1244 1245 /** 1246 * target_psoc_get_target_rev()- get target revision 1247 * @psoc_info: pointer to structure target_psoc_info 1248 * 1249 * API to get target revision 1250 * 1251 * Return: target revision 1252 */ 1253 static inline uint32_t target_psoc_get_target_rev 1254 (struct target_psoc_info *psoc_info) 1255 { 1256 return psoc_info->info.version.target_rev; 1257 } 1258 1259 /** 1260 * target_psoc_set_dbglog_hdl - set dbglog_hdl 1261 * @psoc_info: pointer to structure target_psoc_info 1262 * @dbglog_hdl: dbglog handle 1263 * 1264 * API to set dbglog_hdl 1265 * 1266 * Return: void 1267 */ 1268 static inline void target_psoc_set_dbglog_hdl 1269 (struct target_psoc_info *psoc_info, 1270 struct common_dbglog_handle *dbglog_hdl) 1271 { 1272 if (!psoc_info) 1273 return; 1274 1275 psoc_info->hdls.dbglog_hdl = dbglog_hdl; 1276 } 1277 1278 /** 1279 * target_psoc_get_dbglog_hdl() - get dbglog_hdl 1280 * @psoc_info: pointer to structure target_psoc_info 1281 * 1282 * API to get dbglog_hdl 1283 * 1284 * Return: dbglog_hdl 1285 */ 1286 static inline struct common_dbglog_handle *target_psoc_get_dbglog_hdl 1287 (struct target_psoc_info *psoc_info) 1288 { 1289 if (!psoc_info) 1290 return NULL; 1291 1292 return psoc_info->hdls.dbglog_hdl; 1293 } 1294 1295 /** 1296 * target_psoc_get_wlan_res_cfg() - get wlan_res_cfg 1297 * @psoc_info: pointer to structure target_psoc_info 1298 * 1299 * API to get wlan_res_cfg 1300 * 1301 * Return: structure pointer to host_fw_ver 1302 */ 1303 static inline target_resource_config *target_psoc_get_wlan_res_cfg 1304 (struct target_psoc_info *psoc_info) 1305 { 1306 if (!psoc_info) 1307 return NULL; 1308 1309 return &psoc_info->info.wlan_res_cfg; 1310 } 1311 1312 /** 1313 * target_psoc_get_wlan_ext_res_cfg() - get wlan_ext_res_cfg 1314 * @psoc_info: pointer to structure target_psoc_info 1315 * 1316 * API to get wlan_ext_res_cfg 1317 * 1318 * Return: structure pointer to wmi_host_ext_resource_config 1319 */ 1320 static inline wmi_host_ext_resource_config *target_psoc_get_wlan_ext_res_cfg 1321 (struct target_psoc_info *psoc_info) 1322 { 1323 if (!psoc_info) 1324 return NULL; 1325 1326 return &psoc_info->info.wlan_ext_res_cfg; 1327 } 1328 1329 /** 1330 * target_psoc_get_event_queue() - get event_queue 1331 * @psoc_info: pointer to structure target_psoc_info 1332 * 1333 * API to get event_queue 1334 * 1335 * Return: structure pointer to qdf_wait_queue_head_t 1336 */ 1337 static inline qdf_event_t *target_psoc_get_event 1338 (struct target_psoc_info *psoc_info) 1339 { 1340 if (!psoc_info) 1341 return NULL; 1342 1343 return &psoc_info->info.event; 1344 } 1345 1346 /** 1347 * target_psoc_get_target_caps() - get target_caps 1348 * @psoc_info: pointer to structure target_psoc_info 1349 * 1350 * API to get target_caps 1351 * 1352 * Return: structure pointer to wlan_psoc_target_capability_info 1353 */ 1354 static inline struct wlan_psoc_target_capability_info 1355 *target_psoc_get_target_caps(struct target_psoc_info *psoc_info) 1356 { 1357 if (!psoc_info) 1358 return NULL; 1359 1360 return &psoc_info->info.target_caps; 1361 } 1362 1363 /** 1364 * target_psoc_get_service_ext_param() - get service_ext_param 1365 * @psoc_info: pointer to structure target_psoc_info 1366 * 1367 * API to get service_ext_param 1368 * 1369 * Return: structure pointer to wlan_psoc_host_service_ext_param 1370 */ 1371 static inline struct wlan_psoc_host_service_ext_param 1372 *target_psoc_get_service_ext_param 1373 (struct target_psoc_info *psoc_info) 1374 { 1375 if (!psoc_info) 1376 return NULL; 1377 1378 return &psoc_info->info.service_ext_param; 1379 } 1380 1381 /** 1382 * target_psoc_get_num_dbr_ring_caps() - get no of dbr_ring_caps 1383 * @psoc_info: pointer to structure target_psoc_info 1384 * 1385 * API to get num_dbr_ring_caps 1386 * 1387 * Return: no of dbr_ring_caps 1388 */ 1389 static inline uint32_t target_psoc_get_num_dbr_ring_caps 1390 (struct target_psoc_info *psoc_info) 1391 { 1392 if (!psoc_info) 1393 return 0; 1394 1395 if (psoc_info->info.service_ext_param.num_dbr_ring_caps) 1396 return psoc_info->info.service_ext_param.num_dbr_ring_caps; 1397 1398 return psoc_info->info.service_ext2_param.num_dbr_ring_caps; 1399 } 1400 1401 /** 1402 * target_psoc_get_num_scan_radio_caps() - get no of scan_radio_caps 1403 * @psoc_info: pointer to structure target_psoc_info 1404 * 1405 * API to get num_scan_radio_caps 1406 * 1407 * Return: no of scan_radio_caps 1408 */ 1409 static inline uint32_t target_psoc_get_num_scan_radio_caps 1410 (struct target_psoc_info *psoc_info) 1411 { 1412 if (!psoc_info) 1413 return 0; 1414 1415 return psoc_info->info.service_ext2_param.num_scan_radio_caps; 1416 } 1417 1418 /** 1419 * target_psoc_get_mac_phy_cap_for_mode() - get mac_phy_cap for a hw-mode 1420 * @psoc_info: pointer to structure target_psoc_info 1421 * 1422 * API to get mac_phy_cap for a specified hw-mode 1423 * 1424 * Return: structure pointer to wlan_psoc_host_mac_phy_caps 1425 */ 1426 1427 static inline struct wlan_psoc_host_mac_phy_caps 1428 *target_psoc_get_mac_phy_cap_for_mode 1429 (struct target_psoc_info *psoc_info, uint8_t mode) 1430 { 1431 uint8_t mac_phy_idx; 1432 struct tgt_info *info = &psoc_info->info; 1433 1434 if (!psoc_info) 1435 return NULL; 1436 1437 for (mac_phy_idx = 0; 1438 mac_phy_idx < PSOC_MAX_MAC_PHY_CAP; 1439 mac_phy_idx++) 1440 if (info->mac_phy_cap[mac_phy_idx].hw_mode_id == mode) 1441 break; 1442 1443 if (mac_phy_idx == PSOC_MAX_MAC_PHY_CAP) 1444 return NULL; 1445 1446 return &info->mac_phy_cap[mac_phy_idx]; 1447 } 1448 1449 /** 1450 * target_psoc_get_mac_phy_cap_ext2_for_mode() - get mac_phy_caps_ext2 1451 * for a hw-mode 1452 * @psoc_info: pointer to structure target_psoc_info 1453 * @mode: hw mode 1454 * 1455 * API to get mac_phy_cap for a specified hw-mode 1456 * 1457 * Return: structure pointer to wlan_psoc_host_mac_phy_caps_ext2 1458 */ 1459 1460 static inline struct wlan_psoc_host_mac_phy_caps_ext2 1461 *target_psoc_get_mac_phy_cap_ext2_for_mode 1462 (struct target_psoc_info *psoc_info, uint8_t mode) 1463 { 1464 uint8_t mac_phy_idx; 1465 struct tgt_info *info = &psoc_info->info; 1466 1467 if (!psoc_info) 1468 return NULL; 1469 1470 for (mac_phy_idx = 0; 1471 mac_phy_idx < PSOC_MAX_MAC_PHY_CAP; 1472 mac_phy_idx++) 1473 if (info->mac_phy_caps_ext2[mac_phy_idx].hw_mode_id == mode) 1474 break; 1475 1476 if (mac_phy_idx == PSOC_MAX_MAC_PHY_CAP) 1477 return NULL; 1478 1479 return &info->mac_phy_caps_ext2[mac_phy_idx]; 1480 } 1481 1482 /** 1483 * target_psoc_get_mac_phy_cap() - get mac_phy_cap 1484 * @psoc_info: pointer to structure target_psoc_info 1485 * 1486 * API to get mac_phy_cap 1487 * 1488 * Return: structure pointer to wlan_psoc_host_mac_phy_caps 1489 */ 1490 static inline struct wlan_psoc_host_mac_phy_caps *target_psoc_get_mac_phy_cap 1491 (struct target_psoc_info *psoc_info) 1492 { 1493 uint32_t preferred_hw_mode; 1494 struct wlan_psoc_host_mac_phy_caps *mac_phy_cap; 1495 1496 if (!psoc_info) 1497 return NULL; 1498 1499 preferred_hw_mode = 1500 target_psoc_get_preferred_hw_mode(psoc_info); 1501 1502 if (preferred_hw_mode < WMI_HOST_HW_MODE_MAX) { 1503 mac_phy_cap = 1504 target_psoc_get_mac_phy_cap_for_mode 1505 (psoc_info, preferred_hw_mode); 1506 } else { 1507 mac_phy_cap = psoc_info->info.mac_phy_cap; 1508 } 1509 1510 return mac_phy_cap; 1511 } 1512 1513 /** 1514 * target_psoc_get_mac_phy_cap_ext2() - get mac_phy_caps_ext2 1515 * @psoc_info: pointer to structure target_psoc_info 1516 * 1517 * API to get mac_phy_caps_ext2 1518 * 1519 * Return: structure pointer to wlan_psoc_host_mac_phy_caps 1520 */ 1521 static inline struct wlan_psoc_host_mac_phy_caps_ext2 1522 *target_psoc_get_mac_phy_cap_ext2 1523 (struct target_psoc_info *psoc_info) 1524 { 1525 uint32_t preferred_hw_mode; 1526 struct wlan_psoc_host_mac_phy_caps_ext2 *mac_phy_caps_ext2; 1527 1528 if (!psoc_info) 1529 return NULL; 1530 1531 preferred_hw_mode = 1532 target_psoc_get_preferred_hw_mode(psoc_info); 1533 1534 if (preferred_hw_mode < WMI_HOST_HW_MODE_MAX) { 1535 mac_phy_caps_ext2 = 1536 target_psoc_get_mac_phy_cap_ext2_for_mode 1537 (psoc_info, preferred_hw_mode); 1538 } else { 1539 mac_phy_caps_ext2 = psoc_info->info.mac_phy_caps_ext2; 1540 } 1541 1542 return mac_phy_caps_ext2; 1543 } 1544 1545 /** 1546 * target_psoc_get_dbr_ring_caps() - get dbr_ring_cap 1547 * @psoc_info: pointer to structure target_psoc_info 1548 * 1549 * API to get dbr_ring_cap 1550 * 1551 * Return: structure pointer to wlan_psoc_host_dbr_ring_caps 1552 */ 1553 static inline struct wlan_psoc_host_dbr_ring_caps 1554 *target_psoc_get_dbr_ring_caps(struct target_psoc_info *psoc_info) 1555 { 1556 if (!psoc_info) 1557 return NULL; 1558 1559 return psoc_info->info.dbr_ring_cap; 1560 } 1561 1562 /** 1563 * target_psoc_get_scan_radio_caps() - get scan_radio_cap 1564 * @psoc_info: pointer to structure target_psoc_info 1565 * 1566 * API to get scan_radio_cap 1567 * 1568 * Return: structure pointer to wlan_psoc_host_scan_radio_caps 1569 */ 1570 static inline struct wlan_psoc_host_scan_radio_caps 1571 *target_psoc_get_scan_radio_caps(struct target_psoc_info *psoc_info) 1572 { 1573 if (!psoc_info) 1574 return NULL; 1575 1576 return psoc_info->info.scan_radio_caps; 1577 } 1578 1579 /** 1580 * target_psoc_get_spectral_scaling_params() - get Spectral scaling params 1581 * @psoc_info: pointer to structure target_psoc_info 1582 * 1583 * API to get Spectral scaling params 1584 * 1585 * Return: structure pointer to wlan_psoc_host_spectral_scaling_params 1586 */ 1587 static inline struct wlan_psoc_host_spectral_scaling_params 1588 *target_psoc_get_spectral_scaling_params( 1589 struct target_psoc_info *psoc_info) 1590 { 1591 if (!psoc_info) 1592 return NULL; 1593 1594 return psoc_info->info.scaling_params; 1595 } 1596 1597 /** 1598 * target_psoc_get_mem_chunks() - get mem_chunks 1599 * @psoc_info: pointer to structure target_psoc_info 1600 * 1601 * API to get mem_chunks 1602 * 1603 * Return: structure pointer to wmi_host_mem_chunk 1604 */ 1605 static inline struct wmi_host_mem_chunk *target_psoc_get_mem_chunks 1606 (struct target_psoc_info *psoc_info) 1607 { 1608 if (!psoc_info) 1609 return NULL; 1610 1611 return psoc_info->info.mem_chunks; 1612 } 1613 1614 /** 1615 * target_psoc_get_tif_ops() - get tif_ops 1616 * @psoc_info: pointer to structure target_psoc_info 1617 * 1618 * API to get tif_ops 1619 * 1620 * Return: structure pointer to target_ops 1621 */ 1622 static inline struct target_ops *target_psoc_get_tif_ops 1623 (struct target_psoc_info *psoc_info) 1624 { 1625 if (!psoc_info) 1626 return NULL; 1627 1628 return psoc_info->tif_ops; 1629 } 1630 1631 /** 1632 * target_pdev_set_feature_ptr - set feature_ptr 1633 * @pdev_info: pointer to structure target_pdev_info 1634 * @feature_ptr: Feature pointer 1635 * 1636 * API to set feature_ptr 1637 * 1638 * Return: void 1639 */ 1640 static inline void target_pdev_set_feature_ptr 1641 (struct target_pdev_info *pdev_info, void *feature_ptr) 1642 { 1643 if (!pdev_info) 1644 return; 1645 1646 pdev_info->feature_ptr = feature_ptr; 1647 } 1648 1649 /** 1650 * target_pdev_get_feature_ptr() - get feature_ptr 1651 * @pdev_info: pointer to structure target_pdev_info 1652 * 1653 * API to get feature_ptr 1654 * 1655 * Return: feature_ptr 1656 */ 1657 static inline void *target_pdev_get_feature_ptr 1658 (struct target_pdev_info *pdev_info) 1659 { 1660 if (!pdev_info) 1661 return NULL; 1662 1663 return pdev_info->feature_ptr; 1664 } 1665 1666 /** 1667 * target_pdev_set_wmi_handle - set wmi_handle 1668 * @pdev_info: pointer to structure target_pdev_info 1669 * @wmi_handle: WMI handle 1670 * 1671 * API to set wmi_handle 1672 * 1673 * Return: void 1674 */ 1675 static inline void target_pdev_set_wmi_handle 1676 (struct target_pdev_info *pdev_info, 1677 struct wmi_unified *wmi_handle) 1678 { 1679 if (!pdev_info) 1680 return; 1681 1682 pdev_info->wmi_handle = wmi_handle; 1683 } 1684 1685 /** 1686 * target_pdev_get_wmi_handle - get wmi_handle 1687 * @pdev_info: pointer to structure target_dev_info 1688 * 1689 * API to get wmi_handle 1690 * 1691 * Return: wmi_handle 1692 */ 1693 static inline struct wmi_unified *target_pdev_get_wmi_handle 1694 (struct target_pdev_info *pdev_info) 1695 { 1696 if (!pdev_info) 1697 return NULL; 1698 1699 return pdev_info->wmi_handle; 1700 } 1701 1702 /** 1703 * target_pdev_set_accelerator_hdl - set accelerator_hdl 1704 * @pdev_info: pointer to structure target_pdev_info 1705 * @accelerator_hdl: Accelator handle 1706 * 1707 * API to set accelerator_hdl 1708 * 1709 * Return: void 1710 */ 1711 static inline void target_pdev_set_accelerator_hdl 1712 (struct target_pdev_info *pdev_info, 1713 struct common_accelerator_handle *accelerator_hdl) 1714 { 1715 if (!pdev_info) 1716 return; 1717 1718 pdev_info->accelerator_hdl = accelerator_hdl; 1719 } 1720 1721 /** 1722 * target_pdev_get_accelerator_hdl - get accelerator_hdl 1723 * @pdev_info: pointer to structure target_dev_info 1724 * 1725 * API to get accelerator_hdl 1726 * 1727 * Return: accelerator_hdl 1728 */ 1729 static inline struct common_accelerator_handle * 1730 target_pdev_get_accelerator_hdl(struct target_pdev_info *pdev_info) 1731 { 1732 if (!pdev_info) 1733 return NULL; 1734 1735 return pdev_info->accelerator_hdl; 1736 } 1737 1738 /** 1739 * target_pdev_set_pdev_idx - set pdev_idx 1740 * @pdev_info: pointer to structure target_pdev_info 1741 * @pdev_idx: PDEV id of FW 1742 * 1743 * API to set pdev_idx 1744 * 1745 * Return: void 1746 */ 1747 static inline void target_pdev_set_pdev_idx 1748 (struct target_pdev_info *pdev_info, int32_t pdev_idx) 1749 { 1750 if (!pdev_info) 1751 return; 1752 1753 pdev_info->pdev_idx = pdev_idx; 1754 } 1755 1756 /** 1757 * target_pdev_get_pdev_idx - get pdev_idx 1758 * @pdev_info: pointer to structure target_dev_info 1759 * 1760 * API to get pdev_idx 1761 * 1762 * Return: int32_t 1763 */ 1764 static inline int32_t target_pdev_get_pdev_idx 1765 (struct target_pdev_info *pdev_info) 1766 { 1767 if (!pdev_info) 1768 return -EINVAL; 1769 1770 return pdev_info->pdev_idx; 1771 } 1772 1773 /** 1774 * target_pdev_set_phy_idx - set phy_idx 1775 * @pdev_info: pointer to structure target_pdev_info 1776 * @phy_idx: phy ID of FW 1777 * 1778 * API to set phy_idx 1779 * 1780 * Return: void 1781 */ 1782 static inline void target_pdev_set_phy_idx 1783 (struct target_pdev_info *pdev_info, int32_t phy_idx) 1784 { 1785 if (!pdev_info) 1786 return; 1787 1788 pdev_info->phy_idx = phy_idx; 1789 } 1790 1791 /** 1792 * target_pdev_get_phy_idx - get phy_idx 1793 * @pdev_info: pointer to structure target_dev_info 1794 * 1795 * API to get phy_idx 1796 * 1797 * Return: int32_t 1798 */ 1799 static inline int32_t target_pdev_get_phy_idx 1800 (struct target_pdev_info *pdev_info) 1801 { 1802 if (!pdev_info) 1803 return -EINVAL; 1804 1805 return pdev_info->phy_idx; 1806 } 1807 1808 /** 1809 * GET_WMI_HDL_FROM_PSOC - get wmi handle from psoc 1810 * @psoc: psoc object 1811 * 1812 * API to get wmi_handle from psoc 1813 * 1814 * Return: wmi_handle on success 1815 * if tgt handle is not initialized, it returns NULL 1816 */ 1817 static inline struct wmi_unified *GET_WMI_HDL_FROM_PSOC( 1818 struct wlan_objmgr_psoc *psoc) 1819 { 1820 struct target_psoc_info *tgt_if_handle; 1821 1822 if (psoc) { 1823 tgt_if_handle = psoc->tgt_if_handle; 1824 1825 if (tgt_if_handle) 1826 return target_psoc_get_wmi_hdl(tgt_if_handle); 1827 else 1828 return NULL; 1829 } 1830 1831 return NULL; 1832 } 1833 1834 /** 1835 * GET_WMI_HDL_FROM_PDEV - get wmi handle from pdev 1836 * @pdev: pdev object 1837 * 1838 * API to get wmi_handle from pdev 1839 * 1840 * Return: wmi_handle on success 1841 * if tgt handle is not initialized, it returns NULL 1842 */ 1843 static inline struct wmi_unified *GET_WMI_HDL_FROM_PDEV( 1844 struct wlan_objmgr_pdev *pdev) 1845 { 1846 struct target_pdev_info *tgt_if_handle; 1847 1848 if (pdev) { 1849 tgt_if_handle = pdev->tgt_if_handle; 1850 1851 if (tgt_if_handle) 1852 return target_pdev_get_wmi_handle(tgt_if_handle); 1853 else 1854 return NULL; 1855 } 1856 1857 return NULL; 1858 } 1859 1860 /** 1861 * get_wmi_unified_hdl_from_psoc - get wmi handle from psoc 1862 * @psoc: psoc object 1863 * 1864 * API to get wmi_handle from psoc 1865 * 1866 * Return: wmi_handle on success 1867 * if tgt handle is not initialized, it returns NULL 1868 */ 1869 static inline wmi_unified_t 1870 get_wmi_unified_hdl_from_psoc(struct wlan_objmgr_psoc *psoc) 1871 { 1872 return (wmi_unified_t)GET_WMI_HDL_FROM_PSOC(psoc); 1873 } 1874 1875 /** 1876 * get_wmi_unified_hdl_from_pdev - get wmi handle from pdev 1877 * @pdev: pdev object 1878 * 1879 * API to get wmi_handle from pdev 1880 * 1881 * Return: wmi_handle on success 1882 * if tgt handle is not initialized, it returns NULL 1883 */ 1884 static inline wmi_unified_t 1885 get_wmi_unified_hdl_from_pdev(struct wlan_objmgr_pdev *pdev) 1886 { 1887 return (wmi_unified_t)GET_WMI_HDL_FROM_PDEV(pdev); 1888 } 1889 1890 /** 1891 * target_if_ext_res_cfg_enable - Enable ext resource config 1892 * @psoc: psoc object 1893 * @tgt_hdl: target_psoc_info pointer 1894 * @evt_buf: Event buffer received from FW 1895 * 1896 * API to enable Ext resource config 1897 * 1898 * Return: none 1899 */ 1900 static inline void target_if_ext_res_cfg_enable(struct wlan_objmgr_psoc *psoc, 1901 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 1902 { 1903 if ((tgt_hdl->tif_ops) && 1904 (tgt_hdl->tif_ops->ext_resource_config_enable)) 1905 tgt_hdl->tif_ops->ext_resource_config_enable(psoc, 1906 tgt_hdl, evt_buf); 1907 } 1908 1909 /** 1910 * target_if_peer_cfg_enable - Enable peer config 1911 * @psoc: psoc object 1912 * @tgt_hdl: target_psoc_info pointer 1913 * @evt_buf: Event buffer received from FW 1914 * 1915 * API to enable peer config 1916 * 1917 * Return: none 1918 */ 1919 static inline void target_if_peer_cfg_enable(struct wlan_objmgr_psoc *psoc, 1920 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 1921 { 1922 if ((tgt_hdl->tif_ops) && 1923 (tgt_hdl->tif_ops->peer_config)) 1924 tgt_hdl->tif_ops->peer_config(psoc, tgt_hdl, evt_buf); 1925 } 1926 1927 /** 1928 * target_if_mesh_support_enable - Enable MESH mode support 1929 * @psoc: psoc object 1930 * @tgt_hdl: target_psoc_info pointer 1931 * @evt_buf: Event buffer received from FW 1932 * 1933 * API to enable Mesh mode 1934 * 1935 * Return: none 1936 */ 1937 static inline void target_if_mesh_support_enable(struct wlan_objmgr_psoc *psoc, 1938 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 1939 { 1940 if ((tgt_hdl->tif_ops) && 1941 (tgt_hdl->tif_ops->mesh_support_enable)) 1942 tgt_hdl->tif_ops->mesh_support_enable(psoc, tgt_hdl, evt_buf); 1943 } 1944 1945 /** 1946 * target_if_eapol_minrate_enable - Enable EAPOL Minrate in Tunnel Mode 1947 * @psoc: psoc object 1948 * @tgt_hdl: target_psoc_info pointer 1949 * @evt_buf: Event buffer received from FW 1950 * 1951 * API to enable eapol minrate 1952 * 1953 * Return: none 1954 */ 1955 static inline void target_if_eapol_minrate_enable(struct wlan_objmgr_psoc *psoc, 1956 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 1957 { 1958 if ((tgt_hdl->tif_ops) && 1959 (tgt_hdl->tif_ops->eapol_minrate_enable)) 1960 tgt_hdl->tif_ops->eapol_minrate_enable(psoc, tgt_hdl, evt_buf); 1961 } 1962 1963 /** 1964 * target_if_smart_antenna_enable - Enable Smart antenna module 1965 * @psoc: psoc object 1966 * @tgt_hdl: target_psoc_info pointer 1967 * @evt_buf: Event buffer received from FW 1968 * 1969 * API to enable Smart antenna 1970 * 1971 * Return: none 1972 */ 1973 static inline void target_if_smart_antenna_enable(struct wlan_objmgr_psoc *psoc, 1974 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 1975 { 1976 if ((tgt_hdl->tif_ops) && 1977 (tgt_hdl->tif_ops->smart_antenna_enable)) 1978 tgt_hdl->tif_ops->smart_antenna_enable(psoc, tgt_hdl, evt_buf); 1979 } 1980 1981 /** 1982 * target_if_cfr_support_enable - Enable cfr support 1983 * @psoc: psoc object 1984 * @tgt_hdl: target_psoc_info pointer 1985 * @evt_buf: Event buffer received from FW 1986 * 1987 * API to enable cfr support 1988 * 1989 * Return: none 1990 */ 1991 static inline void target_if_cfr_support_enable(struct wlan_objmgr_psoc *psoc, 1992 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 1993 { 1994 if ((tgt_hdl->tif_ops) && 1995 (tgt_hdl->tif_ops->cfr_support_enable)) 1996 tgt_hdl->tif_ops->cfr_support_enable(psoc, tgt_hdl, evt_buf); 1997 } 1998 1999 /** 2000 * target_if_set_pktlog_checksum - Set pktlog checksum 2001 * @pdev: pdev object 2002 * @tgt_hdl: target_psoc_info pointer 2003 * @checksum: checksum received from FW 2004 * 2005 * API to set pktlog checksum 2006 * 2007 * Return: none 2008 */ 2009 static inline void target_if_set_pktlog_checksum(struct wlan_objmgr_pdev *pdev, 2010 struct target_psoc_info *tgt_hdl, uint32_t checksum) 2011 { 2012 if ((tgt_hdl->tif_ops) && 2013 (tgt_hdl->tif_ops->set_pktlog_checksum)) 2014 tgt_hdl->tif_ops->set_pktlog_checksum(pdev, checksum); 2015 } 2016 2017 /** 2018 * target_if_atf_cfg_enable - Enable ATF config 2019 * @psoc: psoc object 2020 * @tgt_hdl: target_psoc_info pointer 2021 * @evt_buf: Event buffer received from FW 2022 * 2023 * API to enable ATF config 2024 * 2025 * Return: none 2026 */ 2027 static inline void target_if_atf_cfg_enable(struct wlan_objmgr_psoc *psoc, 2028 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 2029 { 2030 if ((tgt_hdl->tif_ops) && 2031 (tgt_hdl->tif_ops->atf_config_enable)) 2032 tgt_hdl->tif_ops->atf_config_enable(psoc, tgt_hdl, evt_buf); 2033 } 2034 2035 /** 2036 * target_if_qwrap_cfg_enable - Enable QWRAP config 2037 * @psoc: psoc object 2038 * @tgt_hdl: target_psoc_info pointer 2039 * @evt_buf: Event buffer received from FW 2040 * 2041 * API to enable QWRAP config 2042 * 2043 * Return: none 2044 */ 2045 static inline void target_if_qwrap_cfg_enable(struct wlan_objmgr_psoc *psoc, 2046 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 2047 { 2048 if ((tgt_hdl->tif_ops) && 2049 (tgt_hdl->tif_ops->qwrap_config_enable)) 2050 tgt_hdl->tif_ops->qwrap_config_enable(psoc, tgt_hdl, evt_buf); 2051 } 2052 2053 /** 2054 * target_if_btcoex_cfg_enable - Enable BT coex config 2055 * @psoc: psoc object 2056 * @tgt_hdl: target_psoc_info pointer 2057 * @evt_buf: Event buffer received from FW 2058 * 2059 * API to enable BT coex config 2060 * 2061 * Return: none 2062 */ 2063 static inline void target_if_btcoex_cfg_enable(struct wlan_objmgr_psoc *psoc, 2064 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 2065 { 2066 if ((tgt_hdl->tif_ops) && 2067 (tgt_hdl->tif_ops->btcoex_config_enable)) 2068 tgt_hdl->tif_ops->btcoex_config_enable(psoc, tgt_hdl, evt_buf); 2069 } 2070 2071 /** 2072 * target_if_lteu_cfg_enable - Enable LTEU config 2073 * @psoc: psoc object 2074 * @tgt_hdl: target_psoc_info pointer 2075 * @evt_buf: Event buffer received from FW 2076 * 2077 * API to enable LTEU coex config 2078 * 2079 * Return: none 2080 */ 2081 static inline void target_if_lteu_cfg_enable(struct wlan_objmgr_psoc *psoc, 2082 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 2083 { 2084 if ((tgt_hdl->tif_ops) && 2085 (tgt_hdl->tif_ops->lteu_ext_support_enable)) 2086 tgt_hdl->tif_ops->lteu_ext_support_enable(psoc, tgt_hdl, 2087 evt_buf); 2088 } 2089 2090 /** 2091 * target_if_set_init_cmd_dev_param - Set init command params 2092 * @psoc: psoc object 2093 * @tgt_hdl: target_psoc_info pointer 2094 * 2095 * API to set init command param based on config 2096 * 2097 * Return: none 2098 */ 2099 static inline void target_if_set_init_cmd_dev_param( 2100 struct wlan_objmgr_psoc *psoc, struct target_psoc_info *tgt_hdl) 2101 { 2102 if ((tgt_hdl->tif_ops) && 2103 (tgt_hdl->tif_ops->set_init_cmd_dev_based_params)) { 2104 tgt_hdl->tif_ops->set_init_cmd_dev_based_params(psoc, 2105 tgt_hdl); 2106 } 2107 } 2108 2109 /** 2110 * target_if_alloc_pdevs - Allocate PDEVs 2111 * @psoc: psoc object 2112 * @tgt_hdl: target_psoc_info pointer 2113 * 2114 * API allocates PDEVs based on ext service ready param 2115 * 2116 * Return: SUCCESS on pdev allocation or PDEV allocation is not needed 2117 * FAILURE, if allocation fails 2118 */ 2119 static inline QDF_STATUS target_if_alloc_pdevs(struct wlan_objmgr_psoc *psoc, 2120 struct target_psoc_info *tgt_hdl) 2121 { 2122 QDF_STATUS ret_val; 2123 2124 if ((tgt_hdl->tif_ops) && 2125 (tgt_hdl->tif_ops->alloc_pdevs)) 2126 ret_val = tgt_hdl->tif_ops->alloc_pdevs(psoc, tgt_hdl); 2127 else 2128 ret_val = QDF_STATUS_SUCCESS; 2129 2130 return ret_val; 2131 } 2132 2133 /** 2134 * target_if_update_pdev_tgt_info - Update PDEVs info 2135 * @psoc: psoc object 2136 * @tgt_hdl: target_psoc_info pointer 2137 * 2138 * API updates PDEVs info based on config 2139 * 2140 * Return: SUCCESS on pdev updation or PDEV updation is not needed 2141 * FAILURE, if updation fails 2142 */ 2143 static inline QDF_STATUS target_if_update_pdev_tgt_info( 2144 struct wlan_objmgr_psoc *psoc, struct target_psoc_info *tgt_hdl) 2145 { 2146 QDF_STATUS ret_val; 2147 2148 if ((tgt_hdl->tif_ops) && 2149 (tgt_hdl->tif_ops->update_pdev_tgt_info)) 2150 ret_val = tgt_hdl->tif_ops->update_pdev_tgt_info(psoc, 2151 tgt_hdl); 2152 else 2153 ret_val = QDF_STATUS_SUCCESS; 2154 2155 return ret_val; 2156 } 2157 2158 /** 2159 * target_if_print_service_ready_ext_param - Print Service ready ext param 2160 * @psoc: psoc object 2161 * @tgt_hdl: target_psoc_info pointer 2162 * 2163 * API to print service ready ext param 2164 * 2165 * Return: none 2166 */ 2167 static inline void target_if_print_service_ready_ext_param( 2168 struct wlan_objmgr_psoc *psoc, struct target_psoc_info *tgt_hdl) 2169 { 2170 if ((tgt_hdl->tif_ops) && 2171 (tgt_hdl->tif_ops->print_svc_ready_ex_param)) { 2172 tgt_hdl->tif_ops->print_svc_ready_ex_param(psoc, 2173 tgt_hdl); 2174 } 2175 } 2176 2177 /** 2178 * target_if_add_11ax_modes - Add 11ax modes explicitly 2179 * @psoc: psoc object 2180 * @tgt_hdl: target_psoc_info pointer 2181 * 2182 * API to adds 11ax modes 2183 * 2184 * Return: none 2185 */ 2186 #ifdef QCA_HOST_ADD_11AX_MODE_WAR 2187 static inline void target_if_add_11ax_modes(struct wlan_objmgr_psoc *psoc, 2188 struct target_psoc_info *tgt_hdl) 2189 { 2190 if ((tgt_hdl->tif_ops) && 2191 (tgt_hdl->tif_ops->add_11ax_modes)) { 2192 tgt_hdl->tif_ops->add_11ax_modes(psoc, tgt_hdl); 2193 } 2194 } 2195 #else 2196 static inline void target_if_add_11ax_modes(struct wlan_objmgr_psoc *psoc, 2197 struct target_psoc_info *tgt_hdl) 2198 { 2199 } 2200 #endif 2201 2202 /** 2203 * target_if_csa_switch_count_status - Calls a function to process CSA event 2204 * @psoc: psoc object 2205 * @tgt_hdl: target_psoc_info pointer 2206 * @csa_status: CSA switch count status event param 2207 * 2208 * Return: 0 on success, -1 on failure 2209 */ 2210 static inline int target_if_csa_switch_count_status( 2211 struct wlan_objmgr_psoc *psoc, 2212 struct target_psoc_info *tgt_hdl, 2213 struct pdev_csa_switch_count_status csa_status) 2214 { 2215 if (tgt_hdl->tif_ops && tgt_hdl->tif_ops->csa_switch_count_status) 2216 return tgt_hdl->tif_ops->csa_switch_count_status( 2217 psoc, csa_status); 2218 2219 return -1; 2220 } 2221 2222 /** 2223 * target_if_set_default_config - Set default config in init command 2224 * @psoc: psoc object 2225 * @tgt_hdl: target_psoc_info pointer 2226 * 2227 * API to set default config in init command 2228 * 2229 * Return: none 2230 */ 2231 static inline void target_if_set_default_config(struct wlan_objmgr_psoc *psoc, 2232 struct target_psoc_info *tgt_hdl) 2233 { 2234 if ((tgt_hdl->tif_ops) && 2235 (tgt_hdl->tif_ops->set_default_tgt_config)) { 2236 tgt_hdl->tif_ops->set_default_tgt_config(psoc, tgt_hdl); 2237 } 2238 } 2239 2240 /** 2241 * target_if_sw_version_check - SW version check 2242 * @psoc: psoc object 2243 * @tgt_hdl: target_psoc_info pointer 2244 * @evt_buf: Event buffer received from FW 2245 * 2246 * API checks the SW version 2247 * 2248 * Return: SUCCESS on version matches or version check is not needed 2249 * FAILURE, if check fails 2250 */ 2251 static inline QDF_STATUS target_if_sw_version_check( 2252 struct wlan_objmgr_psoc *psoc, 2253 struct target_psoc_info *tgt_hdl, uint8_t *evt_buf) 2254 { 2255 QDF_STATUS ret_val; 2256 2257 if ((tgt_hdl->tif_ops) && 2258 (tgt_hdl->tif_ops->sw_version_check)) 2259 ret_val = tgt_hdl->tif_ops->sw_version_check(psoc, tgt_hdl, 2260 evt_buf); 2261 else 2262 ret_val = QDF_STATUS_SUCCESS; 2263 2264 return ret_val; 2265 } 2266 2267 /** 2268 * target_if_get_phy_capability - get phy capability 2269 * @target_psoc_info: pointer to structure target_psoc_info 2270 * 2271 * API to get phy capability from the target caps 2272 * 2273 * Return: int32_t 2274 */ 2275 static inline int32_t target_if_get_phy_capability 2276 (struct target_psoc_info *target_psoc_info) 2277 { 2278 if (!target_psoc_info) 2279 return -EINVAL; 2280 2281 return target_psoc_info->info.target_caps.phy_capability; 2282 } 2283 2284 /** 2285 * target_if_set_phy_capability - set phy capability 2286 * @target_psoc_info: pointer to structure target_psoc_info 2287 * @phy_capab: PHY capabilities 2288 * 2289 * API to set phy capability in the target caps 2290 * 2291 * Return: None 2292 */ 2293 static inline void target_if_set_phy_capability 2294 (struct target_psoc_info *target_psoc_info, int phy_capability) 2295 { 2296 if (!target_psoc_info) 2297 return; 2298 2299 target_psoc_info->info.target_caps.phy_capability = phy_capability; 2300 } 2301 2302 /** 2303 * target_if_set_max_frag_entry - set Maximum frag entries 2304 * @target_psoc_info: pointer to structure target_psoc_info 2305 * @max_frag_entry: Maximum frag entries 2306 * 2307 * API to set Maximum frag entries from the target caps 2308 * 2309 * Return: None 2310 */ 2311 static inline void target_if_set_max_frag_entry 2312 (struct target_psoc_info *target_psoc_info, int max_frag_entry) 2313 { 2314 if (!target_psoc_info) 2315 return; 2316 2317 target_psoc_info->info.target_caps.max_frag_entry = max_frag_entry; 2318 } 2319 2320 /** 2321 * target_if_get_max_frag_entry - get Maximum frag entries 2322 * @target_psoc_info: pointer to structure target_psoc_info 2323 * 2324 * API to get Maximum frag entries from the target caps 2325 * 2326 * Return: int32_t 2327 */ 2328 static inline int32_t target_if_get_max_frag_entry 2329 (struct target_psoc_info *target_psoc_info) 2330 { 2331 if (!target_psoc_info) 2332 return -EINVAL; 2333 2334 return target_psoc_info->info.target_caps.max_frag_entry; 2335 } 2336 2337 /** 2338 * target_if_get_ht_cap_info - get ht capabilities info 2339 * @target_psoc_info: pointer to structure target_psoc_info 2340 * 2341 * API to get ht capabilities info from the target caps 2342 * 2343 * Return: int32_t 2344 */ 2345 static inline int32_t target_if_get_ht_cap_info 2346 (struct target_psoc_info *target_psoc_info) 2347 { 2348 if (!target_psoc_info) 2349 return -EINVAL; 2350 2351 return target_psoc_info->info.target_caps.ht_cap_info; 2352 } 2353 2354 /** 2355 * target_if_get_vht_cap_info - get vht capabilities info 2356 * @target_psoc_info: pointer to structure target_psoc_info 2357 * 2358 * API to get vht capabilities info from the target caps 2359 * 2360 * Return: int32_t 2361 */ 2362 static inline int32_t target_if_get_vht_cap_info 2363 (struct target_psoc_info *target_psoc_info) 2364 { 2365 if (!target_psoc_info) 2366 return -EINVAL; 2367 2368 return target_psoc_info->info.target_caps.vht_cap_info; 2369 } 2370 2371 /** 2372 * target_if_get_num_rf_chains - get Number of RF chains supported 2373 * @target_psoc_info: pointer to structure target_psoc_info 2374 * 2375 * API to get Number of RF chains supported from the target caps 2376 * 2377 * Return: int32_t 2378 */ 2379 static inline int32_t target_if_get_num_rf_chains 2380 (struct target_psoc_info *target_psoc_info) 2381 { 2382 if (!target_psoc_info) 2383 return -EINVAL; 2384 2385 return target_psoc_info->info.target_caps.num_rf_chains; 2386 } 2387 2388 /** 2389 * target_if_get_fw_version - get firmware version 2390 * @target_psoc_info: pointer to structure target_psoc_info 2391 * 2392 * API to get firmware version from the target caps 2393 * 2394 * Return: int32_t 2395 */ 2396 static inline int32_t target_if_get_fw_version 2397 (struct target_psoc_info *target_psoc_info) 2398 { 2399 if (!target_psoc_info) 2400 return 0; 2401 2402 return target_psoc_info->info.target_caps.fw_version; 2403 } 2404 2405 /** 2406 * target_if_get_wmi_fw_sub_feat_caps - FW sub feature capabilities 2407 * @target_psoc_info: pointer to structure target_psoc_info 2408 * 2409 * API to get FW sub feature capabilities from the target caps 2410 * 2411 * Return: int32_t 2412 */ 2413 static inline int32_t target_if_get_wmi_fw_sub_feat_caps 2414 (struct target_psoc_info *target_psoc_info) 2415 { 2416 if (!target_psoc_info) 2417 return -EINVAL; 2418 2419 return target_psoc_info->info.target_caps.wmi_fw_sub_feat_caps; 2420 } 2421 2422 /** 2423 * target_if_get_conc_scan_config_bits - Default concurrenct scan config 2424 * @tgt_hdl: pointer to structure target_psoc_info 2425 * 2426 * API to get Default concurrenct scan config from the target caps 2427 * 2428 * Return: int32_t 2429 */ 2430 static inline int32_t target_if_get_conc_scan_config_bits 2431 (struct target_psoc_info *tgt_hdl) 2432 { 2433 if (!tgt_hdl) 2434 return -EINVAL; 2435 2436 return tgt_hdl->info.service_ext_param.default_conc_scan_config_bits; 2437 } 2438 2439 /** 2440 * target_if_get_fw_config_bits - Default HW config bits 2441 * @tgt_hdl: pointer to structure target_psoc_info 2442 * 2443 * API to get Default HW config bits from the target caps 2444 * 2445 * Return: int32_t 2446 */ 2447 static inline int32_t target_if_get_fw_config_bits 2448 (struct target_psoc_info *tgt_hdl) 2449 { 2450 if (!tgt_hdl) 2451 return -EINVAL; 2452 2453 return tgt_hdl->info.service_ext_param.default_fw_config_bits; 2454 } 2455 2456 /** 2457 * target_psoc_get_num_hw_modes - get number of dbs hardware modes 2458 * @tgt_hdl: pointer to structure target_psoc_info 2459 * 2460 * API to get Number of Dual Band Simultaneous (DBS) hardware modes 2461 * 2462 * Return: int32_t 2463 */ 2464 static inline int32_t target_psoc_get_num_hw_modes 2465 (struct target_psoc_info *tgt_hdl) 2466 { 2467 if (!tgt_hdl) 2468 return -EINVAL; 2469 2470 return tgt_hdl->info.service_ext_param.num_hw_modes; 2471 } 2472 2473 #ifdef WLAN_SUPPORT_TWT 2474 #ifdef WLAN_TWT_AP_PDEV_COUNT_NUM_PHY 2475 static inline void target_if_set_twt_ap_pdev_count 2476 (struct tgt_info *info, struct target_psoc_info *tgt_hdl) 2477 { 2478 if (!tgt_hdl) 2479 return; 2480 2481 info->wlan_res_cfg.twt_ap_pdev_count = 2482 info->service_ext_param.num_phy; 2483 } 2484 #else 2485 static inline void target_if_set_twt_ap_pdev_count 2486 (struct tgt_info *info, struct target_psoc_info *tgt_hdl) 2487 { 2488 if (!tgt_hdl) 2489 return; 2490 2491 info->wlan_res_cfg.twt_ap_pdev_count = 2492 target_psoc_get_num_radios(tgt_hdl); 2493 } 2494 #endif /* WLAN_TWT_AP_PDEV_COUNT_NUM_PHY */ 2495 #else 2496 static inline void target_if_set_twt_ap_pdev_count 2497 (struct tgt_info *info, struct target_psoc_info *tgt_hdl) 2498 { 2499 } 2500 #endif /* WLAN_SUPPORT_TWT */ 2501 2502 /** 2503 * target_psoc_get_version_info() - Get version info from tgt info 2504 * @psoc_info: pointer to structure target_psoc_info 2505 * @reg_major: reg db version major 2506 * @reg_minor: reg db version minor 2507 * @bdf_major: bdf reg db version major 2508 * @bdf_minor: bdf reg db version minor 2509 * 2510 * API to get target version information. 2511 * 2512 * Return: void 2513 */ 2514 static inline void target_psoc_get_version_info( 2515 struct target_psoc_info *psoc_info, 2516 uint8_t *reg_major, uint8_t *reg_minor, 2517 uint8_t *bdf_major, uint8_t *bdf_minor) 2518 { 2519 if (!psoc_info) 2520 return; 2521 2522 *reg_major = psoc_info->info.service_ext2_param.reg_db_version_major; 2523 *reg_minor = psoc_info->info.service_ext2_param.reg_db_version_minor; 2524 *bdf_major = 2525 psoc_info->info.service_ext2_param.bdf_reg_db_version_major; 2526 *bdf_minor = 2527 psoc_info->info.service_ext2_param.bdf_reg_db_version_minor; 2528 } 2529 2530 /** 2531 * target_psoc_get_chan_width_switch_num_peers() - Get peer limit 2532 * @psoc_info: pointer to structure target_psoc_info 2533 * 2534 * API to get the number of peers supported per WMI command with the ID 2535 * WMI_PEER_CHAN_WIDTH_SWITCH_CMDID. 2536 * 2537 * Return: maximum peers allowed in a single WMI command with the given ID. 2538 */ 2539 static inline uint32_t target_psoc_get_chan_width_switch_num_peers( 2540 struct target_psoc_info *psoc_info) 2541 { 2542 if (!psoc_info) 2543 return 0; 2544 2545 return psoc_info->info.service_ext2_param.chwidth_num_peer_caps; 2546 } 2547 2548 /** 2549 * target_if_is_scan_radio_supported() - API to check scan radio 2550 * support for the given radio 2551 * @pdev: pointer to pdev 2552 * @is_scan_radio_supported: pointer to scan radio support flag 2553 * 2554 * API to check scan radio support for the given radio 2555 * 2556 * Return: QDF_STATUS 2557 */ 2558 QDF_STATUS 2559 target_pdev_is_scan_radio_supported(struct wlan_objmgr_pdev *pdev, 2560 bool *is_scan_radio_supported); 2561 2562 /** 2563 * target_pdev_scan_radio_is_dfs_enabled() - API to check 2564 * whether DFS needs to be enabled/disabled for scan radio. 2565 * @pdev: pointer to pdev 2566 * @is_dfs_en: Pointer to DFS enable flag 2567 * 2568 * API to check whether DFS needs to be enabled/disabled for 2569 * scan radio. This API should be used only for a scan radio 2570 * pdev. 2571 * 2572 * Return: QDF_STATUS 2573 */ 2574 QDF_STATUS 2575 target_pdev_scan_radio_is_dfs_enabled(struct wlan_objmgr_pdev *pdev, 2576 bool *is_dfs_en); 2577 2578 /** 2579 * target_psoc_get_preamble_puncture_cap() - Get Preamble Puncturing capability 2580 * @psoc_info: pointer to structure target_psoc_info 2581 * 2582 * API to get the target capability for Preamble Punctured Tx 2583 * 2584 * Return: target capability for Preamble Punctured Tx. 2585 */ 2586 static inline uint32_t target_psoc_get_preamble_puncture_cap( 2587 struct target_psoc_info *psoc_info) 2588 { 2589 if (!psoc_info) 2590 return 0; 2591 2592 return psoc_info->info.service_ext2_param.preamble_puncture_bw_cap; 2593 } 2594 2595 /** 2596 * target_psoc_get_mu_max_users() - Get max users for MU transmissions 2597 * @psoc_info: pointer to structure target_psoc_info 2598 * @mu_caps: pointer to structure for max OFDMA/MU-MIMO users per-PPDU 2599 * 2600 * API to get the max number of users per-PPDU supported for Uplink/Downlink 2601 * MU transmissions. 2602 * 2603 * Return: void 2604 */ 2605 static inline void target_psoc_get_mu_max_users( 2606 struct target_psoc_info *psoc_info, 2607 struct target_mu_caps *mu_caps) 2608 { 2609 struct wlan_psoc_host_service_ext2_param *service_ext2_param; 2610 2611 if (!psoc_info || !mu_caps) 2612 return; 2613 2614 service_ext2_param = &psoc_info->info.service_ext2_param; 2615 2616 mu_caps->ofdma_dl = service_ext2_param->max_users_dl_ofdma; 2617 mu_caps->ofdma_ul = service_ext2_param->max_users_ul_ofdma; 2618 mu_caps->mumimo_dl = service_ext2_param->max_users_dl_mumimo; 2619 mu_caps->mumimo_ul = service_ext2_param->max_users_ul_mumimo; 2620 } 2621 2622 /** 2623 * target_psoc_set_device_mode() - set global device_mode 2624 * @psoc_info: pointer to structure target_psoc_info 2625 * @device_mode: device mode mission monitor/ftm etc 2626 * 2627 * API to set global device mode 2628 * 2629 * Return: void 2630 */ 2631 static inline void target_psoc_set_device_mode 2632 (struct target_psoc_info *psoc_info, uint32_t device_mode) 2633 { 2634 if (!psoc_info) 2635 return; 2636 2637 psoc_info->info.device_mode = device_mode; 2638 } 2639 2640 /** 2641 * target_psoc_get_device_mode() - get info device_mode 2642 * @psoc_info: pointer to structure target_psoc_info 2643 * 2644 * API to get device_mode 2645 * 2646 * Return: enum QDF_GLOBAL_MODE 2647 */ 2648 static inline enum QDF_GLOBAL_MODE target_psoc_get_device_mode 2649 (struct target_psoc_info *psoc_info) 2650 { 2651 if (!psoc_info) 2652 return QDF_GLOBAL_MAX_MODE; 2653 2654 return psoc_info->info.device_mode; 2655 } 2656 2657 /** 2658 * target_if_set_reg_cc_ext_supp() - Set reg_cc_ext_supp capability 2659 * in WMI_INIT_CMD based on host capability of reg_cc_ext_event. 2660 * 2661 * @tgt_hdl: Pointer to struct target_psoc_info. 2662 * @psoc: Pointer to struct wlan_objmgr_psoc. 2663 * 2664 */ 2665 void target_if_set_reg_cc_ext_supp(struct target_psoc_info *tgt_hdl, 2666 struct wlan_objmgr_psoc *psoc); 2667 2668 /** 2669 * target_psoc_set_twt_ack_cap() - Set twt ack capability 2670 * 2671 * @psoc_info: Pointer to struct target_psoc_info. 2672 * @val: twt ack cap value 2673 * 2674 * Return: None 2675 * 2676 */ 2677 static inline 2678 void target_psoc_set_twt_ack_cap(struct target_psoc_info *psoc_info, bool val) 2679 { 2680 if (!psoc_info) 2681 return; 2682 2683 psoc_info->info.service_ext2_param.twt_ack_support_cap = val; 2684 } 2685 2686 /** 2687 * target_psoc_get_twt_ack_cap() - Get twt ack capability 2688 * 2689 * @psoc_info: Pointer to struct target_psoc_info. 2690 * @val: twt ack cap value 2691 * 2692 * Return: None 2693 * 2694 */ 2695 static inline 2696 void target_psoc_get_twt_ack_cap(struct target_psoc_info *psoc_info, bool *val) 2697 { 2698 if (!psoc_info) 2699 return; 2700 2701 *val = psoc_info->info.service_ext2_param.twt_ack_support_cap; 2702 } 2703 2704 /** 2705 * target_psoc_target_cap_flags() - flags containing information about target 2706 * capabilities 2707 * @psoc_info: pointer to structure target_psoc_info 2708 * 2709 * API to get flags containing information about target capabilities 2710 * 2711 * Return: no of target_cap_flags 2712 */ 2713 static inline uint32_t target_psoc_get_target_cap_flags 2714 (struct target_psoc_info *psoc_info) 2715 { 2716 if (!psoc_info) 2717 return 0; 2718 2719 return psoc_info->info.service_ext2_param.target_cap_flags; 2720 } 2721 2722 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 2723 /** 2724 * target_pdev_get_hw_link_id - get hw_link_id 2725 * @pdev: pointer to structure target_pdev_info 2726 * 2727 * API to get hw_link_id 2728 * 2729 * Return: uint16_t 2730 */ 2731 #define PDEV_INVALID_HW_LINK_ID 0xFFFF 2732 uint16_t target_if_pdev_get_hw_link_id 2733 (struct wlan_objmgr_pdev *pdev); 2734 2735 /** 2736 * target_pdev_set_hw_link_id - set hw_link_id 2737 * @pdev: pointer to structure target_pdev_info 2738 * @hw_link_id: unique hw link id of pdev across psoc 2739 * 2740 * API to set hw_link_id 2741 * 2742 * Return: void 2743 */ 2744 void target_pdev_set_hw_link_id 2745 (struct wlan_objmgr_pdev *pdev, uint16_t hw_link_id); 2746 #endif /*WLAN_FEATURE_11BE_MLO && WLAN_MLO_MULTI_CHIP*/ 2747 2748 #endif 2749