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