1 /* 2 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * 6 * Permission to use, copy, modify, and/or distribute this software for 7 * any purpose with or without fee is hereby granted, provided that the 8 * above copyright notice and this permission notice appear in all 9 * copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 12 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 13 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 14 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 15 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 16 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 17 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 18 * PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21 #ifndef _WLAN_LMAC_IF_DEF_H_ 22 #define _WLAN_LMAC_IF_DEF_H_ 23 24 #include "qdf_status.h" 25 #include "wlan_objmgr_cmn.h" 26 #ifdef DFS_COMPONENT_ENABLE 27 #include <wlan_dfs_public_struct.h> 28 #endif 29 #include "wlan_mgmt_txrx_utils_api.h" 30 #include "wlan_scan_public_structs.h" 31 32 #ifdef WLAN_ATF_ENABLE 33 #include "wlan_atf_utils_defs.h" 34 #endif 35 #ifdef WLAN_SA_API_ENABLE 36 #include "wlan_sa_api_utils_defs.h" 37 #endif 38 #ifdef WLAN_CONV_SPECTRAL_ENABLE 39 #include "wlan_spectral_public_structs.h" 40 #endif 41 #include <reg_services_public_struct.h> 42 43 #include "wlan_crypto_global_def.h" 44 #include "wifi_pos_public_struct.h" 45 46 #ifdef WLAN_CFR_ENABLE 47 #include "wlan_cfr_utils_api.h" 48 #endif 49 50 #include <wlan_dfs_tgt_api.h> 51 #include <wlan_dfs_ioctl.h> 52 53 #ifdef WLAN_IOT_SIM_SUPPORT 54 #include <wlan_iot_sim_public_structs.h> 55 #endif 56 #include <wlan_mgmt_txrx_rx_reo_public_structs.h> 57 58 #ifdef IPA_OFFLOAD 59 #include <wlan_ipa_public_struct.h> 60 #endif 61 62 /* Number of dev type: Direct attach and Offload */ 63 #define MAX_DEV_TYPE 2 64 65 #ifdef WIFI_POS_CONVERGED 66 /* forward declarations */ 67 struct oem_data_req; 68 struct oem_data_rsp; 69 #endif /* WIFI_POS_CONVERGED */ 70 71 #ifdef DIRECT_BUF_RX_ENABLE 72 /* forward declarations for direct buf rx */ 73 struct direct_buf_rx_data; 74 /* Forward declaration for module_ring_params */ 75 struct module_ring_params; 76 /*Forward declaration for dbr_module_config */ 77 struct dbr_module_config; 78 #endif 79 80 #ifdef FEATURE_WLAN_TDLS 81 #include "wlan_tdls_public_structs.h" 82 #endif 83 84 #include <wlan_vdev_mgr_tgt_if_tx_defs.h> 85 #include <wlan_vdev_mgr_tgt_if_rx_defs.h> 86 87 #ifdef DCS_INTERFERENCE_DETECTION 88 #include <wlan_dcs_tgt_api.h> 89 #endif 90 91 #ifdef WLAN_FEATURE_11BE_MLO 92 #include "wlan_mlo_mgr_public_structs.h" 93 #endif 94 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED) 95 #include "wlan_twt_public_structs.h" 96 #endif 97 98 #ifdef QCA_SUPPORT_CP_STATS 99 #include <wlan_cp_stats_public_structs.h> 100 101 #ifdef WLAN_FEATURE_DBAM_CONFIG 102 #include "wlan_coex_public_structs.h" 103 #endif 104 105 #ifdef WLAN_FEATURE_COAP 106 #include "wlan_coap_public_structs.h" 107 #endif 108 109 /** 110 * typedef cp_stats_event - Definition of cp stats event 111 * Define stats_event from external cp stats component to cp_stats_event 112 */ 113 typedef struct stats_event cp_stats_event; 114 /** 115 * typedef stats_request_type - Definition of stats_req_type enum 116 * Define stats_req_type from external cp stats component to stats_request_type 117 */ 118 typedef enum stats_req_type stats_request_type; 119 /** 120 * typedef stats_req_info - Definition of cp stats req info 121 * Define request_info from external cp stats component to stats_req_info 122 */ 123 typedef struct request_info stats_req_info; 124 /** 125 * typedef stats_wake_lock - Definition of cp stats wake lock 126 * Define wake_lock_stats from external cp stats component to stats_wake_lock 127 */ 128 typedef struct wake_lock_stats stats_wake_lock; 129 130 /** 131 * typedef stats_big_data_stats_event - Definition of big data cp stats 132 * Define big_data_stats_event from external cp stats component to 133 * big_data_stats_event 134 */ 135 typedef struct big_data_stats_event stats_big_data_stats_event; 136 137 /** 138 * struct wlan_lmac_if_cp_stats_tx_ops - defines southbound tx callbacks for 139 * control plane statistics component 140 * @cp_stats_attach: function pointer to register events from FW 141 * @cp_stats_detach: function pointer to unregister events from FW 142 * @cp_stats_legacy_attach: function pointer to register legacy stats events 143 * from FW 144 * @cp_stats_legacy_detach: function pointer to unregister legacy stats events 145 * from FW 146 * @inc_wake_lock_stats: function pointer to increase wake lock stats 147 * @send_req_stats: function pointer to send request stats command to FW 148 * @send_req_peer_stats: function pointer to send request peer stats command 149 * to FW 150 * @set_pdev_stats_update_period: function pointer to set pdev stats update 151 * period to FW 152 * @send_req_infra_cp_stats: function pointer to send infra cp stats request 153 * command to FW 154 * @send_req_big_data_stats: Function pointer to send big data stats 155 */ 156 struct wlan_lmac_if_cp_stats_tx_ops { 157 QDF_STATUS (*cp_stats_attach)(struct wlan_objmgr_psoc *psoc); 158 QDF_STATUS (*cp_stats_detach)(struct wlan_objmgr_psoc *posc); 159 QDF_STATUS (*cp_stats_legacy_attach)(struct wlan_objmgr_psoc *psoc); 160 QDF_STATUS (*cp_stats_legacy_detach)(struct wlan_objmgr_psoc *psoc); 161 void (*inc_wake_lock_stats)(uint32_t reason, 162 stats_wake_lock *stats, 163 uint32_t *unspecified_wake_count); 164 QDF_STATUS (*send_req_stats)(struct wlan_objmgr_psoc *psoc, 165 enum stats_req_type type, 166 stats_req_info *req); 167 QDF_STATUS (*send_req_peer_stats)(struct wlan_objmgr_psoc *psoc, 168 stats_req_info *req); 169 QDF_STATUS (*set_pdev_stats_update_period)( 170 struct wlan_objmgr_psoc *psoc, 171 uint8_t pdev_id, uint32_t val); 172 #ifdef WLAN_SUPPORT_INFRA_CTRL_PATH_STATS 173 QDF_STATUS (*send_req_infra_cp_stats)( 174 struct wlan_objmgr_psoc *psoc, 175 struct infra_cp_stats_cmd_info *req); 176 #endif 177 #ifdef WLAN_FEATURE_BIG_DATA_STATS 178 QDF_STATUS (*send_req_big_data_stats)( 179 struct wlan_objmgr_psoc *psoc, 180 stats_req_info *req); 181 #endif 182 #ifdef WLAN_TELEMETRY_STATS_SUPPORT 183 QDF_STATUS (*send_req_telemetry_cp_stats)( 184 struct wlan_objmgr_pdev *pdev, 185 struct infra_cp_stats_cmd_info *req); 186 #endif 187 }; 188 189 /** 190 * struct wlan_lmac_if_cp_stats_rx_ops - defines southbound rx callbacks for 191 * control plane statistics component 192 * @cp_stats_rx_event_handler: function pointer to rx FW events 193 * @process_stats_event: function pointer to process stats event 194 * @process_infra_stats_event: 195 * @process_big_data_stats_event: 196 * @twt_get_session_param_resp: 197 */ 198 struct wlan_lmac_if_cp_stats_rx_ops { 199 QDF_STATUS (*cp_stats_rx_event_handler)(struct wlan_objmgr_vdev *vdev); 200 QDF_STATUS (*process_stats_event)(struct wlan_objmgr_psoc *psoc, 201 struct stats_event *ev); 202 #ifdef WLAN_SUPPORT_INFRA_CTRL_PATH_STATS 203 QDF_STATUS 204 (*process_infra_stats_event)(struct wlan_objmgr_psoc *psoc, 205 struct infra_cp_stats_event *infra_event); 206 #endif /* WLAN_SUPPORT_INFRA_CTRL_PATH_STATS */ 207 #ifdef WLAN_FEATURE_BIG_DATA_STATS 208 QDF_STATUS (*process_big_data_stats_event)( 209 struct wlan_objmgr_psoc *psoc, 210 stats_big_data_stats_event *ev); 211 #endif 212 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED) 213 QDF_STATUS (*twt_get_session_param_resp)(struct wlan_objmgr_psoc *psoc, 214 struct twt_session_stats_info *params); 215 #endif 216 }; 217 #endif 218 219 #ifdef DCS_INTERFERENCE_DETECTION 220 /** 221 * struct wlan_target_if_dcs_tx_ops - south bound tx function pointers for dcs 222 * @dcs_attach: function to register event handlers with FW 223 * @dcs_detach: function to de-register event handlers with FW 224 * @dcs_cmd_send: function to send dcs commands to FW 225 */ 226 struct wlan_target_if_dcs_tx_ops { 227 QDF_STATUS (*dcs_attach)(struct wlan_objmgr_psoc *psoc); 228 QDF_STATUS (*dcs_detach)(struct wlan_objmgr_psoc *psoc); 229 QDF_STATUS (*dcs_cmd_send)(struct wlan_objmgr_psoc *psoc, 230 uint32_t pdev_id, 231 bool is_host_pdev_id, 232 uint32_t dcs_enable); 233 }; 234 235 /** 236 * struct wlan_target_if_dcs_rx_ops - defines southbound rx callbacks for 237 * dcs component 238 * @process_dcs_event: function pointer to rx FW events 239 */ 240 struct wlan_target_if_dcs_rx_ops { 241 QDF_STATUS (*process_dcs_event)(struct wlan_objmgr_psoc *psoc, 242 struct wlan_host_dcs_event *event); 243 }; 244 #endif 245 246 #ifdef WLAN_MLO_GLOBAL_SHMEM_SUPPORT 247 /** 248 * struct wlan_lmac_if_global_shmem_local_ops - local ops function pointer 249 * table of local shared mem arena 250 * @implemented: Whether functions pointers are implemented 251 * @init_shmem_arena_ctx: Initialize shmem arena context 252 * @deinit_shmem_arena_ctx: De-initialize shmem arena context 253 * @get_crash_reason_address: Get the address of the crash reason associated 254 * with chip_id 255 * @get_no_of_chips_from_crash_info: Get the number of chips participated in the 256 * mlo from global shmem crash info 257 */ 258 struct wlan_lmac_if_global_shmem_local_ops { 259 bool implemented; 260 261 QDF_STATUS (*init_shmem_arena_ctx)(void *arena_vaddr, 262 size_t arena_len, 263 uint8_t grp_id); 264 QDF_STATUS (*deinit_shmem_arena_ctx)(uint8_t grp_id); 265 void *(*get_crash_reason_address)(uint8_t grp_id, 266 uint8_t chip_id); 267 uint8_t (*get_no_of_chips_from_crash_info)(uint8_t grp_id); 268 }; 269 #endif 270 271 #ifdef WLAN_MGMT_RX_REO_SUPPORT 272 /** 273 * struct wlan_lmac_if_mgmt_rx_reo_low_level_ops - Low level function pointer 274 * table of MGMT Rx REO module 275 * @implemented: Whether functions pointers are implemented 276 * @get_num_links: Get number of links to be used by MGMT Rx REO module 277 * @get_valid_link_bitmap: Get valid link bitmap to be used by MGMT Rx 278 * REO module 279 * @get_snapshot_address: Get address of an MGMT Rx REO snapshot 280 * @get_snapshot_version: Get version of MGMT Rx REO snapshot 281 * @snapshot_is_valid: Check if a snapshot is valid 282 * @snapshot_get_mgmt_pkt_ctr: Get management packet counter from snapshot 283 * @snapshot_get_redundant_mgmt_pkt_ctr: Get redundant management packet counter 284 * from snapshot 285 * @snapshot_is_consistent: Check if a snapshot is consistent 286 * @snapshot_get_global_timestamp: Get global timestamp from snapshot 287 */ 288 struct wlan_lmac_if_mgmt_rx_reo_low_level_ops { 289 bool implemented; 290 int (*get_num_links)(uint8_t grp_id); 291 uint16_t (*get_valid_link_bitmap)(uint8_t grp_id); 292 void* (*get_snapshot_address) 293 (uint8_t grp_id, uint8_t link_id, 294 enum mgmt_rx_reo_shared_snapshot_id snapshot_id); 295 int8_t (*get_snapshot_version) 296 (uint8_t grp_id, 297 enum mgmt_rx_reo_shared_snapshot_id snapshot_id); 298 bool (*snapshot_is_valid)(uint32_t snapshot_low, 299 uint8_t snapshot_version); 300 uint16_t (*snapshot_get_mgmt_pkt_ctr)(uint32_t snapshot_low, 301 uint8_t snapshot_version); 302 uint16_t (*snapshot_get_redundant_mgmt_pkt_ctr)(uint32_t snapshot_high); 303 bool (*snapshot_is_consistent)(uint32_t snapshot_low, 304 uint32_t snapshot_high, 305 uint8_t snapshot_version); 306 uint32_t (*snapshot_get_global_timestamp)(uint32_t snapshot_low, 307 uint32_t snapshot_high, 308 uint8_t snapshot_version); 309 }; 310 311 /** 312 * struct wlan_lmac_if_mgmt_rx_reo_tx_ops - structure of tx function 313 * pointers for mgmt rx reo 314 * @get_num_active_hw_links: Get number of active MLO HW links 315 * @get_valid_hw_link_bitmap: Get valid MLO HW link bitmap 316 * @read_mgmt_rx_reo_snapshot: Read rx-reorder snapshots 317 * @get_mgmt_rx_reo_snapshot_info: Get rx-reorder snapshot info 318 * @mgmt_rx_reo_filter_config: Configure MGMT Rx REO filter 319 * @low_level_ops: Low level operations of MGMT Rx REO module 320 */ 321 struct wlan_lmac_if_mgmt_rx_reo_tx_ops { 322 QDF_STATUS (*get_num_active_hw_links)(struct wlan_objmgr_psoc *psoc, 323 int8_t *num_active_hw_links); 324 QDF_STATUS (*get_valid_hw_link_bitmap)(struct wlan_objmgr_psoc *psoc, 325 uint16_t *valid_hw_link_bitmap); 326 QDF_STATUS (*read_mgmt_rx_reo_snapshot) 327 (struct wlan_objmgr_pdev *pdev, 328 struct mgmt_rx_reo_snapshot_info *snapshot_info, 329 enum mgmt_rx_reo_shared_snapshot_id id, 330 struct mgmt_rx_reo_snapshot_params *value, 331 struct mgmt_rx_reo_shared_snapshot (*raw_snapshot) 332 [MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT]); 333 QDF_STATUS (*get_mgmt_rx_reo_snapshot_info) 334 (struct wlan_objmgr_pdev *pdev, 335 enum mgmt_rx_reo_shared_snapshot_id id, 336 struct mgmt_rx_reo_snapshot_info *snapshot_info); 337 QDF_STATUS (*mgmt_rx_reo_filter_config)( 338 struct wlan_objmgr_pdev *pdev, 339 struct mgmt_rx_reo_filter *filter); 340 struct wlan_lmac_if_mgmt_rx_reo_low_level_ops low_level_ops; 341 }; 342 343 /** 344 * struct wlan_lmac_if_mgmt_rx_reo_rx_ops - structure of rx function 345 * pointers for mgmt rx reo module 346 * @fw_consumed_event_handler: FW consumed event handler 347 * @host_drop_handler: Handler for the frames that gets dropped in Host before 348 * entering REO algorithm 349 */ 350 struct wlan_lmac_if_mgmt_rx_reo_rx_ops { 351 QDF_STATUS (*fw_consumed_event_handler)( 352 struct wlan_objmgr_pdev *pdev, 353 struct mgmt_rx_reo_params *params); 354 QDF_STATUS (*host_drop_handler)( 355 struct wlan_objmgr_pdev *pdev, 356 struct mgmt_rx_reo_params *params); 357 }; 358 #endif 359 360 /** 361 * struct wlan_lmac_if_mgmt_txrx_tx_ops - structure of tx function 362 * pointers for mgmt txrx component 363 * @mgmt_tx_send: function pointer to transmit mgmt tx frame 364 * @beacon_send: function pointer to transmit beacon frame 365 * @fd_action_frame_send: function pointer to transmit FD action frame 366 * @tx_drain_nbuf_op: function pointer for any umac nbuf related ops for 367 * pending mgmt frames cleanup 368 * @reg_ev_handler: function pointer to register event handlers 369 * @unreg_ev_handler: function pointer to unregister event handlers 370 * @mgmt_rx_reo_tx_ops: management rx-reorder txops 371 * @rx_frame_legacy_handler: Legacy handler for Rx frames 372 */ 373 struct wlan_lmac_if_mgmt_txrx_tx_ops { 374 QDF_STATUS (*mgmt_tx_send)(struct wlan_objmgr_vdev *vdev, 375 qdf_nbuf_t nbuf, u_int32_t desc_id, 376 void *mgmt_tx_params); 377 QDF_STATUS (*beacon_send)(struct wlan_objmgr_vdev *vdev, 378 qdf_nbuf_t nbuf); 379 QDF_STATUS (*fd_action_frame_send)(struct wlan_objmgr_vdev *vdev, 380 qdf_nbuf_t nbuf); 381 void (*tx_drain_nbuf_op)(struct wlan_objmgr_pdev *pdev, 382 qdf_nbuf_t nbuf); 383 QDF_STATUS (*reg_ev_handler)(struct wlan_objmgr_psoc *psoc); 384 QDF_STATUS (*unreg_ev_handler)(struct wlan_objmgr_psoc *psoc); 385 QDF_STATUS (*rx_frame_legacy_handler)( 386 struct wlan_objmgr_pdev *pdev, 387 qdf_nbuf_t buf, 388 struct mgmt_rx_event_params *mgmt_rx_params); 389 #ifdef WLAN_MGMT_RX_REO_SUPPORT 390 struct wlan_lmac_if_mgmt_rx_reo_tx_ops mgmt_rx_reo_tx_ops; 391 #endif 392 }; 393 394 /** 395 * struct wlan_lmac_if_scan_tx_ops - south bound tx function pointers for scan 396 * @scan_start: function to start scan 397 * @scan_cancel: function to cancel scan 398 * @pno_start: start pno scan 399 * @pno_stop: stop pno scan 400 * @obss_disable: disable obss scan 401 * @scan_reg_ev_handler: function to register for scan events 402 * @scan_unreg_ev_handler: function to unregister for scan events 403 * @set_chan_list: 404 * @is_platform_eht_capable: 405 * 406 * scan module uses these functions to avail ol/da lmac services 407 */ 408 struct wlan_lmac_if_scan_tx_ops { 409 QDF_STATUS (*scan_start)(struct wlan_objmgr_pdev *pdev, 410 struct scan_start_request *req); 411 QDF_STATUS (*scan_cancel)(struct wlan_objmgr_pdev *pdev, 412 struct scan_cancel_param *req); 413 QDF_STATUS (*pno_start)(struct wlan_objmgr_psoc *psoc, 414 struct pno_scan_req_params *req); 415 QDF_STATUS (*pno_stop)(struct wlan_objmgr_psoc *psoc, 416 uint8_t vdev_id); 417 QDF_STATUS (*obss_disable)(struct wlan_objmgr_psoc *psoc, 418 uint8_t vdev_id); 419 QDF_STATUS (*scan_reg_ev_handler)(struct wlan_objmgr_psoc *psoc, 420 void *arg); 421 QDF_STATUS (*scan_unreg_ev_handler)(struct wlan_objmgr_psoc *psoc, 422 void *arg); 423 QDF_STATUS (*set_chan_list)(struct wlan_objmgr_pdev *pdev, void *arg); 424 bool (*is_platform_eht_capable)(struct wlan_objmgr_psoc *psoc, 425 uint8_t pdev_id); 426 }; 427 428 /** 429 * struct wlan_lmac_if_ftm_tx_ops - south bound tx function pointers for ftm 430 * @ftm_attach: function to register event handlers with FW 431 * @ftm_detach: function to de-register event handlers with FW 432 * @ftm_cmd_send: function to send FTM commands to FW 433 * 434 * ftm module uses these functions to avail ol/da lmac services 435 */ 436 struct wlan_lmac_if_ftm_tx_ops { 437 QDF_STATUS (*ftm_attach)(struct wlan_objmgr_psoc *psoc); 438 QDF_STATUS (*ftm_detach)(struct wlan_objmgr_psoc *psoc); 439 QDF_STATUS (*ftm_cmd_send)(struct wlan_objmgr_pdev *pdev, 440 uint8_t *buf, uint32_t len, uint8_t mac_id); 441 }; 442 443 enum wlan_mlme_cfg_id; 444 /** 445 * struct wlan_lmac_if_mlme_tx_ops - south bound tx function pointers for mlme 446 * @get_wifi_iface_id: function to get wifi interface id 447 * @vdev_mlme_attach: function to register events 448 * @vdev_mlme_detach: function to unregister events 449 * @vdev_create_send: function to send vdev create 450 * @vdev_start_send: function to send vdev start 451 * @vdev_up_send: function to send vdev up 452 * @vdev_delete_send: function to send vdev delete 453 * @vdev_stop_send: function to send vdev stop 454 * @vdev_down_send: function to send vdev down 455 * @vdev_set_param_send: function to send vdev parameter 456 * @vdev_set_tx_rx_decap_type: function to send vdev tx rx cap/decap type 457 * @vdev_set_nac_rssi_send: function to send nac rssi 458 * @vdev_set_neighbour_rx_cmd_send: function to send vdev neighbour rx cmd 459 * @vdev_sifs_trigger_send: function to send vdev sifs trigger 460 * @vdev_set_custom_aggr_size_cmd_send: function to send custom aggr size 461 * @vdev_config_ratemask_cmd_send: function to send ratemask 462 * @peer_flush_tids_send: function to flush peer tids 463 * @multiple_vdev_restart_req_cmd: function to send multiple vdev restart 464 * @multiple_vdev_set_param_cmd: function to send multiple vdev param 465 * @beacon_send_cmd: function to send beacon 466 * @beacon_cmd_send: 467 * @beacon_tmpl_send: function to send beacon template 468 * @vdev_fils_enable_send: 469 * @vdev_bcn_miss_offload_send: function to send beacon miss offload 470 * @vdev_sta_ps_param_send: function to sent STA power save config 471 * @peer_delete_all_send: function to send vdev delete all peer request 472 * @psoc_vdev_rsp_timer_init: function to initialize psoc vdev response timer 473 * @psoc_vdev_rsp_timer_deinit: function to deinitialize psoc vdev rsp timer 474 * @psoc_vdev_rsp_timer_inuse: function to determine whether the vdev rsp 475 * timer is inuse or not 476 * @psoc_vdev_rsp_timer_mod: function to modify the time of vdev rsp timer 477 * @psoc_wake_lock_init: Initialize psoc wake lock for vdev response timer 478 * @psoc_wake_lock_deinit: De-Initialize psoc wake lock for vdev response timer 479 * @vdev_mgr_rsp_timer_stop: 480 * @get_hw_link_id: Get hw_link_id for pdev 481 * @get_psoc_mlo_group_id: Get MLO Group ID for the psoc 482 * @target_if_mlo_setup_req: 483 * @target_if_mlo_ready: 484 * @target_if_mlo_teardown_req: 485 * @vdev_send_set_mac_addr: API to send set MAC address request to FW 486 * @vdev_peer_set_param_send: API to send peer param to FW 487 */ 488 struct wlan_lmac_if_mlme_tx_ops { 489 uint32_t (*get_wifi_iface_id) (struct wlan_objmgr_pdev *pdev); 490 QDF_STATUS (*vdev_mlme_attach)(struct wlan_objmgr_psoc *psoc); 491 QDF_STATUS (*vdev_mlme_detach)(struct wlan_objmgr_psoc *psoc); 492 QDF_STATUS (*vdev_create_send)(struct wlan_objmgr_vdev *vdev, 493 struct vdev_create_params *param); 494 QDF_STATUS (*vdev_start_send)(struct wlan_objmgr_vdev *vdev, 495 struct vdev_start_params *param); 496 QDF_STATUS (*vdev_up_send)(struct wlan_objmgr_vdev *vdev, 497 struct vdev_up_params *param); 498 QDF_STATUS (*vdev_delete_send)(struct wlan_objmgr_vdev *vdev, 499 struct vdev_delete_params *param); 500 QDF_STATUS (*vdev_stop_send)(struct wlan_objmgr_vdev *vdev, 501 struct vdev_stop_params *param); 502 QDF_STATUS (*vdev_down_send)(struct wlan_objmgr_vdev *vdev, 503 struct vdev_down_params *param); 504 QDF_STATUS (*vdev_set_param_send)(struct wlan_objmgr_vdev *vdev, 505 struct vdev_set_params *param); 506 QDF_STATUS (*vdev_set_tx_rx_decap_type)(struct wlan_objmgr_vdev *vdev, 507 enum wlan_mlme_cfg_id param_id, 508 uint32_t value); 509 QDF_STATUS (*vdev_set_nac_rssi_send)( 510 struct wlan_objmgr_vdev *vdev, 511 struct vdev_scan_nac_rssi_params *param); 512 QDF_STATUS (*vdev_set_neighbour_rx_cmd_send)( 513 struct wlan_objmgr_vdev *vdev, 514 struct set_neighbour_rx_params *param, 515 uint8_t *mac); 516 QDF_STATUS (*vdev_sifs_trigger_send)( 517 struct wlan_objmgr_vdev *vdev, 518 struct sifs_trigger_param *param); 519 QDF_STATUS (*vdev_set_custom_aggr_size_cmd_send)( 520 struct wlan_objmgr_vdev *vdev, 521 struct set_custom_aggr_size_params *param); 522 QDF_STATUS (*vdev_config_ratemask_cmd_send)( 523 struct wlan_objmgr_vdev *vdev, 524 struct config_ratemask_params *param); 525 QDF_STATUS (*peer_flush_tids_send)( 526 struct wlan_objmgr_vdev *vdev, 527 struct peer_flush_params *param); 528 QDF_STATUS (*multiple_vdev_restart_req_cmd)( 529 struct wlan_objmgr_pdev *pdev, 530 struct multiple_vdev_restart_params *param); 531 QDF_STATUS (*multiple_vdev_set_param_cmd)( 532 struct wlan_objmgr_pdev *pdev, 533 struct multiple_vdev_set_param *param); 534 QDF_STATUS (*beacon_cmd_send)(struct wlan_objmgr_vdev *vdev, 535 struct beacon_params *param); 536 QDF_STATUS (*beacon_tmpl_send)(struct wlan_objmgr_vdev *vdev, 537 struct beacon_tmpl_params *param); 538 #if defined(WLAN_SUPPORT_FILS) || defined(CONFIG_BAND_6GHZ) 539 QDF_STATUS (*vdev_fils_enable_send)(struct wlan_objmgr_vdev *vdev, 540 struct config_fils_params *param); 541 #endif 542 QDF_STATUS (*vdev_bcn_miss_offload_send)(struct wlan_objmgr_vdev *vdev); 543 QDF_STATUS (*vdev_sta_ps_param_send)(struct wlan_objmgr_vdev *vdev, 544 struct sta_ps_params *param); 545 QDF_STATUS (*peer_delete_all_send)( 546 struct wlan_objmgr_vdev *vdev, 547 struct peer_delete_all_params *param); 548 QDF_STATUS (*psoc_vdev_rsp_timer_init)( 549 struct wlan_objmgr_psoc *psoc, 550 uint8_t vdev_id); 551 void (*psoc_vdev_rsp_timer_deinit)( 552 struct wlan_objmgr_psoc *psoc, 553 uint8_t vdev_id); 554 QDF_STATUS (*psoc_vdev_rsp_timer_inuse)( 555 struct wlan_objmgr_psoc *psoc, 556 uint8_t vdev_id); 557 QDF_STATUS (*psoc_vdev_rsp_timer_mod)( 558 struct wlan_objmgr_psoc *psoc, 559 uint8_t vdev_id, 560 int mseconds); 561 void (*psoc_wake_lock_init)( 562 struct wlan_objmgr_psoc *psoc); 563 void (*psoc_wake_lock_deinit)( 564 struct wlan_objmgr_psoc *psoc); 565 QDF_STATUS (*vdev_mgr_rsp_timer_stop)( 566 struct wlan_objmgr_psoc *psoc, 567 struct vdev_response_timer *vdev_rsp, 568 enum wlan_vdev_mgr_tgt_if_rsp_bit clear_bit); 569 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 570 uint16_t (*get_hw_link_id)(struct wlan_objmgr_pdev *pdev); 571 uint8_t (*get_psoc_mlo_group_id)(struct wlan_objmgr_psoc *psoc); 572 QDF_STATUS (*target_if_mlo_setup_req)(struct wlan_objmgr_pdev **pdev, 573 uint8_t num_pdevs, 574 uint8_t grp_id); 575 QDF_STATUS (*target_if_mlo_ready)(struct wlan_objmgr_pdev **pdev, 576 uint8_t num_pdevs); 577 QDF_STATUS (*target_if_mlo_teardown_req)(struct wlan_objmgr_pdev **pdev, 578 uint8_t num_pdevs, 579 uint32_t grp_id); 580 #endif 581 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE 582 QDF_STATUS (*vdev_send_set_mac_addr)(struct qdf_mac_addr mac_addr, 583 struct qdf_mac_addr mld_addr, 584 struct wlan_objmgr_vdev *vdev); 585 #endif 586 QDF_STATUS (*vdev_peer_set_param_send)(struct wlan_objmgr_vdev *vdev, 587 uint8_t *peer_mac_addr, 588 uint32_t param_id, 589 uint32_t param_value); 590 }; 591 592 /** 593 * struct wlan_lmac_if_scan_rx_ops - south bound rx function pointers for scan 594 * @scan_ev_handler: scan event handler 595 * @scan_set_max_active_scans: set max active scans allowed 596 * 597 * lmac modules uses this API to post scan events to scan module 598 */ 599 struct wlan_lmac_if_scan_rx_ops { 600 QDF_STATUS (*scan_ev_handler)(struct wlan_objmgr_psoc *psoc, 601 struct scan_event_info *event_info); 602 QDF_STATUS (*scan_set_max_active_scans)(struct wlan_objmgr_psoc *psoc, 603 uint32_t max_active_scans); 604 }; 605 606 #ifdef CONVERGED_P2P_ENABLE 607 608 /* forward declarations for p2p tx ops */ 609 struct p2p_ps_config; 610 struct p2p_lo_start; 611 612 /** 613 * struct wlan_lmac_if_p2p_tx_ops - structure of tx function pointers 614 * for P2P component 615 * @set_ps: function pointer to set power save 616 * @lo_start: function pointer to start listen offload 617 * @lo_stop: function pointer to stop listen offload 618 * @set_noa: function pointer to disable/enable NOA 619 * @reg_lo_ev_handler: function pointer to register lo event handler 620 * @reg_noa_ev_handler: function pointer to register noa event handler 621 * @unreg_lo_ev_handler: function pointer to unregister lo event handler 622 * @unreg_noa_ev_handler:function pointer to unregister noa event handler 623 * @reg_mac_addr_rx_filter_handler: function pointer to register/unregister 624 * set mac addr status event callback. 625 * @set_mac_addr_rx_filter_cmd: function pointer to set mac addr rx filter 626 * @reg_mcc_quota_ev_handler: function to register mcc_quota event handler 627 */ 628 struct wlan_lmac_if_p2p_tx_ops { 629 QDF_STATUS (*set_ps)(struct wlan_objmgr_psoc *psoc, 630 struct p2p_ps_config *ps_config); 631 #ifdef FEATURE_P2P_LISTEN_OFFLOAD 632 QDF_STATUS (*lo_start)(struct wlan_objmgr_psoc *psoc, 633 struct p2p_lo_start *lo_start); 634 QDF_STATUS (*lo_stop)(struct wlan_objmgr_psoc *psoc, 635 uint32_t vdev_id); 636 QDF_STATUS (*reg_lo_ev_handler)(struct wlan_objmgr_psoc *psoc, 637 void *arg); 638 QDF_STATUS (*unreg_lo_ev_handler)(struct wlan_objmgr_psoc *psoc, 639 void *arg); 640 #endif 641 QDF_STATUS (*set_noa)(struct wlan_objmgr_psoc *psoc, 642 uint32_t vdev_id, bool disable_noa); 643 QDF_STATUS (*reg_noa_ev_handler)(struct wlan_objmgr_psoc *psoc, 644 void *arg); 645 QDF_STATUS (*unreg_noa_ev_handler)(struct wlan_objmgr_psoc *psoc, 646 void *arg); 647 QDF_STATUS (*reg_mac_addr_rx_filter_handler)( 648 struct wlan_objmgr_psoc *psoc, bool reg); 649 QDF_STATUS (*set_mac_addr_rx_filter_cmd)( 650 struct wlan_objmgr_psoc *psoc, 651 struct set_rx_mac_filter *param); 652 #ifdef WLAN_FEATURE_MCC_QUOTA 653 QDF_STATUS (*reg_mcc_quota_ev_handler)(struct wlan_objmgr_psoc *psoc, 654 bool reg); 655 #endif 656 }; 657 #endif 658 659 #ifdef WLAN_ATF_ENABLE 660 661 /** 662 * struct wlan_lmac_if_atf_tx_ops - ATF specific tx function pointers 663 * @atf_enable_disable: Set atf peer stats enable/disable 664 * @atf_ssid_sched_policy: Set ssid schedule policy 665 * @atf_set: Set atf 666 * @atf_set_grouping: Set atf grouping 667 * @atf_set_group_ac: Set atf Group AC 668 * @atf_send_peer_request: Send peer requests 669 * @atf_set_bwf: Set bandwidth fairness 670 * @atf_get_peer_airtime: Get peer airtime 671 * @atf_open: ATF open 672 * @atf_register_event_handler: ATF register wmi event handlers 673 * @atf_unregister_event_handler: ATF unregister wmi event handlers 674 * @atf_set_ppdu_stats: ATF set ppdu stats to get ATF stats 675 */ 676 struct wlan_lmac_if_atf_tx_ops { 677 int32_t (*atf_enable_disable)(struct wlan_objmgr_vdev *vdev, 678 uint8_t value); 679 int32_t (*atf_ssid_sched_policy)(struct wlan_objmgr_vdev *vdev, 680 uint8_t value); 681 int32_t (*atf_set)(struct wlan_objmgr_pdev *pdev, 682 struct pdev_atf_req *atf_req, 683 uint8_t atf_tput_based); 684 int32_t (*atf_set_grouping)(struct wlan_objmgr_pdev *pdev, 685 struct pdev_atf_ssid_group_req *atf_grp_req, 686 uint8_t atf_tput_based); 687 int32_t (*atf_set_group_ac)(struct wlan_objmgr_pdev *pdev, 688 struct pdev_atf_group_wmm_ac_req *atf_acreq, 689 uint8_t atf_tput_based); 690 int32_t (*atf_send_peer_request)(struct wlan_objmgr_pdev *pdev, 691 struct pdev_atf_peer_ext_request *atfr, 692 uint8_t atf_tput_based); 693 int32_t (*atf_set_bwf)(struct wlan_objmgr_pdev *pdev, 694 struct pdev_bwf_req *bwf_req); 695 uint32_t (*atf_get_peer_airtime)(struct wlan_objmgr_peer *peer); 696 void (*atf_open)(struct wlan_objmgr_psoc *psoc); 697 void (*atf_register_event_handler)(struct wlan_objmgr_psoc *psoc); 698 void (*atf_unregister_event_handler)(struct wlan_objmgr_psoc *psoc); 699 void (*atf_set_ppdu_stats)(struct wlan_objmgr_pdev *pdev, 700 uint8_t value); 701 }; 702 #endif 703 704 #ifdef WLAN_SUPPORT_FILS 705 /** 706 * struct wlan_lmac_if_fd_tx_ops - FILS Discovery specific Tx function pointers 707 * @fd_vdev_config_fils: Enable and configure FILS Discovery 708 * @fd_register_event_handler: Register swfda WMI event handler 709 * @fd_unregister_event_handler: Un-register swfda WMI event handler 710 * @fd_offload_tmpl_send: Send FD template to FW 711 */ 712 struct wlan_lmac_if_fd_tx_ops { 713 QDF_STATUS (*fd_vdev_config_fils)(struct wlan_objmgr_vdev *vdev, 714 uint32_t fd_period); 715 void (*fd_register_event_handler)(struct wlan_objmgr_psoc *psoc); 716 void (*fd_unregister_event_handler)(struct wlan_objmgr_psoc *psoc); 717 QDF_STATUS (*fd_offload_tmpl_send)(struct wlan_objmgr_pdev *pdev, 718 struct fils_discovery_tmpl_params *fd_tmpl_param); 719 }; 720 #endif 721 722 #ifdef WLAN_SA_API_ENABLE 723 724 /** 725 * struct wlan_lmac_if_sa_api_tx_ops - SA API specific tx function pointers 726 * @sa_api_register_event_handler: 727 * @sa_api_unregister_event_handler: 728 * @sa_api_enable_sa: 729 * @sa_api_set_rx_antenna: 730 * @sa_api_set_tx_antenna: 731 * @sa_api_set_tx_default_antenna: 732 * @sa_api_set_training_info: 733 * @sa_api_prepare_rateset: 734 * @sa_api_set_node_config_ops: 735 */ 736 struct wlan_lmac_if_sa_api_tx_ops { 737 void (*sa_api_register_event_handler)(struct wlan_objmgr_psoc *psoc); 738 void (*sa_api_unregister_event_handler)(struct wlan_objmgr_psoc *posc); 739 void (*sa_api_enable_sa) (struct wlan_objmgr_pdev *pdev, 740 uint32_t enable, uint32_t mode, uint32_t rx_antenna); 741 void (*sa_api_set_rx_antenna) (struct wlan_objmgr_pdev *pdev, 742 uint32_t antenna); 743 void (*sa_api_set_tx_antenna) (struct wlan_objmgr_peer *peer, 744 uint32_t *antenna_array); 745 void (*sa_api_set_tx_default_antenna) (struct wlan_objmgr_pdev *pdev, 746 u_int32_t antenna); 747 void (*sa_api_set_training_info) (struct wlan_objmgr_peer *peer, 748 uint32_t *rate_array, 749 uint32_t *antenna_array, 750 uint32_t numpkts); 751 void (*sa_api_prepare_rateset)(struct wlan_objmgr_pdev *pdev, 752 struct wlan_objmgr_peer *peer, 753 struct sa_rate_info *rate_info); 754 void (*sa_api_set_node_config_ops) (struct wlan_objmgr_peer *peer, 755 uint32_t cmd_id, uint16_t args_count, 756 u_int32_t args_arr[]); 757 }; 758 759 #endif 760 761 #ifdef WLAN_CFR_ENABLE 762 /** 763 * struct wlan_lmac_if_cfr_tx_ops - CFR specific tx function pointers 764 * @cfr_init_pdev: Initialize CFR 765 * @cfr_deinit_pdev: De-initialize CFR 766 * @cfr_enable_cfr_timer: Function to enable CFR timer 767 * @cfr_start_capture: Function to start CFR capture 768 * @cfr_stop_capture: Function to stop CFR capture 769 * @cfr_config_rcc: Function to set the Repetitive channel capture params 770 * @cfr_start_lut_timer: Function to start timer to flush aged-out LUT entries 771 * @cfr_stop_lut_timer: Function to stop timer to flush aged-out LUT entries 772 * @cfr_default_ta_ra_cfg: Function to configure default values for TA_RA mode 773 * @cfr_dump_lut_enh: Function to dump LUT entries 774 * @cfr_rx_tlv_process: Function to process PPDU status TLVs 775 * @cfr_update_global_cfg: Function to update the global config for 776 * a successful commit session. 777 * @cfr_subscribe_ppdu_desc: 778 */ 779 struct wlan_lmac_if_cfr_tx_ops { 780 QDF_STATUS (*cfr_init_pdev)(struct wlan_objmgr_psoc *psoc, 781 struct wlan_objmgr_pdev *pdev); 782 QDF_STATUS (*cfr_deinit_pdev)(struct wlan_objmgr_psoc *psoc, 783 struct wlan_objmgr_pdev *pdev); 784 int (*cfr_enable_cfr_timer)(struct wlan_objmgr_pdev *pdev, 785 uint32_t cfr_timer); 786 int (*cfr_start_capture)(struct wlan_objmgr_pdev *pdev, 787 struct wlan_objmgr_peer *peer, 788 struct cfr_capture_params *params); 789 int (*cfr_stop_capture)(struct wlan_objmgr_pdev *pdev, 790 struct wlan_objmgr_peer *peer); 791 #ifdef WLAN_ENH_CFR_ENABLE 792 QDF_STATUS (*cfr_config_rcc)(struct wlan_objmgr_pdev *pdev, 793 struct cfr_rcc_param *params); 794 void (*cfr_start_lut_timer)(struct wlan_objmgr_pdev *pdev); 795 void (*cfr_stop_lut_timer)(struct wlan_objmgr_pdev *pdev); 796 void (*cfr_default_ta_ra_cfg)(struct cfr_rcc_param *params, 797 bool allvalid, uint16_t reset_cfg); 798 void (*cfr_dump_lut_enh)(struct wlan_objmgr_pdev *pdev); 799 void (*cfr_rx_tlv_process)(struct wlan_objmgr_pdev *pdev, void *nbuf); 800 void (*cfr_update_global_cfg)(struct wlan_objmgr_pdev *pdev); 801 QDF_STATUS (*cfr_subscribe_ppdu_desc)(struct wlan_objmgr_pdev *pdev, 802 bool is_subscribe); 803 #endif 804 }; 805 #endif /* WLAN_CFR_ENABLE */ 806 807 #ifdef WLAN_CONV_SPECTRAL_ENABLE 808 struct spectral_wmi_ops; 809 struct spectral_tgt_ops; 810 /** 811 * struct wlan_lmac_if_sptrl_tx_ops - Spectral south bound Tx operations 812 * @sptrlto_pdev_spectral_init: Initialize target_if pdev Spectral object 813 * @sptrlto_pdev_spectral_deinit: De-initialize target_if pdev Spectral object 814 * @sptrlto_psoc_spectral_init: Initialize target_if psoc Spectral object 815 * @sptrlto_psoc_spectral_deinit: De-initialize target_if psoc Spectral object 816 * @sptrlto_set_spectral_config: Set Spectral configuration 817 * @sptrlto_get_spectral_config: Get Spectral configuration 818 * @sptrlto_start_spectral_scan: Start Spectral Scan 819 * @sptrlto_stop_spectral_scan: Stop Spectral Scan 820 * @sptrlto_is_spectral_active: Get whether Spectral is active 821 * @sptrlto_is_spectral_enabled: Get whether Spectral is enabled 822 * @sptrlto_set_icm_active: Set whether ICM is active or inactive 823 * @sptrlto_get_icm_active: Get whether ICM is active or inactive 824 * @sptrlto_get_nominal_nf: Get Nominal Noise Floor for the current 825 * frequency band 826 * @sptrlto_set_debug_level: Set Spectral debug level 827 * @sptrlto_get_debug_level: Get Spectral debug level 828 * @sptrlto_get_chaninfo: Get channel information 829 * @sptrlto_clear_chaninfo: Clear channel information 830 * @sptrlto_get_spectral_capinfo: Get Spectral capability information 831 * @sptrlto_get_spectral_diagstats: Get Spectral diagnostic statistics 832 * @sptrlto_register_spectral_wmi_ops: Register Spectral WMI operations 833 * @sptrlto_register_spectral_tgt_ops: Register Spectral target operations 834 * @sptrlto_register_netlink_cb: Register Spectral Netlink callbacks 835 * @sptrlto_use_nl_bcast: Get whether to use Netlink broadcast/unicast 836 * @sptrlto_deregister_netlink_cb: De-register Spectral Netlink callbacks 837 * @sptrlto_process_spectral_report: Process spectral report 838 * @sptrlto_set_dma_debug: Set DMA debug for Spectral 839 * @sptrlto_direct_dma_support: Whether Direct-DMA is supported on this radio 840 * @sptrlto_check_and_do_dbr_ring_debug: Start/Stop Spectral ring debug based 841 * on the previous state 842 * @sptrlto_check_and_do_dbr_buff_debug: Start/Stop Spectral buffer debug based 843 * on the previous state 844 * @sptrlto_register_events: Registration of WMI events for Spectral 845 * @sptrlto_unregister_events: Unregistration of WMI events for Spectral 846 * @sptrlto_init_pdev_feature_caps: Initialize spectral feature capabilities 847 **/ 848 struct wlan_lmac_if_sptrl_tx_ops { 849 void *(*sptrlto_pdev_spectral_init)(struct wlan_objmgr_pdev *pdev); 850 void (*sptrlto_pdev_spectral_deinit)(struct wlan_objmgr_pdev *pdev); 851 void *(*sptrlto_psoc_spectral_init)(struct wlan_objmgr_psoc *psoc); 852 void (*sptrlto_psoc_spectral_deinit)(struct wlan_objmgr_psoc *psoc); 853 QDF_STATUS (*sptrlto_set_spectral_config) 854 (struct wlan_objmgr_pdev *pdev, 855 const struct spectral_cp_param *param, 856 const enum spectral_scan_mode smode, 857 enum spectral_cp_error_code *err); 858 QDF_STATUS (*sptrlto_get_spectral_config) 859 (struct wlan_objmgr_pdev *pdev, 860 struct spectral_config *sptrl_config, 861 enum spectral_scan_mode smode); 862 QDF_STATUS (*sptrlto_start_spectral_scan) 863 (struct wlan_objmgr_pdev *pdev, 864 uint8_t vdev_id, 865 const enum spectral_scan_mode smode, 866 enum spectral_cp_error_code *err); 867 QDF_STATUS (*sptrlto_stop_spectral_scan) 868 (struct wlan_objmgr_pdev *pdev, 869 const enum spectral_scan_mode smode, 870 enum spectral_cp_error_code *err); 871 bool (*sptrlto_is_spectral_active)(struct wlan_objmgr_pdev *pdev, 872 const enum spectral_scan_mode smode); 873 bool (*sptrlto_is_spectral_enabled)(struct wlan_objmgr_pdev *pdev, 874 enum spectral_scan_mode smode); 875 QDF_STATUS (*sptrlto_set_debug_level)(struct wlan_objmgr_pdev *pdev, 876 u_int32_t debug_level); 877 u_int32_t (*sptrlto_get_debug_level)(struct wlan_objmgr_pdev *pdev); 878 QDF_STATUS (*sptrlto_get_spectral_capinfo) 879 (struct wlan_objmgr_pdev *pdev, 880 struct spectral_caps *scaps); 881 QDF_STATUS (*sptrlto_get_spectral_diagstats) 882 (struct wlan_objmgr_pdev *pdev, 883 struct spectral_diag_stats *stats); 884 QDF_STATUS (*sptrlto_register_spectral_wmi_ops)( 885 struct wlan_objmgr_psoc *psoc, 886 struct spectral_wmi_ops *wmi_ops); 887 QDF_STATUS (*sptrlto_register_spectral_tgt_ops)( 888 struct wlan_objmgr_psoc *psoc, 889 struct spectral_tgt_ops *tgt_ops); 890 void (*sptrlto_register_netlink_cb)( 891 struct wlan_objmgr_pdev *pdev, 892 struct spectral_nl_cb *nl_cb); 893 bool (*sptrlto_use_nl_bcast)(struct wlan_objmgr_pdev *pdev); 894 void (*sptrlto_deregister_netlink_cb)(struct wlan_objmgr_pdev *pdev); 895 int (*sptrlto_process_spectral_report)( 896 struct wlan_objmgr_pdev *pdev, 897 void *payload); 898 QDF_STATUS (*sptrlto_set_dma_debug)( 899 struct wlan_objmgr_pdev *pdev, 900 enum spectral_dma_debug dma_debug_type, 901 bool dma_debug_enable); 902 bool (*sptrlto_direct_dma_support)(struct wlan_objmgr_pdev *pdev); 903 QDF_STATUS (*sptrlto_check_and_do_dbr_ring_debug)( 904 struct wlan_objmgr_pdev *pdev); 905 QDF_STATUS (*sptrlto_check_and_do_dbr_buff_debug)( 906 struct wlan_objmgr_pdev *pdev); 907 QDF_STATUS (*sptrlto_register_events)(struct wlan_objmgr_psoc *psoc); 908 QDF_STATUS (*sptrlto_unregister_events)(struct wlan_objmgr_psoc *psoc); 909 QDF_STATUS (*sptrlto_init_pdev_feature_caps)( 910 struct wlan_objmgr_pdev *pdev); 911 }; 912 #endif /* WLAN_CONV_SPECTRAL_ENABLE */ 913 914 #ifdef WLAN_IOT_SIM_SUPPORT 915 /** 916 * struct wlan_lmac_if_iot_sim_tx_ops - iot_sim south bound Tx operations 917 * @iot_sim_send_cmd: To send wmi simulation command 918 **/ 919 struct wlan_lmac_if_iot_sim_tx_ops { 920 QDF_STATUS (*iot_sim_send_cmd)(struct wlan_objmgr_pdev *pdev, 921 struct simulation_test_params *param); 922 }; 923 #endif 924 925 #ifdef WIFI_POS_CONVERGED 926 /* 927 * struct wlan_lmac_if_wifi_pos_tx_ops - structure of firmware tx function 928 * pointers for wifi_pos component 929 * @wifi_pos_register_events: function pointer to register wifi_pos events 930 * @wifi_pos_deregister_events: function pointer to deregister wifi_pos events 931 * @data_req_tx: function pointer to send wifi_pos req to firmware 932 * @wifi_pos_convert_pdev_id_host_to_target: function pointer to get target 933 * pdev_id from host pdev_id. 934 * @wifi_pos_convert_pdev_id_target_to_host: function pointer to get host 935 * pdev_id from target pdev_id. 936 * @wifi_pos_get_vht_ch_width: Function pointer to get max supported bw by FW 937 * @wifi_pos_parse_measreq_chan_info: Parse channel info from LOWI measurement 938 * request buffer. 939 * @send_rtt_pasn_auth_status: Send PASN peers authentication status 940 * @send_rtt_pasn_deauth: Send PASN peer deauth command 941 */ 942 struct wlan_lmac_if_wifi_pos_tx_ops { 943 QDF_STATUS (*wifi_pos_register_events)(struct wlan_objmgr_psoc *psoc); 944 QDF_STATUS (*wifi_pos_deregister_events)(struct wlan_objmgr_psoc *psoc); 945 QDF_STATUS (*data_req_tx)(struct wlan_objmgr_pdev *pdev, 946 struct oem_data_req *req); 947 QDF_STATUS (*wifi_pos_convert_pdev_id_host_to_target)( 948 struct wlan_objmgr_psoc *psoc, uint32_t host_pdev_id, 949 uint32_t *target_pdev_id); 950 QDF_STATUS (*wifi_pos_convert_pdev_id_target_to_host)( 951 struct wlan_objmgr_psoc *psoc, uint32_t target_pdev_id, 952 uint32_t *host_pdev_id); 953 QDF_STATUS (*wifi_pos_get_vht_ch_width)(struct wlan_objmgr_psoc *psoc, 954 enum phy_ch_width *ch_width); 955 QDF_STATUS (*wifi_pos_parse_measreq_chan_info)( 956 struct wlan_objmgr_pdev *pdev, uint32_t data_len, 957 uint8_t *data, struct rtt_channel_info *chinfo); 958 QDF_STATUS (*send_rtt_pasn_auth_status) 959 (struct wlan_objmgr_psoc *psoc, 960 struct wlan_pasn_auth_status *data); 961 QDF_STATUS (*send_rtt_pasn_deauth)(struct wlan_objmgr_psoc *psoc, 962 struct qdf_mac_addr *peer_mac); 963 }; 964 #endif 965 966 #ifdef DIRECT_BUF_RX_ENABLE 967 /** 968 * struct wlan_lmac_if_direct_buf_rx_tx_ops - structure of direct buf rx txops 969 * @direct_buf_rx_module_register: Registration API callback for modules 970 * to register with direct buf rx framework 971 * @direct_buf_rx_module_unregister: Unregistration API to clean up module 972 * specific resources in DBR 973 * @direct_buf_rx_register_events: Registration of WMI events for direct 974 * buffer rx framework 975 * @direct_buf_rx_unregister_events: Unregistraton of WMI events for direct 976 * buffer rx framework 977 * @direct_buf_rx_print_ring_stat: Print ring status per module per pdev 978 * 979 * @direct_buf_rx_get_ring_params: Get ring parameters for module_id 980 * @direct_buf_rx_start_ring_debug: Start DBR ring debug 981 * @direct_buf_rx_stop_ring_debug: Stop DBR ring debug 982 * @direct_buf_rx_start_buffer_poisoning: Start DBR buffer poisoning 983 * @direct_buf_rx_stop_buffer_poisoning: Stop DBR buffer poisoning 984 */ 985 struct wlan_lmac_if_direct_buf_rx_tx_ops { 986 QDF_STATUS (*direct_buf_rx_module_register)( 987 struct wlan_objmgr_pdev *pdev, uint8_t mod_id, 988 struct dbr_module_config *dbr_config, 989 bool (*dbr_rsp_handler) 990 (struct wlan_objmgr_pdev *pdev, 991 struct direct_buf_rx_data *dbr_data)); 992 QDF_STATUS (*direct_buf_rx_module_unregister)( 993 struct wlan_objmgr_pdev *pdev, uint8_t mod_id); 994 QDF_STATUS (*direct_buf_rx_register_events)( 995 struct wlan_objmgr_psoc *psoc); 996 QDF_STATUS (*direct_buf_rx_unregister_events)( 997 struct wlan_objmgr_psoc *psoc); 998 QDF_STATUS (*direct_buf_rx_print_ring_stat)( 999 struct wlan_objmgr_pdev *pdev); 1000 QDF_STATUS (*direct_buf_rx_get_ring_params) 1001 (struct wlan_objmgr_pdev *pdev, 1002 struct module_ring_params *param, 1003 uint8_t module_id, uint8_t srng_id); 1004 QDF_STATUS (*direct_buf_rx_start_ring_debug)( 1005 struct wlan_objmgr_pdev *pdev, uint8_t mod_id, 1006 uint32_t num_ring_debug_entries); 1007 QDF_STATUS (*direct_buf_rx_stop_ring_debug)( 1008 struct wlan_objmgr_pdev *pdev, uint8_t mod_id); 1009 QDF_STATUS (*direct_buf_rx_start_buffer_poisoning)( 1010 struct wlan_objmgr_pdev *pdev, uint8_t mod_id, uint32_t value); 1011 QDF_STATUS (*direct_buf_rx_stop_buffer_poisoning)( 1012 struct wlan_objmgr_pdev *pdev, uint8_t mod_id); 1013 }; 1014 #endif /* DIRECT_BUF_RX_ENABLE */ 1015 1016 #ifdef FEATURE_WLAN_TDLS 1017 /* fwd declarations for tdls tx ops */ 1018 struct tdls_info; 1019 struct tdls_peer_update_state; 1020 struct tdls_channel_switch_params; 1021 struct sta_uapsd_trig_params; 1022 /** 1023 * struct wlan_lmac_if_tdls_tx_ops - south bound tx function pointers for tdls 1024 * @update_fw_state: function to update tdls firmware state 1025 * @update_peer_state: function to update tdls peer state 1026 * @set_offchan_mode: function to set tdls offchannel mode 1027 * @tdls_reg_ev_handler: function to register for tdls events 1028 * @tdls_unreg_ev_handler: function to unregister for tdls events 1029 * 1030 * tdls module uses these functions to avail ol/da lmac services 1031 */ 1032 struct wlan_lmac_if_tdls_tx_ops { 1033 QDF_STATUS (*update_fw_state)(struct wlan_objmgr_psoc *psoc, 1034 struct tdls_info *req); 1035 QDF_STATUS (*update_peer_state)(struct wlan_objmgr_psoc *psoc, 1036 struct tdls_peer_update_state *param); 1037 QDF_STATUS (*set_offchan_mode)(struct wlan_objmgr_psoc *psoc, 1038 struct tdls_channel_switch_params *param); 1039 QDF_STATUS (*tdls_reg_ev_handler)(struct wlan_objmgr_psoc *psoc, 1040 void *arg); 1041 QDF_STATUS (*tdls_unreg_ev_handler) (struct wlan_objmgr_psoc *psoc, 1042 void *arg); 1043 }; 1044 1045 /* fwd declarations for tdls rx ops */ 1046 struct tdls_event_info; 1047 /** 1048 * struct wlan_lmac_if_tdls_rx_ops - south bound rx function pointers for tdls 1049 * @tdls_ev_handler: function to handler tdls event 1050 * 1051 * lmac modules uses this API to post scan events to tdls module 1052 */ 1053 struct wlan_lmac_if_tdls_rx_ops { 1054 QDF_STATUS (*tdls_ev_handler)(struct wlan_objmgr_psoc *psoc, 1055 struct tdls_event_info *info); 1056 }; 1057 #endif 1058 1059 /** 1060 * struct wlan_lmac_if_ftm_rx_ops - south bound rx function pointers for FTM 1061 * @ftm_ev_handler: function to handle FTM event 1062 * 1063 * lmac modules uses this API to post FTM events to FTM module 1064 */ 1065 struct wlan_lmac_if_ftm_rx_ops { 1066 QDF_STATUS (*ftm_ev_handler)(struct wlan_objmgr_pdev *pdev, 1067 uint8_t *event_buf, uint32_t len); 1068 }; 1069 1070 /** 1071 * struct wlan_lmac_if_reg_tx_ops - structure of tx function 1072 * pointers for regulatory component 1073 * @register_master_handler: pointer to register event handler 1074 * @unregister_master_handler: pointer to unregister event handler 1075 * @register_master_ext_handler: pointer to register ext event handler 1076 * @unregister_master_ext_handler: pointer to unregister ext event handler 1077 * @set_country_code: 1078 * @fill_umac_legacy_chanlist: 1079 * @register_11d_new_cc_handler: pointer to register 11d cc event handler 1080 * @unregister_11d_new_cc_handler: pointer to unregister 11d cc event handler 1081 * @start_11d_scan: 1082 * @stop_11d_scan: 1083 * @is_there_serv_ready_extn: 1084 * @set_user_country_code: 1085 * @set_country_failed: 1086 * @register_ch_avoid_event_handler: 1087 * @unregister_ch_avoid_event_handler: 1088 * @send_ctl_info: call-back function to send CTL info to firmware 1089 * @get_phy_id_from_pdev_id: 1090 * @get_pdev_id_from_phy_id: 1091 * @set_tpc_power: send transmit power control info to firmware 1092 * @get_opclass_tbl_idx: Get opclass table index value 1093 * @send_afc_ind: send AFC indication info to firmware. 1094 * @register_afc_event_handler: pointer to register afc event handler 1095 * @unregister_afc_event_handler: pointer to unregister afc event handler 1096 * @trigger_acs_for_afc: pointer to trigger acs for afc 1097 * @reg_get_min_psd: 1098 * @is_chip_11be: 1099 */ 1100 struct wlan_lmac_if_reg_tx_ops { 1101 QDF_STATUS (*register_master_handler)(struct wlan_objmgr_psoc *psoc, 1102 void *arg); 1103 QDF_STATUS (*unregister_master_handler)(struct wlan_objmgr_psoc *psoc, 1104 void *arg); 1105 QDF_STATUS (*register_master_ext_handler)(struct wlan_objmgr_psoc *psoc, 1106 void *arg); 1107 QDF_STATUS (*unregister_master_ext_handler) 1108 (struct wlan_objmgr_psoc *psoc, void *arg); 1109 QDF_STATUS (*set_country_code)(struct wlan_objmgr_psoc *psoc, 1110 void *arg); 1111 QDF_STATUS (*fill_umac_legacy_chanlist)(struct wlan_objmgr_pdev *pdev, 1112 struct regulatory_channel *cur_chan_list); 1113 QDF_STATUS (*register_11d_new_cc_handler)( 1114 struct wlan_objmgr_psoc *psoc, void *arg); 1115 QDF_STATUS (*unregister_11d_new_cc_handler)( 1116 struct wlan_objmgr_psoc *psoc, void *arg); 1117 QDF_STATUS (*start_11d_scan)(struct wlan_objmgr_psoc *psoc, 1118 struct reg_start_11d_scan_req *reg_start_11d_scan_req); 1119 QDF_STATUS (*stop_11d_scan)(struct wlan_objmgr_psoc *psoc, 1120 struct reg_stop_11d_scan_req *reg_stop_11d_scan_req); 1121 bool (*is_there_serv_ready_extn)(struct wlan_objmgr_psoc *psoc); 1122 QDF_STATUS (*set_user_country_code)(struct wlan_objmgr_psoc *psoc, 1123 uint8_t pdev_id, 1124 struct cc_regdmn_s *rd); 1125 QDF_STATUS (*set_country_failed)(struct wlan_objmgr_pdev *pdev); 1126 QDF_STATUS (*register_ch_avoid_event_handler)( 1127 struct wlan_objmgr_psoc *psoc, void *arg); 1128 QDF_STATUS (*unregister_ch_avoid_event_handler)( 1129 struct wlan_objmgr_psoc *psoc, void *arg); 1130 QDF_STATUS (*send_ctl_info)(struct wlan_objmgr_psoc *psoc, 1131 struct reg_ctl_params *params); 1132 QDF_STATUS (*get_phy_id_from_pdev_id)(struct wlan_objmgr_psoc *psoc, 1133 uint8_t pdev_id, uint8_t *phy_id); 1134 QDF_STATUS (*get_pdev_id_from_phy_id)(struct wlan_objmgr_psoc *psoc, 1135 uint8_t phy_id, uint8_t *pdev_id); 1136 QDF_STATUS (*set_tpc_power)(struct wlan_objmgr_psoc *psoc, 1137 uint8_t vdev_id, 1138 struct reg_tpc_power_info *param); 1139 QDF_STATUS (*get_opclass_tbl_idx)(struct wlan_objmgr_pdev *pdev, 1140 uint8_t *opclass_tbl_idx); 1141 #ifdef CONFIG_AFC_SUPPORT 1142 QDF_STATUS (*send_afc_ind)(struct wlan_objmgr_psoc *psoc, 1143 uint8_t pdev_id, 1144 struct reg_afc_resp_rx_ind_info *param); 1145 QDF_STATUS (*register_afc_event_handler)(struct wlan_objmgr_psoc *psoc, 1146 void *arg); 1147 QDF_STATUS (*unregister_afc_event_handler) 1148 (struct wlan_objmgr_psoc *psoc, void *arg); 1149 QDF_STATUS (*trigger_acs_for_afc)(struct wlan_objmgr_pdev *pdev); 1150 1151 QDF_STATUS (*reg_get_min_psd) (struct wlan_objmgr_pdev *pdev, 1152 qdf_freq_t primary_freq, 1153 qdf_freq_t cen320, 1154 uint16_t punc_pattern, uint16_t bw, 1155 int16_t *min_psd); 1156 #endif 1157 bool (*is_chip_11be)(struct wlan_objmgr_psoc *psoc, 1158 uint16_t phy_id); 1159 }; 1160 1161 /** 1162 * struct wlan_lmac_if_dfs_tx_ops - Function pointer to call offload/lmac 1163 * functions from DFS module. 1164 * @dfs_enable: Enable DFS. 1165 * @dfs_get_caps: Get DFS capabilities. 1166 * @dfs_disable: Disable DFS 1167 * @dfs_gettsf64: Get tsf64 value. 1168 * @dfs_set_use_cac_prssi: Set use_cac_prssi value. 1169 * @dfs_get_dfsdomain: Get DFS domain. 1170 * @dfs_is_countryCode_CHINA: Check is country code CHINA. 1171 * @dfs_get_thresholds: Get thresholds. 1172 * @dfs_get_ext_busy: Get ext_busy. 1173 * @dfs_get_target_type: Get target type. 1174 * @dfs_is_countryCode_KOREA_ROC3: Check is county code Korea. 1175 * @dfs_get_ah_devid: Get ah devid. 1176 * @dfs_get_phymode_info: Get phymode info. 1177 * @dfs_reg_ev_handler: Register dfs event handler. 1178 * @dfs_process_emulate_bang_radar_cmd: Process emulate bang radar test command. 1179 * @dfs_agile_ch_cfg_cmd: Send Agile Channel Configuration command 1180 * @dfs_ocac_abort_cmd: Send Off-Channel CAC abort command. 1181 * @dfs_is_pdev_5ghz: Check if the given pdev is 5GHz. 1182 * @dfs_set_phyerr_filter_offload: Config phyerr filter offload. 1183 * @dfs_is_tgt_offload: 1184 * @dfs_is_tgt_bangradar_320_supp: To check host DFS 320MHZ support or not 1185 * @dfs_is_tgt_radar_found_chan_freq_eq_center_freq: 1186 * Check if chan_freq parameter of the 1187 * radar found wmi event points to channel 1188 * center. 1189 * @dfs_send_offload_enable_cmd: Send dfs offload enable command to fw. 1190 * @dfs_host_dfs_check_support: To check Host DFS confirmation feature 1191 * support. 1192 * @dfs_send_avg_radar_params_to_fw: Send average radar parameters to FW. 1193 * @dfs_send_usenol_pdev_param: Send usenol pdev param to FW. 1194 * @dfs_send_subchan_marking_pdev_param: Send subchan marking pdev param to FW. 1195 * @dfs_check_mode_switch_state: Find if HW mode switch is in progress. 1196 */ 1197 1198 struct wlan_lmac_if_dfs_tx_ops { 1199 QDF_STATUS (*dfs_enable)(struct wlan_objmgr_pdev *pdev, 1200 int *is_fastclk, 1201 struct wlan_dfs_phyerr_param *param, 1202 uint32_t dfsdomain); 1203 QDF_STATUS (*dfs_get_caps)(struct wlan_objmgr_pdev *pdev, 1204 struct wlan_dfs_caps *dfs_caps); 1205 QDF_STATUS (*dfs_disable)(struct wlan_objmgr_pdev *pdev, 1206 int no_cac); 1207 QDF_STATUS (*dfs_gettsf64)(struct wlan_objmgr_pdev *pdev, 1208 uint64_t *tsf64); 1209 QDF_STATUS (*dfs_set_use_cac_prssi)(struct wlan_objmgr_pdev *pdev); 1210 QDF_STATUS (*dfs_get_thresholds)(struct wlan_objmgr_pdev *pdev, 1211 struct wlan_dfs_phyerr_param *param); 1212 QDF_STATUS (*dfs_get_ext_busy)(struct wlan_objmgr_pdev *pdev, 1213 int *dfs_ext_chan_busy); 1214 QDF_STATUS (*dfs_get_target_type)(struct wlan_objmgr_pdev *pdev, 1215 uint32_t *target_type); 1216 QDF_STATUS (*dfs_get_ah_devid)(struct wlan_objmgr_pdev *pdev, 1217 uint16_t *devid); 1218 QDF_STATUS (*dfs_get_phymode_info)(struct wlan_objmgr_pdev *pdev, 1219 uint32_t chan_mode, 1220 uint32_t *mode_info, 1221 bool is_2gvht_en); 1222 QDF_STATUS (*dfs_reg_ev_handler)(struct wlan_objmgr_psoc *psoc); 1223 QDF_STATUS (*dfs_process_emulate_bang_radar_cmd)( 1224 struct wlan_objmgr_pdev *pdev, 1225 struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test); 1226 QDF_STATUS (*dfs_agile_ch_cfg_cmd)( 1227 struct wlan_objmgr_pdev *pdev, 1228 struct dfs_agile_cac_params *adfs_params); 1229 QDF_STATUS (*dfs_ocac_abort_cmd)(struct wlan_objmgr_pdev *pdev); 1230 QDF_STATUS (*dfs_is_pdev_5ghz)(struct wlan_objmgr_pdev *pdev, 1231 bool *is_5ghz); 1232 QDF_STATUS (*dfs_set_phyerr_filter_offload)( 1233 struct wlan_objmgr_pdev *pdev, 1234 bool dfs_phyerr_filter_offload); 1235 bool (*dfs_is_tgt_offload)(struct wlan_objmgr_psoc *psoc); 1236 bool (*dfs_is_tgt_bangradar_320_supp)(struct wlan_objmgr_psoc *psoc); 1237 bool (*dfs_is_tgt_radar_found_chan_freq_eq_center_freq) 1238 (struct wlan_objmgr_psoc *psoc); 1239 QDF_STATUS (*dfs_send_offload_enable_cmd)( 1240 struct wlan_objmgr_pdev *pdev, 1241 bool enable); 1242 QDF_STATUS (*dfs_host_dfs_check_support)(struct wlan_objmgr_pdev *pdev, 1243 bool *enabled); 1244 QDF_STATUS (*dfs_send_avg_radar_params_to_fw)( 1245 struct wlan_objmgr_pdev *pdev, 1246 struct dfs_radar_found_params *params); 1247 QDF_STATUS (*dfs_send_usenol_pdev_param)(struct wlan_objmgr_pdev *pdev, 1248 bool usenol); 1249 QDF_STATUS (*dfs_send_subchan_marking_pdev_param)( 1250 struct wlan_objmgr_pdev *pdev, 1251 bool subchanmark); 1252 QDF_STATUS (*dfs_check_mode_switch_state)( 1253 struct wlan_objmgr_pdev *pdev, 1254 bool *is_hw_mode_switch_in_progress); 1255 }; 1256 1257 /** 1258 * struct wlan_lmac_if_target_tx_ops - Function pointers to call target 1259 * functions from other modules. 1260 * @tgt_is_tgt_type_ar900b: To check AR900B target type. 1261 * @tgt_is_tgt_type_qca9984: To check QCA9984 target type. 1262 * @tgt_is_tgt_type_qca9888: To check QCA9888 target type. 1263 * @tgt_is_tgt_type_adrastea: To check QCS40X target type. 1264 * @tgt_is_tgt_type_qcn9000: To check QCN9000 (Pine) target type. 1265 * @tgt_is_tgt_type_qcn6122: To check QCN6122 (Spruce) target type. 1266 * @tgt_is_tgt_type_qcn9160: To check QCN9160 target type. 1267 * @tgt_is_tgt_type_qcn7605: To check QCN7605 target type. 1268 * @tgt_get_tgt_type: Get target type 1269 * @tgt_get_tgt_version: Get target version 1270 * @tgt_get_tgt_revision: Get target revision 1271 */ 1272 struct wlan_lmac_if_target_tx_ops { 1273 bool (*tgt_is_tgt_type_ar900b)(uint32_t); 1274 bool (*tgt_is_tgt_type_qca9984)(uint32_t); 1275 bool (*tgt_is_tgt_type_qca9888)(uint32_t); 1276 bool (*tgt_is_tgt_type_adrastea)(uint32_t); 1277 bool (*tgt_is_tgt_type_qcn9000)(uint32_t); 1278 bool (*tgt_is_tgt_type_qcn6122)(uint32_t); 1279 bool (*tgt_is_tgt_type_qcn9160)(uint32_t); 1280 bool (*tgt_is_tgt_type_qcn7605)(uint32_t); 1281 uint32_t (*tgt_get_tgt_type)(struct wlan_objmgr_psoc *psoc); 1282 uint32_t (*tgt_get_tgt_version)(struct wlan_objmgr_psoc *psoc); 1283 uint32_t (*tgt_get_tgt_revision)(struct wlan_objmgr_psoc *psoc); 1284 }; 1285 1286 #ifdef WLAN_OFFCHAN_TXRX_ENABLE 1287 /** 1288 * struct wlan_lmac_if_offchan_txrx_ops - Function pointers to check target 1289 * capabilities related to offchan txrx. 1290 * @offchan_data_tid_support: To check if target supports separate tid for 1291 * offchan data tx. 1292 */ 1293 struct wlan_lmac_if_offchan_txrx_ops { 1294 bool (*offchan_data_tid_support)(struct wlan_objmgr_pdev *pdev); 1295 }; 1296 #endif 1297 1298 struct wlan_green_ap_egap_params; 1299 1300 #ifdef WLAN_SUPPORT_GAP_LL_PS_MODE 1301 /** 1302 * struct green_ap_ll_ps_cmd_param - structure of the parameter of 1303 * green AP low latency power save mode command 1304 * @state: SAP low power state.(0 = disable, 1 = enable) 1305 * @bcn_interval: beacon interval (in ms) 1306 * @cookie: Cookie ID. Unique identifier to track power save command. 1307 * The value is generated by wlan_green_ap_get_cookie_id(). 1308 */ 1309 1310 struct green_ap_ll_ps_cmd_param { 1311 uint8_t state; 1312 uint16_t bcn_interval; 1313 uint32_t cookie; 1314 }; 1315 1316 /** 1317 * struct wlan_green_ap_ll_ps_event_param - Green AP low latency Power Save 1318 * event parameter structure 1319 * @bcn_mult: Beacon multiplier 1320 * @dialog_token: Dialog token 1321 * @next_tsf: Next TSF 1322 */ 1323 struct wlan_green_ap_ll_ps_event_param { 1324 uint16_t bcn_mult; 1325 uint32_t dialog_token; 1326 uint64_t next_tsf; 1327 }; 1328 #endif 1329 1330 /** 1331 * struct wlan_lmac_if_green_ap_tx_ops - structure of tx function 1332 * pointers for green ap component 1333 * @enable_egap: function pointer to send enable egap indication to fw 1334 * @ps_on_off_send: function pointer to send enable/disable green ap ps to fw 1335 * @reset_dev: Function pointer to reset device 1336 * @get_current_channel: function pointer to get current channel 1337 * @get_current_channel_flags: function pointer to get current channel flags 1338 * @get_capab: function pointer to get green ap capabilities 1339 * @ll_ps: function pointer to send low latency power save command 1340 */ 1341 struct wlan_lmac_if_green_ap_tx_ops { 1342 QDF_STATUS (*enable_egap)(struct wlan_objmgr_pdev *pdev, 1343 struct wlan_green_ap_egap_params *egap_params); 1344 QDF_STATUS (*ps_on_off_send)(struct wlan_objmgr_pdev *pdev, 1345 bool value, uint8_t pdev_id); 1346 QDF_STATUS (*reset_dev)(struct wlan_objmgr_pdev *pdev); 1347 uint16_t (*get_current_channel)(struct wlan_objmgr_pdev *pdev); 1348 uint64_t (*get_current_channel_flags)(struct wlan_objmgr_pdev *pdev); 1349 QDF_STATUS (*get_capab)(struct wlan_objmgr_pdev *pdev); 1350 #ifdef WLAN_SUPPORT_GAP_LL_PS_MODE 1351 QDF_STATUS (*ll_ps)(struct wlan_objmgr_vdev *vdev, 1352 struct green_ap_ll_ps_cmd_param *ll_ps_params); 1353 #endif 1354 }; 1355 1356 #ifdef FEATURE_COEX 1357 struct coex_config_params; 1358 1359 /** 1360 * struct wlan_lmac_if_coex_tx_ops - south bound tx function pointers for coex 1361 * @coex_config_send: function pointer to send coex config to fw 1362 */ 1363 struct wlan_lmac_if_coex_tx_ops { 1364 QDF_STATUS (*coex_config_send)(struct wlan_objmgr_pdev *pdev, 1365 struct coex_config_params *param); 1366 }; 1367 #endif 1368 1369 #ifdef WLAN_FEATURE_DBAM_CONFIG 1370 /** 1371 * struct wlan_lmac_if_dbam_tx_ops - south bound tx function pointers for dbam 1372 * @set_dbam_config: function pointer to send dbam config to fw 1373 * @dbam_event_attach: 1374 * @dbam_event_detach: 1375 */ 1376 struct wlan_lmac_if_dbam_tx_ops { 1377 QDF_STATUS (*set_dbam_config)(struct wlan_objmgr_psoc *psoc, 1378 struct coex_dbam_config_params *param); 1379 QDF_STATUS (*dbam_event_attach)(struct wlan_objmgr_psoc *psoc); 1380 QDF_STATUS (*dbam_event_detach)(struct wlan_objmgr_psoc *psoc); 1381 }; 1382 1383 /** 1384 * struct wlan_lmac_if_dbam_rx_ops - defines southbound rx callback for dbam 1385 * @dbam_resp_event: function pointer to rx dbam response event from FW 1386 */ 1387 struct wlan_lmac_if_dbam_rx_ops { 1388 QDF_STATUS (*dbam_resp_event)(struct wlan_objmgr_psoc *psoc, 1389 enum coex_dbam_comp_status dbam_resp); 1390 }; 1391 #endif 1392 1393 #ifdef WLAN_FEATURE_GPIO_CFG 1394 struct gpio_config_params; 1395 struct gpio_output_params; 1396 1397 /** 1398 * struct wlan_lmac_if_gpio_tx_ops - south bound tx function pointers for gpio 1399 * @set_gpio_config: function pointert to send gpio config to fw 1400 * @set_gpio_output: function pointert to send gpio output to fw 1401 */ 1402 struct wlan_lmac_if_gpio_tx_ops { 1403 QDF_STATUS (*set_gpio_config)(struct wlan_objmgr_psoc *psoc, 1404 struct gpio_config_params *param); 1405 QDF_STATUS (*set_gpio_output)(struct wlan_objmgr_psoc *psoc, 1406 struct gpio_output_params *param); 1407 }; 1408 #endif 1409 1410 #ifdef IPA_OFFLOAD 1411 struct wlan_lmac_if_ipa_tx_ops { 1412 QDF_STATUS (*ipa_uc_offload_control_req)( 1413 struct wlan_objmgr_psoc *psoc, 1414 struct ipa_uc_offload_control_params *req); 1415 QDF_STATUS (*ipa_intrabss_control_req)( 1416 struct wlan_objmgr_psoc *psoc, 1417 struct ipa_intrabss_control_params *req); 1418 }; 1419 #endif 1420 /** 1421 * struct wlan_lmac_if_son_tx_ops: son tx operations 1422 * @son_send_null: send null packet 1423 * @get_peer_rate: get peer rate 1424 * @peer_ext_stats_enable: Enable peer ext stats 1425 */ 1426 struct wlan_lmac_if_son_tx_ops { 1427 /* Function pointer to enable/disable band steering */ 1428 QDF_STATUS (*son_send_null)(struct wlan_objmgr_pdev *pdev, 1429 u_int8_t *macaddr, 1430 struct wlan_objmgr_vdev *vdev); 1431 1432 u_int32_t (*get_peer_rate)(struct wlan_objmgr_peer *peer, 1433 u_int8_t type); 1434 1435 QDF_STATUS (*peer_ext_stats_enable)(struct wlan_objmgr_pdev *pdev, 1436 u_int8_t *peer_addr, 1437 struct wlan_objmgr_vdev *vdev, 1438 u_int32_t stats_count, 1439 u_int32_t enable); 1440 }; 1441 1442 /** 1443 * struct wlan_lmac_if_son_rx_ops - son rx operations 1444 * @deliver_event: deliver mlme and other mac events 1445 * @process_mgmt_frame: process mgmt frames 1446 * @config_set: route son config from cfg80211 1447 * @config_get: route son config from cfg80211 1448 * @config_ext_set_get: route extended configs from cfg80211 1449 */ 1450 struct wlan_lmac_if_son_rx_ops { 1451 int (*deliver_event)(struct wlan_objmgr_vdev *vdev, 1452 struct wlan_objmgr_peer *peer, 1453 uint32_t event, 1454 void *event_data); 1455 int (*process_mgmt_frame)(struct wlan_objmgr_vdev *vdev, 1456 struct wlan_objmgr_peer *peer, 1457 int subtype, u_int8_t *frame, 1458 u_int16_t frame_len, 1459 void *meta_data); 1460 int (*config_set)(struct wlan_objmgr_vdev *vdev, 1461 void *params); 1462 int (*config_get)(struct wlan_objmgr_vdev *vdev, 1463 void *params); 1464 int (*config_ext_set_get)(struct wlan_objmgr_vdev *vdev, 1465 void *params, 1466 void *wri); 1467 }; 1468 1469 #ifdef WLAN_FEATURE_11BE_MLO 1470 /** 1471 * struct wlan_lmac_if_mlo_tx_ops - south bound tx function pointers for mlo 1472 * @register_events: function to register event handlers with FW 1473 * @unregister_events: function to de-register event handlers with FW 1474 * @link_set_active: function to send mlo link set active command to FW 1475 * @shmem_local_ops: operations specific to WLAN_MLO_GLOBAL_SHMEM_SUPPORT 1476 * @send_tid_to_link_mapping: function to send T2LM command to FW 1477 * @send_link_removal_cmd: function to send MLO link removal command to FW 1478 */ 1479 struct wlan_lmac_if_mlo_tx_ops { 1480 QDF_STATUS (*register_events)(struct wlan_objmgr_psoc *psoc); 1481 QDF_STATUS (*unregister_events)(struct wlan_objmgr_psoc *psoc); 1482 QDF_STATUS (*link_set_active)(struct wlan_objmgr_psoc *psoc, 1483 struct mlo_link_set_active_param *param); 1484 #ifdef WLAN_MLO_GLOBAL_SHMEM_SUPPORT 1485 struct wlan_lmac_if_global_shmem_local_ops shmem_local_ops; 1486 #endif 1487 QDF_STATUS (*send_tid_to_link_mapping)(struct wlan_objmgr_vdev *vdev, 1488 struct wlan_t2lm_info *t2lm); 1489 QDF_STATUS (*send_link_removal_cmd)( 1490 struct wlan_objmgr_psoc *psoc, 1491 const struct mlo_link_removal_cmd_params *param); 1492 }; 1493 1494 /** 1495 * struct wlan_lmac_if_mlo_rx_ops - defines southbound rx callbacks for mlo 1496 * @process_link_set_active_resp: function pointer to rx FW events 1497 * @process_mlo_vdev_tid_to_link_map_event: function pointer to rx T2LM event 1498 * @mlo_link_removal_handler: function pointer for MLO link removal handler 1499 */ 1500 struct wlan_lmac_if_mlo_rx_ops { 1501 QDF_STATUS 1502 (*process_link_set_active_resp)(struct wlan_objmgr_psoc *psoc, 1503 struct mlo_link_set_active_resp *event); 1504 QDF_STATUS (*process_mlo_vdev_tid_to_link_map_event)( 1505 struct wlan_objmgr_psoc *psoc, 1506 struct mlo_vdev_host_tid_to_link_map_resp *event); 1507 QDF_STATUS (*mlo_link_removal_handler)( 1508 struct wlan_objmgr_psoc *psoc, 1509 struct mlo_link_removal_evt_params *evt_params); 1510 }; 1511 #endif 1512 1513 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED) 1514 /** 1515 * struct wlan_lmac_if_twt_tx_ops - defines southbound tx callbacks for 1516 * TWT (Target Wake Time) component 1517 * @enable_req: function pointer to send TWT enable command to FW 1518 * @disable_req: function pointer to send TWT disable command to FW 1519 * @setup_req: function pointer to send TWT add dialog command to FW 1520 * @teardown_req: function pointer to send TWT delete dialog command to FW 1521 * @pause_req: function pointer to send TWT pause dialog command to FW 1522 * @resume_req: function pointer to send TWT resume dialog command to FW 1523 * @nudge_req: function pointer to send TWT nudge dialog command to FW 1524 * @set_ac_param: function pointer to send TWT access category param to FW 1525 * @register_events: function pointer to register events from FW 1526 * @deregister_events: function pointer to deregister events from FW 1527 */ 1528 struct wlan_lmac_if_twt_tx_ops { 1529 QDF_STATUS (*enable_req)(struct wlan_objmgr_psoc *psoc, 1530 struct twt_enable_param *params); 1531 QDF_STATUS (*disable_req)(struct wlan_objmgr_psoc *psoc, 1532 struct twt_disable_param *params); 1533 QDF_STATUS (*setup_req)(struct wlan_objmgr_psoc *psoc, 1534 struct twt_add_dialog_param *params); 1535 QDF_STATUS (*teardown_req)(struct wlan_objmgr_psoc *psoc, 1536 struct twt_del_dialog_param *params); 1537 QDF_STATUS (*pause_req)(struct wlan_objmgr_psoc *psoc, 1538 struct twt_pause_dialog_cmd_param *params); 1539 QDF_STATUS (*resume_req)(struct wlan_objmgr_psoc *psoc, 1540 struct twt_resume_dialog_cmd_param *params); 1541 QDF_STATUS (*nudge_req)(struct wlan_objmgr_psoc *psoc, 1542 struct twt_nudge_dialog_cmd_param *params); 1543 QDF_STATUS (*set_ac_param)(struct wlan_objmgr_psoc *psoc, 1544 enum twt_traffic_ac twt_ac, uint8_t mac_id); 1545 QDF_STATUS (*register_events)(struct wlan_objmgr_psoc *psoc); 1546 QDF_STATUS (*deregister_events)(struct wlan_objmgr_psoc *psoc); 1547 }; 1548 1549 /** 1550 * struct wlan_lmac_if_twt_rx_ops - defines southbound xx callbacks for 1551 * TWT (Target Wake Time) component 1552 * @twt_enable_comp_cb: function pointer to process TWT enable event 1553 * @twt_disable_comp_cb: function pointer to process TWT disable event 1554 * @twt_setup_comp_cb: function pointer to process TWT add dialog event 1555 * @twt_teardown_comp_cb: function pointer to process TWT del dialog event 1556 * @twt_pause_comp_cb: function pointer to process TWT pause dialog event 1557 * @twt_resume_comp_cb: function pointer to process TWT resume dialog 1558 * event 1559 * @twt_nudge_comp_cb: function pointer to process TWT nudge dialog event 1560 * @twt_notify_comp_cb: function pointer to process TWT notify event 1561 * @twt_ack_comp_cb: function pointer to process TWT ack event 1562 */ 1563 struct wlan_lmac_if_twt_rx_ops { 1564 QDF_STATUS (*twt_enable_comp_cb)(struct wlan_objmgr_psoc *psoc, 1565 struct twt_enable_complete_event_param *event); 1566 QDF_STATUS (*twt_disable_comp_cb)(struct wlan_objmgr_psoc *psoc, 1567 struct twt_disable_complete_event_param *event); 1568 QDF_STATUS (*twt_setup_comp_cb)(struct wlan_objmgr_psoc *psoc, 1569 struct twt_add_dialog_complete_event *event); 1570 QDF_STATUS (*twt_teardown_comp_cb)(struct wlan_objmgr_psoc *psoc, 1571 struct twt_del_dialog_complete_event_param *event); 1572 QDF_STATUS (*twt_pause_comp_cb)(struct wlan_objmgr_psoc *psoc, 1573 struct twt_pause_dialog_complete_event_param *event); 1574 QDF_STATUS (*twt_resume_comp_cb)(struct wlan_objmgr_psoc *psoc, 1575 struct twt_resume_dialog_complete_event_param *event); 1576 QDF_STATUS (*twt_nudge_comp_cb)(struct wlan_objmgr_psoc *psoc, 1577 struct twt_nudge_dialog_complete_event_param *event); 1578 QDF_STATUS (*twt_notify_comp_cb)(struct wlan_objmgr_psoc *psoc, 1579 struct twt_notify_event_param *event); 1580 QDF_STATUS (*twt_ack_comp_cb)(struct wlan_objmgr_psoc *psoc, 1581 struct twt_ack_complete_event_param *params); 1582 }; 1583 #endif 1584 1585 #if defined WLAN_FEATURE_SR 1586 struct wlan_lmac_if_spatial_reuse_tx_ops { 1587 QDF_STATUS (*send_cfg)(struct wlan_objmgr_vdev *vdev, uint8_t sr_ctrl, 1588 uint8_t non_srg_max_pd_offset); 1589 QDF_STATUS (*send_sr_prohibit_cfg)(struct wlan_objmgr_vdev *vdev, 1590 bool he_siga_val15_allowed); 1591 QDF_STATUS(*target_if_set_sr_enable_disable)( 1592 struct wlan_objmgr_vdev *vdev, 1593 struct wlan_objmgr_pdev *pdev, 1594 bool is_sr_enable, int32_t srg_pd_threshold, 1595 int32_t non_srg_pd_threshold); 1596 }; 1597 #endif 1598 1599 #ifdef WLAN_FEATURE_COAP 1600 /** 1601 * struct wlan_lmac_if_coap_tx_ops - south bound tx function pointers for CoAP 1602 * @attach: function pointer to attach CoAP component 1603 * @detach: function pointer to detach CoAP component 1604 * @offload_reply_enable: function pointer to enable CoAP offload reply 1605 * @offload_reply_disable: function pointer to disable CoAP offload reply 1606 * @offload_periodic_tx_enable: function pointer to enable CoAP offload 1607 * periodic transmitting 1608 * @offload_periodic_tx_disable: function pointer to disable CoAP offload 1609 * periodic transmitting 1610 * @offload_cache_get: function pointer to get cached CoAP messages 1611 */ 1612 struct wlan_lmac_if_coap_tx_ops { 1613 QDF_STATUS (*attach)(struct wlan_objmgr_psoc *psoc); 1614 QDF_STATUS (*detach)(struct wlan_objmgr_psoc *psoc); 1615 QDF_STATUS (*offload_reply_enable)(struct wlan_objmgr_vdev *vdev, 1616 struct coap_offload_reply_param *param); 1617 QDF_STATUS (*offload_reply_disable)(struct wlan_objmgr_vdev *vdev, 1618 uint32_t req_id); 1619 QDF_STATUS (*offload_periodic_tx_enable)(struct wlan_objmgr_vdev *vdev, 1620 struct coap_offload_periodic_tx_param *param); 1621 QDF_STATUS (*offload_periodic_tx_disable)(struct wlan_objmgr_vdev *vdev, 1622 uint32_t req_id); 1623 QDF_STATUS (*offload_cache_get)(struct wlan_objmgr_vdev *vdev, 1624 uint32_t req_id); 1625 }; 1626 #endif 1627 1628 /** 1629 * struct wlan_lmac_if_tx_ops - south bound tx function pointers 1630 * @mgmt_txrx_tx_ops: mgmt txrx tx ops 1631 * @scan: scan tx ops 1632 * @p2p: P2P tx ops 1633 * @iot_sim_tx_ops: IoT sim tx ops 1634 * @son_tx_ops: SON tx ops 1635 * @atf_tx_ops: ATF tx ops 1636 * @cp_stats_tx_ops: cp stats tx_ops 1637 * @dcs_tx_ops: DCS tx ops 1638 * @sa_api_tx_ops: SA API tx ops 1639 * @cfr_tx_ops: CFR tx ops 1640 * @sptrl_tx_ops: Spectral tx ops 1641 * @crypto_tx_ops: Crypto tx ops 1642 * @wifi_pos_tx_ops: WiFi Positioning tx ops 1643 * @reg_ops: Regulatory tx ops 1644 * @dfs_tx_ops: dfs tx ops. 1645 * @tdls_tx_ops: TDLS tx ops 1646 * @fd_tx_ops: FILS tx ops 1647 * @mops: MLME tx ops 1648 * @target_tx_ops: Target tx ops 1649 * @offchan_txrx_ops: Off-channel tx ops 1650 * @dbr_tx_ops: Direct Buffer Rx tx ops 1651 * @green_ap_tx_ops: green_ap tx_ops 1652 * @ftm_tx_ops: FTM tx ops 1653 * @coex_ops: coex tx_ops 1654 * @dbam_tx_ops: coex dbam tx_ops 1655 * @gpio_ops: gpio tx_ops 1656 * @mlo_ops: MLO tx ops 1657 * @ipa_ops: IPA tx ops 1658 * @twt_tx_ops: TWT tx ops 1659 * @spatial_reuse_tx_ops: Spatial Reuse tx ops 1660 * @coap_ops: COAP tx ops 1661 * 1662 * Callback function tabled to be registered with umac. 1663 * umac will use the functional table to send events/frames to wmi 1664 */ 1665 1666 struct wlan_lmac_if_tx_ops { 1667 /* Components to declare function pointers required by the module 1668 * in component specific structure. 1669 * The component specific ops structure can be declared in this file 1670 * only 1671 */ 1672 struct wlan_lmac_if_mgmt_txrx_tx_ops mgmt_txrx_tx_ops; 1673 struct wlan_lmac_if_scan_tx_ops scan; 1674 #ifdef CONVERGED_P2P_ENABLE 1675 struct wlan_lmac_if_p2p_tx_ops p2p; 1676 #endif 1677 #ifdef WLAN_IOT_SIM_SUPPORT 1678 struct wlan_lmac_if_iot_sim_tx_ops iot_sim_tx_ops; 1679 #endif 1680 #if defined(QCA_SUPPORT_SON) || defined(WLAN_FEATURE_SON) 1681 struct wlan_lmac_if_son_tx_ops son_tx_ops; 1682 #endif 1683 #ifdef WLAN_ATF_ENABLE 1684 struct wlan_lmac_if_atf_tx_ops atf_tx_ops; 1685 #endif 1686 #ifdef QCA_SUPPORT_CP_STATS 1687 struct wlan_lmac_if_cp_stats_tx_ops cp_stats_tx_ops; 1688 #endif 1689 #ifdef DCS_INTERFERENCE_DETECTION 1690 struct wlan_target_if_dcs_tx_ops dcs_tx_ops; 1691 #endif 1692 #ifdef WLAN_SA_API_ENABLE 1693 struct wlan_lmac_if_sa_api_tx_ops sa_api_tx_ops; 1694 #endif 1695 1696 #ifdef WLAN_CFR_ENABLE 1697 struct wlan_lmac_if_cfr_tx_ops cfr_tx_ops; 1698 #endif 1699 1700 #ifdef WLAN_CONV_SPECTRAL_ENABLE 1701 struct wlan_lmac_if_sptrl_tx_ops sptrl_tx_ops; 1702 #endif 1703 1704 struct wlan_lmac_if_crypto_tx_ops crypto_tx_ops; 1705 1706 #ifdef WIFI_POS_CONVERGED 1707 struct wlan_lmac_if_wifi_pos_tx_ops wifi_pos_tx_ops; 1708 #endif 1709 struct wlan_lmac_if_reg_tx_ops reg_ops; 1710 struct wlan_lmac_if_dfs_tx_ops dfs_tx_ops; 1711 1712 #ifdef FEATURE_WLAN_TDLS 1713 struct wlan_lmac_if_tdls_tx_ops tdls_tx_ops; 1714 #endif 1715 1716 #ifdef WLAN_SUPPORT_FILS 1717 struct wlan_lmac_if_fd_tx_ops fd_tx_ops; 1718 #endif 1719 struct wlan_lmac_if_mlme_tx_ops mops; 1720 struct wlan_lmac_if_target_tx_ops target_tx_ops; 1721 1722 #ifdef WLAN_OFFCHAN_TXRX_ENABLE 1723 struct wlan_lmac_if_offchan_txrx_ops offchan_txrx_ops; 1724 #endif 1725 1726 #ifdef DIRECT_BUF_RX_ENABLE 1727 struct wlan_lmac_if_direct_buf_rx_tx_ops dbr_tx_ops; 1728 #endif 1729 1730 #ifdef WLAN_SUPPORT_GREEN_AP 1731 struct wlan_lmac_if_green_ap_tx_ops green_ap_tx_ops; 1732 #endif 1733 1734 struct wlan_lmac_if_ftm_tx_ops ftm_tx_ops; 1735 1736 #ifdef FEATURE_COEX 1737 struct wlan_lmac_if_coex_tx_ops coex_ops; 1738 #endif 1739 1740 #ifdef WLAN_FEATURE_DBAM_CONFIG 1741 struct wlan_lmac_if_dbam_tx_ops dbam_tx_ops; 1742 #endif 1743 1744 #ifdef WLAN_FEATURE_GPIO_CFG 1745 struct wlan_lmac_if_gpio_tx_ops gpio_ops; 1746 #endif 1747 1748 #ifdef WLAN_FEATURE_11BE_MLO 1749 struct wlan_lmac_if_mlo_tx_ops mlo_ops; 1750 #endif 1751 1752 #ifdef IPA_OFFLOAD 1753 struct wlan_lmac_if_ipa_tx_ops ipa_ops; 1754 #endif 1755 1756 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED) 1757 struct wlan_lmac_if_twt_tx_ops twt_tx_ops; 1758 #endif 1759 1760 #if defined WLAN_FEATURE_SR 1761 struct wlan_lmac_if_spatial_reuse_tx_ops spatial_reuse_tx_ops; 1762 #endif 1763 1764 #ifdef WLAN_FEATURE_COAP 1765 struct wlan_lmac_if_coap_tx_ops coap_ops; 1766 #endif 1767 }; 1768 1769 /** 1770 * struct wlan_lmac_if_mgmt_txrx_rx_ops - structure of rx function 1771 * pointers for mgmt txrx component 1772 * @mgmt_tx_completion_handler: function pointer to give tx completions 1773 * to mgmt txrx comp. 1774 * @mgmt_rx_frame_handler: function pointer to give rx frame to mgmt txrx comp. 1775 * @mgmt_txrx_get_nbuf_from_desc_id: function pointer to get nbuf from desc id 1776 * @mgmt_txrx_get_peer_from_desc_id: function pointer to get peer from desc id 1777 * @mgmt_txrx_get_vdev_id_from_desc_id: function pointer to get vdev id from 1778 * desc id 1779 * @mgmt_txrx_get_free_desc_pool_count: 1780 * @mgmt_rx_frame_entry: Entry point for Rx frames into MGMT TxRx component 1781 * @mgmt_rx_reo_rx_ops: rxops of MGMT Rx REO module 1782 */ 1783 struct wlan_lmac_if_mgmt_txrx_rx_ops { 1784 QDF_STATUS (*mgmt_tx_completion_handler)( 1785 struct wlan_objmgr_pdev *pdev, 1786 uint32_t desc_id, uint32_t status, 1787 void *tx_compl_params); 1788 QDF_STATUS (*mgmt_rx_frame_handler)( 1789 struct wlan_objmgr_psoc *psoc, 1790 qdf_nbuf_t buf, 1791 struct mgmt_rx_event_params *mgmt_rx_params); 1792 qdf_nbuf_t (*mgmt_txrx_get_nbuf_from_desc_id)( 1793 struct wlan_objmgr_pdev *pdev, 1794 uint32_t desc_id); 1795 struct wlan_objmgr_peer * (*mgmt_txrx_get_peer_from_desc_id)( 1796 struct wlan_objmgr_pdev *pdev, uint32_t desc_id); 1797 uint8_t (*mgmt_txrx_get_vdev_id_from_desc_id)( 1798 struct wlan_objmgr_pdev *pdev, 1799 uint32_t desc_id); 1800 uint32_t (*mgmt_txrx_get_free_desc_pool_count)( 1801 struct wlan_objmgr_pdev *pdev); 1802 QDF_STATUS (*mgmt_rx_frame_entry)( 1803 struct wlan_objmgr_pdev *pdev, 1804 qdf_nbuf_t buf, 1805 struct mgmt_rx_event_params *mgmt_rx_params); 1806 #ifdef WLAN_MGMT_RX_REO_SUPPORT 1807 struct wlan_lmac_if_mgmt_rx_reo_rx_ops mgmt_rx_reo_rx_ops; 1808 #endif 1809 }; 1810 1811 /** 1812 * struct wlan_lmac_if_reg_rx_ops - structure of rx function pointers 1813 * @master_list_handler: 1814 * @master_list_ext_handler: 1815 * @afc_event_handler: 1816 * @reg_11d_new_cc_handler: 1817 * @reg_set_regdb_offloaded: 1818 * @reg_set_11d_offloaded: 1819 * @reg_set_6ghz_supported: 1820 * @reg_set_5dot9_ghz_supported: 1821 * @get_dfs_region: 1822 * @reg_ch_avoid_event_handler: 1823 * @reg_freq_to_chan: 1824 * @reg_set_chan_144: 1825 * @reg_get_chan_144: 1826 * @reg_program_default_cc: 1827 * @reg_get_current_regdomain: 1828 * @reg_enable_dfs_channels: 1829 * @reg_modify_pdev_chan_range: 1830 * @reg_update_pdev_wireless_modes: 1831 * @reg_is_range_only6g: 1832 * @reg_is_range_overlap_6g: 1833 * @reg_disable_chan_coex: 1834 * @reg_ignore_fw_reg_offload_ind: 1835 * @reg_get_unii_5g_bitmap: 1836 * @reg_set_ext_tpc_supported: 1837 * @reg_set_lower_6g_edge_ch_supp: 1838 * @reg_set_disable_upper_6g_edge_ch_supp: 1839 * @reg_display_super_chan_list: 1840 * @reg_display_super_chan_list: function pointer to print super channel list 1841 * @reg_set_afc_dev_type: 1842 * @reg_get_afc_dev_type: 1843 * @reg_set_eirp_preferred_support: 1844 * @reg_get_eirp_preferred_support: 1845 */ 1846 struct wlan_lmac_if_reg_rx_ops { 1847 QDF_STATUS (*master_list_handler)(struct cur_regulatory_info 1848 *reg_info); 1849 #ifdef CONFIG_BAND_6GHZ 1850 QDF_STATUS (*master_list_ext_handler)(struct cur_regulatory_info 1851 *reg_info); 1852 #ifdef CONFIG_AFC_SUPPORT 1853 QDF_STATUS (*afc_event_handler)(struct afc_regulatory_info *afc_info); 1854 #endif 1855 #endif 1856 QDF_STATUS (*reg_11d_new_cc_handler)(struct wlan_objmgr_psoc *psoc, 1857 struct reg_11d_new_country *reg_11d_new_cc); 1858 QDF_STATUS (*reg_set_regdb_offloaded)(struct wlan_objmgr_psoc *psoc, 1859 bool val); 1860 QDF_STATUS (*reg_set_11d_offloaded)(struct wlan_objmgr_psoc *psoc, 1861 bool val); 1862 QDF_STATUS (*reg_set_6ghz_supported)(struct wlan_objmgr_psoc *psoc, 1863 bool val); 1864 QDF_STATUS (*reg_set_5dot9_ghz_supported)(struct wlan_objmgr_psoc 1865 *psoc, bool val); 1866 QDF_STATUS (*get_dfs_region)(struct wlan_objmgr_pdev *pdev, 1867 enum dfs_reg *dfs_reg); 1868 QDF_STATUS (*reg_ch_avoid_event_handler)(struct wlan_objmgr_psoc *psoc, 1869 struct ch_avoid_ind_type *ch_avoid_ind); 1870 uint8_t (*reg_freq_to_chan)(struct wlan_objmgr_pdev *pdev, 1871 qdf_freq_t freq); 1872 QDF_STATUS (*reg_set_chan_144)(struct wlan_objmgr_pdev *pdev, 1873 bool enable_ch_144); 1874 bool (*reg_get_chan_144)(struct wlan_objmgr_pdev *pdev); 1875 #ifdef WLAN_REG_PARTIAL_OFFLOAD 1876 QDF_STATUS (*reg_program_default_cc)(struct wlan_objmgr_pdev *pdev, 1877 uint16_t regdmn); 1878 QDF_STATUS (*reg_get_current_regdomain)(struct wlan_objmgr_pdev *pdev, 1879 struct cur_regdmn_info *cur_regdmn); 1880 #endif 1881 QDF_STATUS (*reg_enable_dfs_channels)(struct wlan_objmgr_pdev *pdev, 1882 bool dfs_enable); 1883 QDF_STATUS (*reg_modify_pdev_chan_range)(struct 1884 wlan_objmgr_pdev *pdev); 1885 QDF_STATUS 1886 (*reg_update_pdev_wireless_modes)(struct wlan_objmgr_pdev *pdev, 1887 uint64_t wireless_modes); 1888 bool 1889 (*reg_is_range_only6g)(qdf_freq_t low_freq, qdf_freq_t high_freq); 1890 bool 1891 (*reg_is_range_overlap_6g)(qdf_freq_t low_freq, qdf_freq_t high_freq); 1892 QDF_STATUS (*reg_disable_chan_coex)(struct wlan_objmgr_pdev *pdev, 1893 uint8_t unii_5g_bitmap); 1894 bool (*reg_ignore_fw_reg_offload_ind)(struct wlan_objmgr_psoc *psoc); 1895 QDF_STATUS (*reg_get_unii_5g_bitmap)(struct wlan_objmgr_pdev *pdev, 1896 uint8_t *bitmap); 1897 QDF_STATUS (*reg_set_ext_tpc_supported)(struct wlan_objmgr_psoc *psoc, 1898 bool val); 1899 #if defined(CONFIG_BAND_6GHZ) 1900 QDF_STATUS 1901 (*reg_set_lower_6g_edge_ch_supp)(struct wlan_objmgr_psoc *psoc, 1902 bool val); 1903 QDF_STATUS 1904 (*reg_set_disable_upper_6g_edge_ch_supp)(struct wlan_objmgr_psoc *psoc, 1905 bool val); 1906 QDF_STATUS 1907 (*reg_display_super_chan_list)(struct wlan_objmgr_pdev *pdev); 1908 #endif 1909 1910 #ifdef CONFIG_AFC_SUPPORT 1911 QDF_STATUS 1912 (*reg_set_afc_dev_type)(struct wlan_objmgr_psoc *psoc, 1913 enum reg_afc_dev_deploy_type 1914 reg_afc_dev_type); 1915 QDF_STATUS 1916 (*reg_get_afc_dev_type)(struct wlan_objmgr_psoc *psoc, 1917 enum reg_afc_dev_deploy_type 1918 *reg_afc_dev_type); 1919 QDF_STATUS 1920 (*reg_set_eirp_preferred_support)( 1921 struct wlan_objmgr_psoc *psoc, 1922 bool reg_is_eirp_support_preferred); 1923 QDF_STATUS 1924 (*reg_get_eirp_preferred_support)( 1925 struct wlan_objmgr_psoc *psoc, 1926 bool *reg_is_eirp_support_preferred); 1927 #endif 1928 }; 1929 1930 #ifdef CONVERGED_P2P_ENABLE 1931 1932 /* forward declarations for p2p rx ops */ 1933 struct p2p_noa_info; 1934 struct p2p_lo_event; 1935 struct p2p_set_mac_filter_evt; 1936 struct mcc_quota_info; 1937 1938 /** 1939 * struct wlan_lmac_if_p2p_rx_ops - structure of rx function pointers 1940 * for P2P component 1941 * @lo_ev_handler: function pointer to give listen offload event 1942 * @noa_ev_handler: function pointer to give noa event 1943 * @add_mac_addr_filter_evt_handler: function pointer to process add mac addr 1944 * rx filter event 1945 * @mcc_quota_ev_handler: function pointer to receive mcc quota event 1946 */ 1947 struct wlan_lmac_if_p2p_rx_ops { 1948 #ifdef FEATURE_P2P_LISTEN_OFFLOAD 1949 QDF_STATUS (*lo_ev_handler)(struct wlan_objmgr_psoc *psoc, 1950 struct p2p_lo_event *event_info); 1951 #endif 1952 QDF_STATUS (*noa_ev_handler)(struct wlan_objmgr_psoc *psoc, 1953 struct p2p_noa_info *event_info); 1954 QDF_STATUS (*add_mac_addr_filter_evt_handler)( 1955 struct wlan_objmgr_psoc *psoc, 1956 struct p2p_set_mac_filter_evt *event_info); 1957 #ifdef WLAN_FEATURE_MCC_QUOTA 1958 QDF_STATUS (*mcc_quota_ev_handler)(struct wlan_objmgr_psoc *psoc, 1959 struct mcc_quota_info *event_info); 1960 #endif 1961 }; 1962 #endif 1963 1964 #ifdef WLAN_ATF_ENABLE 1965 1966 /** 1967 * struct wlan_lmac_if_atf_rx_ops - ATF south bound rx function pointers 1968 * @atf_get_fmcap: Get firmware capability for ATF 1969 * @atf_get_mode: Get mode of ATF 1970 * @atf_get_msdu_desc: Get msdu desc for ATF 1971 * @atf_get_max_vdevs: Get maximum vdevs for a Radio 1972 * @atf_get_peers: Get number of peers for a radio 1973 * @atf_get_tput_based: Get throughput based enabled/disabled 1974 * @atf_get_logging: Get logging enabled/disabled 1975 * @atf_get_ssidgroup: Get ssid group state 1976 * @atf_get_vdev_ac_blk_cnt: Get AC block count for vdev 1977 * @atf_get_peer_blk_txbitmap: Get peer tx traffic AC bitmap 1978 * @atf_get_vdev_blk_txtraffic: Get vdev tx traffic block state 1979 * @atf_get_sched: Get ATF scheduled policy 1980 * @atf_get_peer_stats: Get atf peer stats 1981 * @atf_get_token_allocated: Get atf token allocated 1982 * @atf_get_token_utilized: Get atf token utilized 1983 * @atf_set_sched: Set ATF schedule policy 1984 * @atf_set_fmcap: Set firmware capability for ATF 1985 * @atf_set_msdu_desc: Set msdu desc 1986 * @atf_set_max_vdevs: Set maximum vdevs number 1987 * @atf_set_peers: Set peers number 1988 * @atf_set_peer_stats: Set peer stats 1989 * @atf_set_vdev_blk_txtraffic: Set Block/unblock vdev tx traffic 1990 * @atf_peer_blk_txtraffic: Block peer tx traffic 1991 * @atf_peer_unblk_txtraffic: Unblock peer tx traffic 1992 * @atf_set_token_allocated: Set atf token allocated 1993 * @atf_set_token_utilized: Set atf token utilized 1994 * @atf_process_tx_ppdu_stats: Process Tx PPDU stats to get ATF stats 1995 * @atf_process_rx_ppdu_stats: Process Rx PPDU stats to get ATF stats 1996 * @atf_is_stats_enabled: Check ATF stats enabled or not 1997 */ 1998 struct wlan_lmac_if_atf_rx_ops { 1999 uint32_t (*atf_get_fmcap)(struct wlan_objmgr_psoc *psoc); 2000 uint32_t (*atf_get_mode)(struct wlan_objmgr_psoc *psoc); 2001 uint32_t (*atf_get_msdu_desc)(struct wlan_objmgr_psoc *psoc); 2002 uint32_t (*atf_get_max_vdevs)(struct wlan_objmgr_psoc *psoc); 2003 uint32_t (*atf_get_peers)(struct wlan_objmgr_psoc *psoc); 2004 uint32_t (*atf_get_tput_based)(struct wlan_objmgr_pdev *pdev); 2005 uint32_t (*atf_get_logging)(struct wlan_objmgr_pdev *pdev); 2006 uint32_t (*atf_get_ssidgroup)(struct wlan_objmgr_pdev *pdev); 2007 uint32_t (*atf_get_vdev_ac_blk_cnt)(struct wlan_objmgr_vdev *vdev); 2008 uint8_t (*atf_get_peer_blk_txbitmap)(struct wlan_objmgr_peer *peer); 2009 uint8_t (*atf_get_vdev_blk_txtraffic)(struct wlan_objmgr_vdev *vdev); 2010 uint32_t (*atf_get_sched)(struct wlan_objmgr_pdev *pdev); 2011 void (*atf_get_peer_stats)(struct wlan_objmgr_peer *peer, 2012 struct atf_stats *stats); 2013 uint16_t (*atf_get_token_allocated)(struct wlan_objmgr_peer *peer); 2014 uint16_t (*atf_get_token_utilized)(struct wlan_objmgr_peer *peer); 2015 void (*atf_set_sched)(struct wlan_objmgr_pdev *pdev, uint32_t value); 2016 void (*atf_set_fmcap)(struct wlan_objmgr_psoc *psoc, uint32_t value); 2017 void (*atf_set_msdu_desc)(struct wlan_objmgr_psoc *psoc, 2018 uint32_t value); 2019 void (*atf_set_max_vdevs)(struct wlan_objmgr_psoc *psoc, 2020 uint32_t value); 2021 void (*atf_set_peers)(struct wlan_objmgr_psoc *psoc, uint32_t value); 2022 void (*atf_set_peer_stats)(struct wlan_objmgr_peer *peer, 2023 struct atf_stats *stats); 2024 void (*atf_set_vdev_blk_txtraffic)(struct wlan_objmgr_vdev *vdev, 2025 uint8_t value); 2026 void (*atf_peer_blk_txtraffic)(struct wlan_objmgr_peer *peer, 2027 int8_t ac_id); 2028 void (*atf_peer_unblk_txtraffic)(struct wlan_objmgr_peer *peer, 2029 int8_t ac_id); 2030 void (*atf_set_token_allocated)(struct wlan_objmgr_peer *peer, 2031 uint16_t value); 2032 void (*atf_set_token_utilized)(struct wlan_objmgr_peer *peer, 2033 uint16_t value); 2034 void (*atf_process_tx_ppdu_stats)(struct wlan_objmgr_pdev *pdev, 2035 qdf_nbuf_t msg); 2036 void (*atf_process_rx_ppdu_stats)(struct wlan_objmgr_pdev *pdev, 2037 qdf_nbuf_t msg); 2038 uint8_t (*atf_is_stats_enabled)(struct wlan_objmgr_pdev *pdev); 2039 }; 2040 #endif 2041 2042 #ifdef WLAN_SUPPORT_FILS 2043 /** 2044 * struct wlan_lmac_if_fd_rx_ops - FILS Discovery specific Rx function pointers 2045 * @fd_is_fils_enable: FILS enabled or not 2046 * @fd_alloc: Allocate FD buffer 2047 * @fd_stop: Stop and free deferred FD buffer 2048 * @fd_free: Free FD frame buffer 2049 * @fd_get_valid_fd_period: Get valid FD period 2050 * @fd_swfda_handler: SWFDA event handler 2051 * @fd_offload: Offload FD frame 2052 * @fd_tmpl_update: Update the FD frame template 2053 */ 2054 struct wlan_lmac_if_fd_rx_ops { 2055 uint8_t (*fd_is_fils_enable)(struct wlan_objmgr_vdev *vdev); 2056 void (*fd_alloc)(struct wlan_objmgr_vdev *vdev); 2057 void (*fd_stop)(struct wlan_objmgr_vdev *vdev); 2058 void (*fd_free)(struct wlan_objmgr_vdev *vdev); 2059 uint32_t (*fd_get_valid_fd_period)(struct wlan_objmgr_vdev *vdev, 2060 uint8_t *is_modified); 2061 QDF_STATUS (*fd_swfda_handler)(struct wlan_objmgr_vdev *vdev); 2062 QDF_STATUS (*fd_offload)(struct wlan_objmgr_vdev *vdev, 2063 uint32_t vdev_id); 2064 QDF_STATUS (*fd_tmpl_update)(struct wlan_objmgr_vdev *vdev); 2065 }; 2066 #endif 2067 2068 #ifdef WLAN_SA_API_ENABLE 2069 2070 /** 2071 * struct wlan_lmac_if_sa_api_rx_ops - SA API south bound rx function pointers 2072 * @sa_api_get_sa_supported: 2073 * @sa_api_get_validate_sw: 2074 * @sa_api_enable_sa: 2075 * @sa_api_get_sa_enable: 2076 * @sa_api_peer_assoc_hanldler: 2077 * @sa_api_update_tx_feedback: 2078 * @sa_api_update_rx_feedback: 2079 * @sa_api_ucfg_set_param: 2080 * @sa_api_ucfg_get_param: 2081 * @sa_api_is_tx_feedback_enabled: 2082 * @sa_api_is_rx_feedback_enabled: 2083 * @sa_api_convert_rate_2g: 2084 * @sa_api_convert_rate_5g: 2085 * @sa_api_get_sa_mode: 2086 * @sa_api_get_beacon_txantenna: 2087 * @sa_api_cwm_action: 2088 */ 2089 struct wlan_lmac_if_sa_api_rx_ops { 2090 uint32_t (*sa_api_get_sa_supported)(struct wlan_objmgr_psoc *psoc); 2091 uint32_t (*sa_api_get_validate_sw)(struct wlan_objmgr_psoc *psoc); 2092 void (*sa_api_enable_sa)(struct wlan_objmgr_psoc *psoc, uint32_t value); 2093 uint32_t (*sa_api_get_sa_enable)(struct wlan_objmgr_psoc *psoc); 2094 void (*sa_api_peer_assoc_hanldler)(struct wlan_objmgr_pdev *pdev, 2095 struct wlan_objmgr_peer *peer, struct sa_rate_cap *); 2096 uint32_t (*sa_api_update_tx_feedback)(struct wlan_objmgr_pdev *pdev, 2097 struct wlan_objmgr_peer *peer, 2098 struct sa_tx_feedback *feedback); 2099 uint32_t (*sa_api_update_rx_feedback)(struct wlan_objmgr_pdev *pdev, 2100 struct wlan_objmgr_peer *peer, 2101 struct sa_rx_feedback *feedback); 2102 uint32_t (*sa_api_ucfg_set_param)(struct wlan_objmgr_pdev *pdev, 2103 char *val); 2104 uint32_t (*sa_api_ucfg_get_param)(struct wlan_objmgr_pdev *pdev, 2105 char *val); 2106 uint32_t (*sa_api_is_tx_feedback_enabled) 2107 (struct wlan_objmgr_pdev *pdev); 2108 uint32_t (*sa_api_is_rx_feedback_enabled) 2109 (struct wlan_objmgr_pdev *pdev); 2110 uint32_t (*sa_api_convert_rate_2g)(uint32_t rate); 2111 uint32_t (*sa_api_convert_rate_5g)(uint32_t rate); 2112 uint32_t (*sa_api_get_sa_mode)(struct wlan_objmgr_pdev *pdev); 2113 uint32_t (*sa_api_get_beacon_txantenna)(struct wlan_objmgr_pdev *pdev); 2114 uint32_t (*sa_api_cwm_action)(struct wlan_objmgr_pdev *pdev); 2115 }; 2116 #endif 2117 2118 #ifdef WLAN_CFR_ENABLE 2119 2120 /** 2121 * struct wlan_lmac_if_cfr_rx_ops - CFR south bound rx function pointers 2122 * @cfr_support_set: Set the CFR support based on FW advert 2123 * @cfr_info_send: Send cfr info to upper layers 2124 * @cfr_capture_count_support_set: Set the capture_count support based on FW 2125 * advert 2126 * @cfr_mo_marking_support_set: Set MO marking supported based on FW advert 2127 * @cfr_aoa_for_rcc_support_set: Set AoA for RCC support based on FW advert 2128 */ 2129 struct wlan_lmac_if_cfr_rx_ops { 2130 void (*cfr_support_set)(struct wlan_objmgr_psoc *psoc, uint32_t value); 2131 uint32_t (*cfr_info_send)(struct wlan_objmgr_pdev *pdev, void *head, 2132 size_t hlen, void *data, size_t dlen, 2133 void *tail, size_t tlen); 2134 QDF_STATUS (*cfr_capture_count_support_set)( 2135 struct wlan_objmgr_psoc *psoc, uint32_t value); 2136 QDF_STATUS (*cfr_mo_marking_support_set)(struct wlan_objmgr_psoc *psoc, 2137 uint32_t value); 2138 QDF_STATUS (*cfr_aoa_for_rcc_support_set)( 2139 struct wlan_objmgr_psoc *psoc, uint32_t value); 2140 }; 2141 #endif 2142 2143 #ifdef WLAN_CONV_SPECTRAL_ENABLE 2144 /** 2145 * struct wlan_lmac_if_sptrl_rx_ops - Spectral south bound Rx operations 2146 * 2147 * @sptrlro_get_pdev_target_handle: Get Spectral handle for pdev target 2148 * private data 2149 * @sptrlro_get_psoc_target_handle: Get Spectral handle for psoc target 2150 * private data 2151 * @sptrlro_vdev_get_chan_freq: 2152 * @sptrlro_vdev_get_chan_freq_seg2: Get secondary 80 center frequency 2153 * @sptrlro_vdev_get_ch_width: 2154 * @sptrlro_vdev_get_sec20chan_freq_mhz: 2155 * @sptrlro_spectral_is_feature_disabled_pdev: Check if spectral feature is 2156 * disabled for a given pdev 2157 * @sptrlro_spectral_is_feature_disabled_psoc: Check if spectral feature is 2158 * disabled for a given psoc 2159 */ 2160 struct wlan_lmac_if_sptrl_rx_ops { 2161 void * (*sptrlro_get_pdev_target_handle)(struct wlan_objmgr_pdev *pdev); 2162 void * (*sptrlro_get_psoc_target_handle)(struct wlan_objmgr_psoc *psoc); 2163 int16_t (*sptrlro_vdev_get_chan_freq)(struct wlan_objmgr_vdev *vdev); 2164 int16_t (*sptrlro_vdev_get_chan_freq_seg2) 2165 (struct wlan_objmgr_vdev *vdev); 2166 enum phy_ch_width (*sptrlro_vdev_get_ch_width)( 2167 struct wlan_objmgr_vdev *vdev); 2168 int (*sptrlro_vdev_get_sec20chan_freq_mhz)( 2169 struct wlan_objmgr_vdev *vdev, 2170 uint16_t *sec20chan_freq); 2171 bool (*sptrlro_spectral_is_feature_disabled_pdev)( 2172 struct wlan_objmgr_pdev *pdev); 2173 bool (*sptrlro_spectral_is_feature_disabled_psoc)( 2174 struct wlan_objmgr_psoc *psoc); 2175 }; 2176 #endif /* WLAN_CONV_SPECTRAL_ENABLE */ 2177 2178 #ifdef WLAN_IOT_SIM_SUPPORT 2179 struct iot_sim_cbacks; 2180 /** 2181 * struct wlan_lmac_if_iot_sim_rx_ops - iot_sim rx operations 2182 * @iot_sim_cmd_handler: Applies iot_sim rule in outgoing and incoming frames 2183 * @iot_sim_register_cb: callback registration with iot_sim 2184 */ 2185 struct wlan_lmac_if_iot_sim_rx_ops { 2186 QDF_STATUS (*iot_sim_cmd_handler)(struct wlan_objmgr_vdev *vdev, 2187 qdf_nbuf_t n_buf, 2188 struct beacon_tmpl_params *bcn_param, 2189 bool tx, 2190 struct mgmt_rx_event_params *param); 2191 QDF_STATUS (*iot_sim_register_cb)(struct wlan_objmgr_pdev *pdev, 2192 struct iot_sim_cbacks *cb); 2193 }; 2194 #endif 2195 2196 #ifdef WIFI_POS_CONVERGED 2197 /** 2198 * struct wlan_lmac_if_wifi_pos_rx_ops - structure of rx function 2199 * pointers for wifi_pos component 2200 * @oem_rsp_event_rx: callback for WMI_OEM_RESPONSE_EVENTID 2201 * @wifi_pos_ranging_peer_create_cb: Function pointer to handle PASN peer create 2202 * request 2203 * @wifi_pos_ranging_peer_create_rsp_cb: Function pointer to handle peer create 2204 * confirm event for PASN Peer. 2205 * @wifi_pos_ranging_peer_delete_cb: Ranging peer delete handle function 2206 * pointer. 2207 * @wifi_pos_vdev_delete_all_ranging_peers_rsp_cb: Callback to handle vdev 2208 * delete all ranging peers response 2209 * @wifi_pos_vdev_delete_all_ranging_peers_cb: Delete all ranging peers for 2210 * given vdev. This is called before vdev delete to cleanup all the ranging 2211 * peers of that vdev. 2212 */ 2213 struct wlan_lmac_if_wifi_pos_rx_ops { 2214 int (*oem_rsp_event_rx)(struct wlan_objmgr_psoc *psoc, 2215 struct oem_data_rsp *oem_rsp); 2216 QDF_STATUS (*wifi_pos_ranging_peer_create_cb) 2217 (struct wlan_objmgr_psoc *psoc, 2218 struct wlan_pasn_request *req, 2219 uint8_t vdev_id, 2220 uint8_t total_entries); 2221 QDF_STATUS (*wifi_pos_ranging_peer_create_rsp_cb) 2222 (struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, 2223 struct qdf_mac_addr *peer_mac, 2224 uint8_t status); 2225 QDF_STATUS (*wifi_pos_ranging_peer_delete_cb) 2226 (struct wlan_objmgr_psoc *psoc, 2227 struct wlan_pasn_request *info, 2228 uint8_t vdev_id, uint8_t num_peers); 2229 QDF_STATUS (*wifi_pos_vdev_delete_all_ranging_peers_rsp_cb) 2230 (struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); 2231 QDF_STATUS (*wifi_pos_vdev_delete_all_ranging_peers_cb) 2232 (struct wlan_objmgr_vdev *vdev); 2233 }; 2234 #endif 2235 2236 /** 2237 * struct wlan_lmac_if_dfs_rx_ops - Function pointers to call dfs functions 2238 * from lmac/offload. 2239 * @dfs_get_radars: Calls init radar table functions. 2240 * @dfs_process_phyerr: Process phyerr. 2241 * @dfs_destroy_object: Destroys the DFS object. 2242 * @dfs_radar_enable: Enables the radar. 2243 * @dfs_is_radar_enabled: Check if the radar is enabled. 2244 * @dfs_control: Used to process ioctls related to DFS. 2245 * @dfs_is_precac_timer_running: Check whether precac timer is running. 2246 * @dfs_agile_precac_start: Initiate Agile PreCAC run. 2247 * @dfs_set_agile_precac_state: Set agile precac state. 2248 * @dfs_reset_adfs_config: Reset agile dfs variables. 2249 * @dfs_dfs_ocac_complete_ind: Process offchan cac complete indication. 2250 * @dfs_start_precac_timer: Start precac timer. 2251 * @dfs_cancel_precac_timer: Cancel the precac timer. 2252 * @dfs_override_precac_timeout: Override the default precac timeout. 2253 * @dfs_set_precac_enable: Set precac enable flag. 2254 * @dfs_get_agile_precac_enable: Get the agile precac enable flag 2255 * @dfs_set_precac_intermediate_chan: Set intermediate channel for precac. 2256 * @dfs_get_precac_intermediate_chan: Get intermediate channel for precac. 2257 * @dfs_decide_precac_preferred_chan_for_freq: 2258 * Configure preferred channel during 2259 * precac. 2260 * @dfs_get_precac_chan_state_for_freq: 2261 * Get precac status for given channel. 2262 * @dfs_get_override_precac_timeout: Get precac timeout. 2263 * @dfs_set_current_channel_for_freq: 2264 * @dfs_process_radar_ind: Process radar found indication. 2265 * @dfs_dfs_cac_complete_ind: Process cac complete indication. 2266 * @dfs_stop: Clear dfs timers. 2267 * @dfs_reinit_timers: Reinitialize DFS timers. 2268 * @dfs_enable_stadfs: Enable/Disable STADFS capability. 2269 * @dfs_is_stadfs_enabled: Get STADFS capability value. 2270 * @dfs_process_phyerr_filter_offload:Process radar event. 2271 * @dfs_is_phyerr_filter_offload: Check whether phyerr filter is offload. 2272 * @dfs_action_on_status: Trigger the action to be taken based on 2273 * on host dfs status received from fw. 2274 * @dfs_override_status_timeout: Override the value of host dfs status 2275 * wait timeout. 2276 * @dfs_get_override_status_timeout: Get the value of host dfs status wait 2277 * timeout. 2278 * @dfs_reset_spoof_test: Checks if radar detection is enabled. 2279 * @dfs_is_disable_radar_marking_set: Check if dis_radar_marking param is set. 2280 * @dfs_set_nol_subchannel_marking: 2281 * @dfs_get_nol_subchannel_marking: 2282 * @dfs_set_bw_expand: API to set BW Expansion feature. 2283 * @dfs_get_bw_expand: API to get the status of BW Expansion 2284 * feature. 2285 * @dfs_set_dfs_puncture: API to set DFS puncturing feature. 2286 * @dfs_get_dfs_puncture: API to get the status of DFS puncturing 2287 * feature. 2288 * @dfs_set_bw_reduction: 2289 * @dfs_is_bw_reduction_needed: 2290 * @dfs_allow_hw_pulses: Set or unset dfs_allow_hw_pulses which 2291 * allow or disallow HW pulses. 2292 * @dfs_is_hw_pulses_allowed: Check if HW pulses are allowed or not. 2293 * @dfs_set_fw_adfs_support: Set the agile DFS FW support in DFS. 2294 * @dfs_reset_dfs_prevchan: Reset DFS previous channel structure. 2295 * @dfs_init_tmp_psoc_nol: Init temporary PSOC NOL structure. 2296 * @dfs_deinit_tmp_psoc_nol: Deinit temporary PSOC NOL structure. 2297 * @dfs_save_dfs_nol_in_psoc: Copy DFS NOL data to the PSOC copy. 2298 * @dfs_reinit_nol_from_psoc_copy: Reinit DFS NOL from the PSOC NOL copy. 2299 * @dfs_reinit_precac_lists: Reinit precac lists from other pdev. 2300 * @dfs_complete_deferred_tasks: Process mode switch completion in DFS. 2301 * @dfs_set_rcac_enable: 2302 * @dfs_get_rcac_enable: 2303 * @dfs_set_rcac_freq: 2304 * @dfs_get_rcac_freq: 2305 * @dfs_is_agile_rcac_enabled: Checks if Agile RCAC is enabled. 2306 * @dfs_agile_sm_deliver_evt: API to post events to DFS Agile SM. 2307 * @dfs_set_postnol_freq: API to set frequency to switch, post NOL. 2308 * @dfs_set_postnol_mode: API to set phymode to switch to, post NOL. 2309 * @dfs_set_postnol_cfreq2: API to set secondary center frequency to 2310 * switch to, post NOL. 2311 * @dfs_get_postnol_freq: API to get frequency to switch, post NOL. 2312 * @dfs_get_postnol_mode: API to get phymode to switch to, post NOL. 2313 * @dfs_get_postnol_cfreq2: API to get secondary center frequency to 2314 * switch to, post NOL. 2315 */ 2316 struct wlan_lmac_if_dfs_rx_ops { 2317 QDF_STATUS (*dfs_get_radars)(struct wlan_objmgr_pdev *pdev); 2318 QDF_STATUS (*dfs_process_phyerr)(struct wlan_objmgr_pdev *pdev, 2319 void *buf, 2320 uint16_t datalen, 2321 uint8_t r_rssi, 2322 uint8_t r_ext_rssi, 2323 uint32_t r_rs_tstamp, 2324 uint64_t r_fulltsf); 2325 QDF_STATUS (*dfs_destroy_object)(struct wlan_objmgr_pdev *pdev); 2326 QDF_STATUS (*dfs_radar_enable)( 2327 struct wlan_objmgr_pdev *pdev, 2328 int no_cac, 2329 uint32_t opmode, 2330 bool enable); 2331 void (*dfs_is_radar_enabled)(struct wlan_objmgr_pdev *pdev, 2332 int *ignore_dfs); 2333 QDF_STATUS (*dfs_control)(struct wlan_objmgr_pdev *pdev, 2334 u_int id, 2335 void *indata, 2336 uint32_t insize, 2337 void *outdata, 2338 uint32_t *outsize, 2339 int *error); 2340 QDF_STATUS (*dfs_is_precac_timer_running)(struct wlan_objmgr_pdev *pdev, 2341 bool *is_precac_timer_running 2342 ); 2343 QDF_STATUS (*dfs_agile_precac_start)(struct wlan_objmgr_pdev *pdev); 2344 QDF_STATUS (*dfs_set_agile_precac_state)(struct wlan_objmgr_pdev *pdev, 2345 int agile_precac_state); 2346 QDF_STATUS (*dfs_reset_adfs_config)(struct wlan_objmgr_psoc *psoc); 2347 QDF_STATUS 2348 (*dfs_dfs_ocac_complete_ind)(struct wlan_objmgr_pdev *pdev, 2349 struct vdev_adfs_complete_status *ocac_st); 2350 QDF_STATUS (*dfs_start_precac_timer)(struct wlan_objmgr_pdev *pdev); 2351 QDF_STATUS (*dfs_cancel_precac_timer)(struct wlan_objmgr_pdev *pdev); 2352 QDF_STATUS (*dfs_override_precac_timeout)( 2353 struct wlan_objmgr_pdev *pdev, 2354 int precac_timeout); 2355 QDF_STATUS (*dfs_set_precac_enable)(struct wlan_objmgr_pdev *pdev, 2356 uint32_t value); 2357 QDF_STATUS (*dfs_get_agile_precac_enable)(struct wlan_objmgr_pdev *pdev, 2358 bool *buff); 2359 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT 2360 QDF_STATUS (*dfs_set_precac_intermediate_chan)(struct wlan_objmgr_pdev *pdev, 2361 uint32_t value); 2362 QDF_STATUS (*dfs_get_precac_intermediate_chan)(struct wlan_objmgr_pdev *pdev, 2363 int *buff); 2364 #ifdef CONFIG_CHAN_FREQ_API 2365 bool (*dfs_decide_precac_preferred_chan_for_freq)(struct 2366 wlan_objmgr_pdev *pdev, 2367 uint16_t *pref_chan_freq, 2368 enum wlan_phymode mode); 2369 2370 enum precac_chan_state (*dfs_get_precac_chan_state_for_freq)(struct 2371 wlan_objmgr_pdev *pdev, 2372 uint16_t pcac_freq); 2373 #endif 2374 #endif 2375 QDF_STATUS (*dfs_get_override_precac_timeout)( 2376 struct wlan_objmgr_pdev *pdev, 2377 int *precac_timeout); 2378 #ifdef CONFIG_CHAN_FREQ_API 2379 QDF_STATUS 2380 (*dfs_set_current_channel_for_freq)(struct wlan_objmgr_pdev *pdev, 2381 uint16_t ic_freq, 2382 uint64_t ic_flags, 2383 uint16_t ic_flagext, 2384 uint8_t ic_ieee, 2385 uint8_t ic_vhtop_ch_freq_seg1, 2386 uint8_t ic_vhtop_ch_freq_seg2, 2387 uint16_t dfs_ch_mhz_freq_seg1, 2388 uint16_t dfs_ch_mhz_freq_seg2, 2389 uint16_t dfs_ch_punc_pattern, 2390 bool *is_channel_updated); 2391 #endif 2392 #ifdef DFS_COMPONENT_ENABLE 2393 QDF_STATUS (*dfs_process_radar_ind)(struct wlan_objmgr_pdev *pdev, 2394 struct radar_found_info *radar_found); 2395 QDF_STATUS (*dfs_dfs_cac_complete_ind)(struct wlan_objmgr_pdev *pdev, 2396 uint32_t vdev_id); 2397 #endif 2398 QDF_STATUS (*dfs_stop)(struct wlan_objmgr_pdev *pdev); 2399 QDF_STATUS (*dfs_reinit_timers)(struct wlan_objmgr_pdev *pdev); 2400 void (*dfs_enable_stadfs)(struct wlan_objmgr_pdev *pdev, bool val); 2401 bool (*dfs_is_stadfs_enabled)(struct wlan_objmgr_pdev *pdev); 2402 QDF_STATUS (*dfs_process_phyerr_filter_offload)( 2403 struct wlan_objmgr_pdev *pdev, 2404 struct radar_event_info *wlan_radar_info); 2405 QDF_STATUS (*dfs_is_phyerr_filter_offload)( 2406 struct wlan_objmgr_psoc *psoc, 2407 bool *is_phyerr_filter_offload); 2408 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 2409 QDF_STATUS (*dfs_action_on_status)(struct wlan_objmgr_pdev *pdev, 2410 u_int32_t *dfs_status_check); 2411 #endif 2412 QDF_STATUS (*dfs_override_status_timeout)( 2413 struct wlan_objmgr_pdev *pdev, 2414 int status_timeout); 2415 QDF_STATUS (*dfs_get_override_status_timeout)( 2416 struct wlan_objmgr_pdev *pdev, 2417 int *status_timeout); 2418 QDF_STATUS (*dfs_reset_spoof_test)(struct wlan_objmgr_pdev *pdev); 2419 QDF_STATUS (*dfs_is_disable_radar_marking_set)(struct wlan_objmgr_pdev 2420 *pdev, 2421 bool *disable_radar_marking); 2422 QDF_STATUS (*dfs_set_nol_subchannel_marking)( 2423 struct wlan_objmgr_pdev *pdev, 2424 bool value); 2425 QDF_STATUS (*dfs_get_nol_subchannel_marking)( 2426 struct wlan_objmgr_pdev *pdev, 2427 bool *value); 2428 QDF_STATUS (*dfs_set_bw_expand)( 2429 struct wlan_objmgr_pdev *pdev, 2430 bool value); 2431 QDF_STATUS (*dfs_get_bw_expand)( 2432 struct wlan_objmgr_pdev *pdev, 2433 bool *value); 2434 #ifdef QCA_DFS_BW_PUNCTURE 2435 QDF_STATUS (*dfs_set_dfs_puncture)( 2436 struct wlan_objmgr_pdev *pdev, 2437 bool value); 2438 QDF_STATUS (*dfs_get_dfs_puncture)( 2439 struct wlan_objmgr_pdev *pdev, 2440 bool *value); 2441 #endif 2442 QDF_STATUS (*dfs_set_bw_reduction)(struct wlan_objmgr_pdev *pdev, 2443 bool value); 2444 QDF_STATUS (*dfs_is_bw_reduction_needed)(struct wlan_objmgr_pdev *pdev, 2445 bool *bw_reduce); 2446 void (*dfs_allow_hw_pulses)(struct wlan_objmgr_pdev *pdev, 2447 bool allow_hw_pulses); 2448 bool (*dfs_is_hw_pulses_allowed)(struct wlan_objmgr_pdev *pdev); 2449 void (*dfs_set_fw_adfs_support)(struct wlan_objmgr_pdev *pdev, 2450 bool fw_adfs_support_160, 2451 bool fw_adfs_support_non_160, 2452 bool fw_adfs_support_320); 2453 void (*dfs_reset_dfs_prevchan)(struct wlan_objmgr_pdev *pdev); 2454 void (*dfs_init_tmp_psoc_nol)(struct wlan_objmgr_pdev *pdev, 2455 uint8_t num_radios); 2456 void (*dfs_deinit_tmp_psoc_nol)(struct wlan_objmgr_pdev *pdev); 2457 void (*dfs_save_dfs_nol_in_psoc)(struct wlan_objmgr_pdev *pdev, 2458 uint8_t pdev_id); 2459 void (*dfs_reinit_nol_from_psoc_copy)(struct wlan_objmgr_pdev *pdev, 2460 uint8_t pdev_id, 2461 uint16_t low_5ghz_freq, 2462 uint16_t high_5ghz_freq); 2463 void (*dfs_reinit_precac_lists)(struct wlan_objmgr_pdev *src_pdev, 2464 struct wlan_objmgr_pdev *dest_pdev, 2465 uint16_t low_5g_freq, 2466 uint16_t high_5g_freq); 2467 void (*dfs_complete_deferred_tasks)(struct wlan_objmgr_pdev *pdev); 2468 #ifdef QCA_SUPPORT_ADFS_RCAC 2469 QDF_STATUS (*dfs_set_rcac_enable)(struct wlan_objmgr_pdev *pdev, 2470 bool rcac_en); 2471 QDF_STATUS (*dfs_get_rcac_enable)(struct wlan_objmgr_pdev *pdev, 2472 bool *rcac_en); 2473 QDF_STATUS (*dfs_set_rcac_freq)(struct wlan_objmgr_pdev *pdev, 2474 qdf_freq_t rcac_freq); 2475 QDF_STATUS (*dfs_get_rcac_freq)(struct wlan_objmgr_pdev *pdev, 2476 qdf_freq_t *rcac_freq); 2477 bool (*dfs_is_agile_rcac_enabled)(struct wlan_objmgr_pdev *pdev); 2478 #endif 2479 #ifdef QCA_SUPPORT_AGILE_DFS 2480 void (*dfs_agile_sm_deliver_evt)(struct wlan_objmgr_pdev *pdev, 2481 enum dfs_agile_sm_evt event); 2482 #endif 2483 #ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL 2484 QDF_STATUS (*dfs_set_postnol_freq)(struct wlan_objmgr_pdev *pdev, 2485 qdf_freq_t postnol_freq); 2486 QDF_STATUS (*dfs_set_postnol_mode)(struct wlan_objmgr_pdev *pdev, 2487 uint16_t postnol_mode); 2488 QDF_STATUS (*dfs_set_postnol_cfreq2)(struct wlan_objmgr_pdev *pdev, 2489 qdf_freq_t postnol_cfreq2); 2490 QDF_STATUS (*dfs_get_postnol_freq)(struct wlan_objmgr_pdev *pdev, 2491 qdf_freq_t *postnol_freq); 2492 QDF_STATUS (*dfs_get_postnol_mode)(struct wlan_objmgr_pdev *pdev, 2493 uint8_t *postnol_mode); 2494 QDF_STATUS (*dfs_get_postnol_cfreq2)(struct wlan_objmgr_pdev *pdev, 2495 qdf_freq_t *postnol_cfreq2); 2496 #endif 2497 }; 2498 2499 /** 2500 * struct wlan_lmac_if_mlme_rx_ops: Function pointer to call MLME functions 2501 * @vdev_mgr_start_response: function to handle start response 2502 * @vdev_mgr_stop_response: function to handle stop response 2503 * @vdev_mgr_delete_response: function to handle delete response 2504 * @vdev_mgr_offload_bcn_tx_status_event_handle: function to handle offload 2505 * beacon tx 2506 * @vdev_mgr_tbttoffset_update_handle: function to handle tbtt offset event 2507 * @vdev_mgr_peer_delete_all_response: function to handle vdev delete all peer 2508 * event 2509 * @psoc_get_wakelock_info: function to get wakelock info 2510 * @psoc_get_vdev_response_timer_info: function to get vdev response timer 2511 * structure for a specific vdev id 2512 * @vdev_mgr_multi_vdev_restart_resp: function to handle mvr response 2513 * @vdev_mgr_set_mac_addr_response: Callback to get response for set MAC address 2514 * command 2515 * @vdev_mgr_set_max_channel_switch_time: Set max channel switch time for the 2516 * given vdev list. 2517 * @vdev_mgr_quiet_offload: handle quiet status for given link mac addr or 2518 * mld addr and link id. 2519 */ 2520 struct wlan_lmac_if_mlme_rx_ops { 2521 QDF_STATUS (*vdev_mgr_start_response)( 2522 struct wlan_objmgr_psoc *psoc, 2523 struct vdev_start_response *rsp); 2524 QDF_STATUS (*vdev_mgr_stop_response)( 2525 struct wlan_objmgr_psoc *psoc, 2526 struct vdev_stop_response *rsp); 2527 QDF_STATUS (*vdev_mgr_delete_response)( 2528 struct wlan_objmgr_psoc *psoc, 2529 struct vdev_delete_response *rsp); 2530 QDF_STATUS (*vdev_mgr_offload_bcn_tx_status_event_handle)( 2531 uint32_t vdev_id, 2532 uint32_t tx_status); 2533 QDF_STATUS (*vdev_mgr_tbttoffset_update_handle)( 2534 uint32_t num_vdevs, 2535 bool is_ext); 2536 QDF_STATUS (*vdev_mgr_peer_delete_all_response)( 2537 struct wlan_objmgr_psoc *psoc, 2538 struct peer_delete_all_response *rsp); 2539 QDF_STATUS (*vdev_mgr_multi_vdev_restart_resp)( 2540 struct wlan_objmgr_psoc *psoc, 2541 struct multi_vdev_restart_resp *rsp); 2542 #ifdef FEATURE_VDEV_OPS_WAKELOCK 2543 struct psoc_mlme_wakelock *(*psoc_get_wakelock_info)( 2544 struct wlan_objmgr_psoc *psoc); 2545 #endif 2546 struct vdev_response_timer *(*psoc_get_vdev_response_timer_info)( 2547 struct wlan_objmgr_psoc *psoc, 2548 uint8_t vdev_id); 2549 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE 2550 void (*vdev_mgr_set_mac_addr_response)(uint8_t vdev_id, uint8_t status); 2551 #endif 2552 void (*vdev_mgr_set_max_channel_switch_time) 2553 (struct wlan_objmgr_psoc *psoc, 2554 uint32_t *vdev_ids, uint32_t num_vdevs); 2555 #ifdef WLAN_FEATURE_11BE_MLO 2556 QDF_STATUS (*vdev_mgr_quiet_offload)( 2557 struct wlan_objmgr_psoc *psoc, 2558 struct vdev_sta_quiet_event *quiet_event); 2559 #endif 2560 }; 2561 2562 #ifdef WLAN_SUPPORT_GREEN_AP 2563 struct wlan_lmac_if_green_ap_rx_ops { 2564 bool (*is_ps_enabled)(struct wlan_objmgr_pdev *pdev); 2565 bool (*is_dbg_print_enabled)(struct wlan_objmgr_pdev *pdev); 2566 QDF_STATUS (*ps_get)(struct wlan_objmgr_pdev *pdev, uint8_t *value); 2567 QDF_STATUS (*ps_set)(struct wlan_objmgr_pdev *pdev, uint8_t value); 2568 void (*suspend_handle)(struct wlan_objmgr_pdev *pdev); 2569 #if defined(WLAN_SUPPORT_GAP_LL_PS_MODE) 2570 QDF_STATUS (*ll_ps_cb)(struct wlan_green_ap_ll_ps_event_param 2571 *ll_ps_event_param); 2572 #endif 2573 }; 2574 #endif 2575 2576 /** 2577 * struct wlan_lmac_if_rx_ops - south bound rx function pointers 2578 * @mgmt_txrx_rx_ops: mgmt txrx rx ops 2579 * @scan: scan rx ops 2580 * @son_rx_ops: son rx ops 2581 * @p2p: p2p rx ops 2582 * @iot_sim_rx_ops: iot simulation rx ops 2583 * @atf_rx_ops: air time fairness rx ops 2584 * @cp_stats_rx_ops: cp stats rx ops 2585 * @dcs_rx_ops: dcs rx ops 2586 * @sa_api_rx_ops: sa api rx ops 2587 * @cfr_rx_ops: cfr rx ops 2588 * @sptrl_rx_ops: spectral rx ops 2589 * @crypto_rx_ops: crypto rx ops 2590 * @wifi_pos_rx_ops: wifi positioning rx ops 2591 * @reg_rx_ops: regulatory rx ops 2592 * @dfs_rx_ops: dfs rx ops 2593 * @tdls_rx_ops: tdls rx ops 2594 * @fd_rx_ops: fils rx ops 2595 * @mops: mlme rx ops 2596 * @green_ap_rx_ops: green ap rx ops 2597 * @ftm_rx_ops: ftm rx ops 2598 * @mlo_rx_ops: mlo rx ops 2599 * @twt_rx_ops: twt rx ops 2600 * @dbam_rx_ops: dbam rx ops 2601 * 2602 * Callback function tabled to be registered with lmac/wmi. 2603 * lmac will use the functional table to send events/frames to umac 2604 */ 2605 struct wlan_lmac_if_rx_ops { 2606 /* 2607 * Components to declare function pointers required by the module 2608 * in component specific structure. 2609 * The component specific ops structure can be declared in this file 2610 * only 2611 */ 2612 struct wlan_lmac_if_mgmt_txrx_rx_ops mgmt_txrx_rx_ops; 2613 struct wlan_lmac_if_scan_rx_ops scan; 2614 struct wlan_lmac_if_son_rx_ops son_rx_ops; 2615 2616 #ifdef CONVERGED_P2P_ENABLE 2617 struct wlan_lmac_if_p2p_rx_ops p2p; 2618 #endif 2619 #ifdef WLAN_IOT_SIM_SUPPORT 2620 struct wlan_lmac_if_iot_sim_rx_ops iot_sim_rx_ops; 2621 #endif 2622 #ifdef WLAN_ATF_ENABLE 2623 struct wlan_lmac_if_atf_rx_ops atf_rx_ops; 2624 #endif 2625 #ifdef QCA_SUPPORT_CP_STATS 2626 struct wlan_lmac_if_cp_stats_rx_ops cp_stats_rx_ops; 2627 #endif 2628 #ifdef DCS_INTERFERENCE_DETECTION 2629 struct wlan_target_if_dcs_rx_ops dcs_rx_ops; 2630 #endif 2631 #ifdef WLAN_SA_API_ENABLE 2632 struct wlan_lmac_if_sa_api_rx_ops sa_api_rx_ops; 2633 #endif 2634 2635 #ifdef WLAN_CFR_ENABLE 2636 struct wlan_lmac_if_cfr_rx_ops cfr_rx_ops; 2637 #endif 2638 2639 #ifdef WLAN_CONV_SPECTRAL_ENABLE 2640 struct wlan_lmac_if_sptrl_rx_ops sptrl_rx_ops; 2641 #endif 2642 2643 struct wlan_lmac_if_crypto_rx_ops crypto_rx_ops; 2644 #ifdef WIFI_POS_CONVERGED 2645 struct wlan_lmac_if_wifi_pos_rx_ops wifi_pos_rx_ops; 2646 #endif 2647 struct wlan_lmac_if_reg_rx_ops reg_rx_ops; 2648 struct wlan_lmac_if_dfs_rx_ops dfs_rx_ops; 2649 #ifdef FEATURE_WLAN_TDLS 2650 struct wlan_lmac_if_tdls_rx_ops tdls_rx_ops; 2651 #endif 2652 2653 #ifdef WLAN_SUPPORT_FILS 2654 struct wlan_lmac_if_fd_rx_ops fd_rx_ops; 2655 #endif 2656 2657 struct wlan_lmac_if_mlme_rx_ops mops; 2658 2659 #ifdef WLAN_SUPPORT_GREEN_AP 2660 struct wlan_lmac_if_green_ap_rx_ops green_ap_rx_ops; 2661 #endif 2662 2663 struct wlan_lmac_if_ftm_rx_ops ftm_rx_ops; 2664 #ifdef WLAN_FEATURE_11BE_MLO 2665 struct wlan_lmac_if_mlo_rx_ops mlo_rx_ops; 2666 #endif 2667 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED) 2668 struct wlan_lmac_if_twt_rx_ops twt_rx_ops; 2669 #endif 2670 #ifdef WLAN_FEATURE_DBAM_CONFIG 2671 struct wlan_lmac_if_dbam_rx_ops dbam_rx_ops; 2672 #endif 2673 }; 2674 2675 /* Function pointer to call legacy tx_ops registration in OL/WMA. 2676 */ 2677 extern QDF_STATUS (*wlan_lmac_if_umac_tx_ops_register) 2678 (struct wlan_lmac_if_tx_ops *tx_ops); 2679 2680 /* Function pointer to call legacy crypto rxpn registration in OL */ 2681 extern QDF_STATUS (*wlan_lmac_if_umac_crypto_rxpn_ops_register) 2682 (struct wlan_lmac_if_rx_ops *rx_ops); 2683 #ifdef WLAN_FEATURE_SON 2684 /** 2685 * wlan_lmac_if_son_mod_register_rx_ops() - SON Module lmac_if rx_ops 2686 * registration API 2687 * @rx_ops: lmac_if rx_ops function pointer table 2688 * 2689 * Function to register SON rx_ops with lmac_if. 2690 * 2691 * Return: void 2692 */ 2693 void wlan_lmac_if_son_mod_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops); 2694 #endif 2695 2696 #endif /* _WLAN_LMAC_IF_DEF_H_ */ 2697