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