1 /* 2 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 #include "qdf_mem.h" 21 #include <qdf_module.h> 22 #include "wlan_lmac_if_def.h" 23 #include "wlan_lmac_if_api.h" 24 #include "wlan_mgmt_txrx_tgt_api.h" 25 #include "wlan_scan_tgt_api.h" 26 #include <wlan_reg_services_api.h> 27 #include <wlan_reg_ucfg_api.h> 28 #ifdef WLAN_ATF_ENABLE 29 #include "wlan_atf_tgt_api.h" 30 #endif 31 #ifdef WLAN_SA_API_ENABLE 32 #include "wlan_sa_api_tgt_api.h" 33 #endif 34 #ifdef WIFI_POS_CONVERGED 35 #include "target_if_wifi_pos.h" 36 #include "target_if_wifi_pos_rx_ops.h" 37 #endif /* WIFI_POS_CONVERGED */ 38 #include "wlan_reg_tgt_api.h" 39 #ifdef CONVERGED_P2P_ENABLE 40 #include "wlan_p2p_tgt_api.h" 41 #endif 42 #ifdef FEATURE_WLAN_TDLS 43 #include "wlan_tdls_tgt_api.h" 44 #endif 45 46 #include "wlan_crypto_global_api.h" 47 #ifdef DFS_COMPONENT_ENABLE 48 #include <wlan_dfs_tgt_api.h> 49 #include <wlan_objmgr_vdev_obj.h> 50 #include <wlan_dfs_utils_api.h> 51 #if defined(QCA_SUPPORT_DFS_CHAN_POSTNOL) || defined(QCA_DFS_BW_EXPAND) 52 #include <dfs_postnol_ucfg.h> 53 #endif 54 #endif 55 56 #ifdef WLAN_SUPPORT_GREEN_AP 57 #include <wlan_green_ap_api.h> 58 #include <wlan_green_ap_ucfg_api.h> 59 #endif 60 #include <wlan_ftm_ucfg_api.h> 61 62 #ifdef WLAN_SUPPORT_FILS 63 #include <wlan_fd_tgt_api.h> 64 #endif 65 66 #ifdef QCA_SUPPORT_CP_STATS 67 #include <wlan_cp_stats_tgt_api.h> 68 #include <wlan_cp_stats_utils_api.h> 69 #endif /* QCA_SUPPORT_CP_STATS */ 70 #include <wlan_vdev_mgr_tgt_if_rx_api.h> 71 72 #ifdef WLAN_CFR_ENABLE 73 #include "wlan_cfr_tgt_api.h" 74 #endif 75 76 #ifdef WIFI_POS_CONVERGED 77 #include "wifi_pos_api.h" 78 #endif 79 80 #include "wlan_mgmt_txrx_rx_reo_tgt_api.h" 81 82 #ifdef WLAN_FEATURE_11BE_MLO 83 #include "wlan_mlo_mgr_cmn.h" 84 #include <wlan_mlo_t2lm.h> 85 #endif 86 87 #include <wlan_twt_tgt_if_rx_api.h> 88 #ifdef WLAN_FEATURE_MCC_QUOTA 89 #include <wlan_p2p_mcc_quota_tgt_api.h> 90 #endif 91 92 #ifdef WLAN_FEATURE_DBAM_CONFIG 93 #include "target_if_coex.h" 94 #endif 95 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT) 96 #include <wifi_pos_pasn_api.h> 97 #endif 98 99 #include "target_if.h" 100 101 /* Function pointer for OL/WMA specific UMAC tx_ops 102 * registration. 103 */ 104 QDF_STATUS (*wlan_lmac_if_umac_tx_ops_register) 105 (struct wlan_lmac_if_tx_ops *tx_ops); 106 qdf_export_symbol(wlan_lmac_if_umac_tx_ops_register); 107 108 /* Function pointer to call legacy crypto rxpn registration in OL */ 109 QDF_STATUS (*wlan_lmac_if_umac_crypto_rxpn_ops_register) 110 (struct wlan_lmac_if_rx_ops *rx_ops); 111 qdf_export_symbol(wlan_lmac_if_umac_crypto_rxpn_ops_register); 112 113 static void 114 tgt_vdev_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 115 { 116 tgt_vdev_mgr_register_rx_ops(rx_ops); 117 } 118 119 #ifdef QCA_SUPPORT_CP_STATS 120 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED) 121 /** 122 * wlan_target_if_cp_stats_rx_ops_register() - register cp_stats rx ops 123 * @rx_ops: lmac rx_ops 124 * 125 * Return: none 126 */ 127 static void 128 wlan_target_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 129 { 130 rx_ops->cp_stats_rx_ops.twt_get_session_param_resp = 131 tgt_cp_stats_twt_get_session_evt_handler; 132 } 133 #else 134 static void 135 wlan_target_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 136 { 137 } 138 #endif 139 140 /** 141 * wlan_lmac_if_cp_stats_rx_ops_register() - API to register cp stats Rx Ops 142 * @rx_ops: pointer to lmac rx ops 143 * 144 * This API will be used to register function pointers for FW events 145 * 146 * Return: void 147 */ 148 static void 149 wlan_lmac_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 150 { 151 wlan_target_if_cp_stats_rx_ops_register(rx_ops); 152 tgt_cp_stats_register_rx_ops(rx_ops); 153 } 154 #else 155 static void 156 wlan_lmac_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 157 { 158 } 159 #endif /* QCA_SUPPORT_CP_STATS */ 160 161 #ifdef DCS_INTERFERENCE_DETECTION 162 /** 163 * wlan_target_if_dcs_rx_ops_register() - API to register dcs Rx Ops 164 * @rx_ops: pointer to lmac rx ops 165 * 166 * This API will be used to register function pointers for FW events 167 * 168 * Return: void 169 */ 170 static void 171 wlan_target_if_dcs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 172 { 173 rx_ops->dcs_rx_ops.process_dcs_event = tgt_dcs_process_event; 174 } 175 #else 176 static void 177 wlan_target_if_dcs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 178 { 179 } 180 #endif /* DCS_INTERFERENCE_DETECTION */ 181 182 #ifdef WLAN_ATF_ENABLE 183 /** 184 * wlan_lmac_if_atf_rx_ops_register() - Function to register ATF RX ops. 185 * @rx_ops: Pointer to wlan_lmac_if_rx_ops 186 */ 187 static void 188 wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 189 { 190 struct wlan_lmac_if_atf_rx_ops *atf_rx_ops = &rx_ops->atf_rx_ops; 191 192 /* ATF rx ops */ 193 atf_rx_ops->atf_get_fmcap = tgt_atf_get_fmcap; 194 atf_rx_ops->atf_get_mode = tgt_atf_get_mode; 195 atf_rx_ops->atf_get_msdu_desc = tgt_atf_get_msdu_desc; 196 atf_rx_ops->atf_get_max_vdevs = tgt_atf_get_max_vdevs; 197 atf_rx_ops->atf_get_peers = tgt_atf_get_peers; 198 atf_rx_ops->atf_get_tput_based = tgt_atf_get_tput_based; 199 atf_rx_ops->atf_get_logging = tgt_atf_get_logging; 200 atf_rx_ops->atf_get_ssidgroup = tgt_atf_get_ssidgroup; 201 atf_rx_ops->atf_get_vdev_ac_blk_cnt = tgt_atf_get_vdev_ac_blk_cnt; 202 atf_rx_ops->atf_get_peer_blk_txbitmap = tgt_atf_get_peer_blk_txbitmap; 203 atf_rx_ops->atf_get_vdev_blk_txtraffic = tgt_atf_get_vdev_blk_txtraffic; 204 atf_rx_ops->atf_get_sched = tgt_atf_get_sched; 205 atf_rx_ops->atf_get_peer_stats = tgt_atf_get_peer_stats; 206 atf_rx_ops->atf_get_token_allocated = tgt_atf_get_token_allocated; 207 atf_rx_ops->atf_get_token_utilized = tgt_atf_get_token_utilized; 208 209 atf_rx_ops->atf_set_sched = tgt_atf_set_sched; 210 atf_rx_ops->atf_set_fmcap = tgt_atf_set_fmcap; 211 atf_rx_ops->atf_set_msdu_desc = tgt_atf_set_msdu_desc; 212 atf_rx_ops->atf_set_max_vdevs = tgt_atf_set_max_vdevs; 213 atf_rx_ops->atf_set_peers = tgt_atf_set_peers; 214 atf_rx_ops->atf_set_peer_stats = tgt_atf_set_peer_stats; 215 atf_rx_ops->atf_set_vdev_blk_txtraffic = tgt_atf_set_vdev_blk_txtraffic; 216 atf_rx_ops->atf_peer_blk_txtraffic = tgt_atf_peer_blk_txtraffic; 217 atf_rx_ops->atf_peer_unblk_txtraffic = tgt_atf_peer_unblk_txtraffic; 218 atf_rx_ops->atf_set_token_allocated = tgt_atf_set_token_allocated; 219 atf_rx_ops->atf_set_token_utilized = tgt_atf_set_token_utilized; 220 atf_rx_ops->atf_process_tx_ppdu_stats = tgt_atf_process_tx_ppdu_stats; 221 atf_rx_ops->atf_process_rx_ppdu_stats = tgt_atf_process_rx_ppdu_stats; 222 atf_rx_ops->atf_is_stats_enabled = tgt_atf_is_stats_enabled; 223 } 224 #else 225 static void 226 wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 227 { 228 } 229 #endif 230 231 #ifdef WLAN_SUPPORT_FILS 232 static void 233 wlan_lmac_if_fd_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 234 { 235 struct wlan_lmac_if_fd_rx_ops *fd_rx_ops = &rx_ops->fd_rx_ops; 236 237 fd_rx_ops->fd_is_fils_enable = tgt_fd_is_fils_enable; 238 fd_rx_ops->fd_alloc = tgt_fd_alloc; 239 fd_rx_ops->fd_stop = tgt_fd_stop; 240 fd_rx_ops->fd_free = tgt_fd_free; 241 fd_rx_ops->fd_get_valid_fd_period = tgt_fd_get_valid_fd_period; 242 fd_rx_ops->fd_swfda_handler = tgt_fd_swfda_handler; 243 fd_rx_ops->fd_offload = tgt_fd_offload; 244 fd_rx_ops->fd_tmpl_update = tgt_fd_tmpl_update; 245 } 246 #else 247 static void 248 wlan_lmac_if_fd_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 249 { 250 } 251 #endif 252 253 #ifdef WLAN_SA_API_ENABLE 254 /** 255 * wlan_lmac_if_sa_api_rx_ops_register() - Function to register SA_API RX ops. 256 * @rx_ops: Pointer to wlan_lmac_if_rx_ops 257 */ 258 static void 259 wlan_lmac_if_sa_api_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 260 { 261 struct wlan_lmac_if_sa_api_rx_ops *sa_api_rx_ops = &rx_ops->sa_api_rx_ops; 262 263 /* SA API rx ops */ 264 sa_api_rx_ops->sa_api_get_sa_supported = tgt_sa_api_get_sa_supported; 265 sa_api_rx_ops->sa_api_get_validate_sw = tgt_sa_api_get_validate_sw; 266 sa_api_rx_ops->sa_api_enable_sa = tgt_sa_api_enable_sa; 267 sa_api_rx_ops->sa_api_get_sa_enable = tgt_sa_api_get_sa_enable; 268 269 sa_api_rx_ops->sa_api_peer_assoc_hanldler = tgt_sa_api_peer_assoc_hanldler; 270 sa_api_rx_ops->sa_api_update_tx_feedback = tgt_sa_api_update_tx_feedback; 271 sa_api_rx_ops->sa_api_update_rx_feedback = tgt_sa_api_update_rx_feedback; 272 273 sa_api_rx_ops->sa_api_ucfg_set_param = tgt_sa_api_ucfg_set_param; 274 sa_api_rx_ops->sa_api_ucfg_get_param = tgt_sa_api_ucfg_get_param; 275 276 sa_api_rx_ops->sa_api_is_tx_feedback_enabled = tgt_sa_api_is_tx_feedback_enabled; 277 sa_api_rx_ops->sa_api_is_rx_feedback_enabled = tgt_sa_api_is_rx_feedback_enabled; 278 279 sa_api_rx_ops->sa_api_convert_rate_2g = tgt_sa_api_convert_rate_2g; 280 sa_api_rx_ops->sa_api_convert_rate_5g = tgt_sa_api_convert_rate_5g; 281 sa_api_rx_ops->sa_api_get_sa_mode = tgt_sa_api_get_sa_mode; 282 283 sa_api_rx_ops->sa_api_get_beacon_txantenna = tgt_sa_api_get_beacon_txantenna; 284 sa_api_rx_ops->sa_api_cwm_action = tgt_sa_api_cwm_action; 285 } 286 #else 287 static void 288 wlan_lmac_if_sa_api_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 289 { 290 } 291 #endif 292 293 #ifdef WLAN_CFR_ENABLE 294 /** 295 * wlan_lmac_if_cfr_rx_ops_register() - Function to register CFR RX ops 296 * @rx_ops: Pointer to wlan_lmac_if_rx_ops 297 */ 298 static void 299 wlan_lmac_if_cfr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 300 { 301 struct wlan_lmac_if_cfr_rx_ops *cfr_rx_ops = &rx_ops->cfr_rx_ops; 302 303 /* CFR rx ops */ 304 cfr_rx_ops->cfr_support_set = tgt_cfr_support_set; 305 cfr_rx_ops->cfr_info_send = tgt_cfr_info_send; 306 cfr_rx_ops->cfr_capture_count_support_set = 307 tgt_cfr_capture_count_support_set; 308 cfr_rx_ops->cfr_mo_marking_support_set = tgt_cfr_mo_marking_support_set; 309 cfr_rx_ops->cfr_aoa_for_rcc_support_set = 310 tgt_cfr_aoa_for_rcc_support_set; 311 } 312 #else 313 static void 314 wlan_lmac_if_cfr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 315 { 316 } 317 #endif 318 319 static void 320 wlan_lmac_if_crypto_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 321 { 322 wlan_crypto_register_crypto_rx_ops(&rx_ops->crypto_rx_ops); 323 if (wlan_lmac_if_umac_crypto_rxpn_ops_register) 324 wlan_lmac_if_umac_crypto_rxpn_ops_register(rx_ops); 325 } 326 327 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT) 328 static void 329 wlan_lmac_if_wifi_pos_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) 330 { 331 struct wlan_lmac_if_wifi_pos_rx_ops *wifi_pos_rx_ops = 332 &rx_ops->wifi_pos_rx_ops; 333 334 wifi_pos_rx_ops->wifi_pos_ranging_peer_create_cb = 335 wifi_pos_handle_ranging_peer_create; 336 wifi_pos_rx_ops->wifi_pos_ranging_peer_create_rsp_cb = 337 wifi_pos_handle_ranging_peer_create_rsp; 338 wifi_pos_rx_ops->wifi_pos_ranging_peer_delete_cb = 339 wifi_pos_handle_ranging_peer_delete; 340 wifi_pos_rx_ops->wifi_pos_vdev_delete_all_ranging_peers_rsp_cb = 341 wifi_pos_vdev_delete_all_ranging_peers_rsp; 342 } 343 #else 344 static inline void 345 wlan_lmac_if_wifi_pos_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) 346 {} 347 #endif 348 349 #ifdef WIFI_POS_CONVERGED 350 static void 351 wlan_lmac_if_umac_rx_ops_register_wifi_pos(struct wlan_lmac_if_rx_ops *rx_ops) 352 { 353 wifi_pos_register_rx_ops(rx_ops); 354 wlan_lmac_if_wifi_pos_rx_ops(rx_ops); 355 } 356 #else 357 static void wlan_lmac_if_umac_rx_ops_register_wifi_pos( 358 struct wlan_lmac_if_rx_ops *rx_ops) 359 { 360 } 361 #endif /* WIFI_POS_CONVERGED */ 362 363 #ifdef CONFIG_BAND_6GHZ 364 static void wlan_lmac_if_register_master_list_ext_handler( 365 struct wlan_lmac_if_rx_ops *rx_ops) 366 { 367 rx_ops->reg_rx_ops.master_list_ext_handler = 368 tgt_reg_process_master_chan_list_ext; 369 } 370 371 static void wlan_lmac_if_register_super_chan_display( 372 struct wlan_lmac_if_rx_ops *rx_ops) 373 { 374 rx_ops->reg_rx_ops.reg_display_super_chan_list = 375 wlan_reg_display_super_chan_list; 376 } 377 378 #ifdef CONFIG_AFC_SUPPORT 379 static void wlan_lmac_if_register_afc_handlers( 380 struct wlan_lmac_if_rx_ops *rx_ops) 381 { 382 rx_ops->reg_rx_ops.afc_event_handler = tgt_reg_process_afc_event; 383 rx_ops->reg_rx_ops.reg_set_afc_dev_type = tgt_reg_set_afc_dev_type; 384 rx_ops->reg_rx_ops.reg_get_afc_dev_type = tgt_reg_get_afc_dev_type; 385 rx_ops->reg_rx_ops.reg_set_eirp_preferred_support = 386 tgt_reg_set_eirp_preferred_support; 387 rx_ops->reg_rx_ops.reg_get_eirp_preferred_support = 388 tgt_reg_get_eirp_preferred_support; 389 } 390 #else 391 static inline void wlan_lmac_if_register_afc_handlers( 392 struct wlan_lmac_if_rx_ops *rx_ops) 393 { 394 } 395 #endif 396 397 #else 398 static inline void wlan_lmac_if_register_master_list_ext_handler( 399 struct wlan_lmac_if_rx_ops *rx_ops) 400 { 401 } 402 403 static inline void wlan_lmac_if_register_afc_handlers( 404 struct wlan_lmac_if_rx_ops *rx_ops) 405 { 406 } 407 408 static inline void wlan_lmac_if_register_super_chan_display( 409 struct wlan_lmac_if_rx_ops *rx_ops) 410 { 411 } 412 #endif 413 414 #if defined(CONFIG_BAND_6GHZ) 415 static void wlan_lmac_if_register_6g_edge_chan_supp( 416 struct wlan_lmac_if_rx_ops *rx_ops) 417 { 418 rx_ops->reg_rx_ops.reg_set_lower_6g_edge_ch_supp = 419 tgt_reg_set_lower_6g_edge_ch_supp; 420 421 rx_ops->reg_rx_ops.reg_set_disable_upper_6g_edge_ch_supp = 422 tgt_reg_set_disable_upper_6g_edge_ch_supp; 423 } 424 #else 425 static inline void wlan_lmac_if_register_6g_edge_chan_supp( 426 struct wlan_lmac_if_rx_ops *rx_ops) 427 { 428 } 429 #endif 430 431 #ifdef WLAN_REG_PARTIAL_OFFLOAD 432 /** 433 * wlan_lmac_if_umac_reg_rx_ops_register_po() - Function to register Reg RX ops 434 * for Partial Offload 435 * @rx_ops: Pointer to wlan_lmac_if_rx_ops 436 * 437 * Return: void 438 */ 439 static void wlan_lmac_if_umac_reg_rx_ops_register_po( 440 struct wlan_lmac_if_rx_ops *rx_ops) 441 { 442 rx_ops->reg_rx_ops.reg_program_default_cc = 443 ucfg_reg_program_default_cc; 444 445 rx_ops->reg_rx_ops.reg_get_current_regdomain = 446 wlan_reg_get_curr_regdomain; 447 } 448 #else 449 static void wlan_lmac_if_umac_reg_rx_ops_register_po( 450 struct wlan_lmac_if_rx_ops *rx_ops) 451 { 452 } 453 #endif 454 455 static void wlan_lmac_if_umac_reg_rx_ops_register( 456 struct wlan_lmac_if_rx_ops *rx_ops) 457 { 458 rx_ops->reg_rx_ops.master_list_handler = 459 tgt_reg_process_master_chan_list; 460 461 wlan_lmac_if_register_master_list_ext_handler(rx_ops); 462 463 rx_ops->reg_rx_ops.reg_11d_new_cc_handler = 464 tgt_reg_process_11d_new_country; 465 466 rx_ops->reg_rx_ops.reg_set_regdb_offloaded = 467 tgt_reg_set_regdb_offloaded; 468 469 rx_ops->reg_rx_ops.reg_set_11d_offloaded = 470 tgt_reg_set_11d_offloaded; 471 472 rx_ops->reg_rx_ops.reg_set_6ghz_supported = 473 tgt_reg_set_6ghz_supported; 474 475 rx_ops->reg_rx_ops.reg_set_5dot9_ghz_supported = 476 tgt_reg_set_5dot9_ghz_supported; 477 478 rx_ops->reg_rx_ops.get_dfs_region = 479 wlan_reg_get_dfs_region; 480 481 rx_ops->reg_rx_ops.reg_ch_avoid_event_handler = 482 tgt_reg_process_ch_avoid_event; 483 484 rx_ops->reg_rx_ops.reg_freq_to_chan = 485 wlan_reg_freq_to_chan; 486 487 rx_ops->reg_rx_ops.reg_set_chan_144 = 488 ucfg_reg_modify_chan_144; 489 490 rx_ops->reg_rx_ops.reg_get_chan_144 = 491 ucfg_reg_get_en_chan_144; 492 493 wlan_lmac_if_umac_reg_rx_ops_register_po(rx_ops); 494 495 rx_ops->reg_rx_ops.reg_enable_dfs_channels = 496 ucfg_reg_enable_dfs_channels; 497 498 rx_ops->reg_rx_ops.reg_modify_pdev_chan_range = 499 wlan_reg_modify_pdev_chan_range; 500 501 rx_ops->reg_rx_ops.reg_update_pdev_wireless_modes = 502 wlan_reg_update_pdev_wireless_modes; 503 504 rx_ops->reg_rx_ops.reg_is_range_only6g = 505 wlan_reg_is_range_only6g; 506 507 rx_ops->reg_rx_ops.reg_is_range_overlap_6g = 508 wlan_reg_is_range_overlap_6g; 509 510 rx_ops->reg_rx_ops.reg_ignore_fw_reg_offload_ind = 511 tgt_reg_ignore_fw_reg_offload_ind; 512 513 rx_ops->reg_rx_ops.reg_disable_chan_coex = 514 wlan_reg_disable_chan_coex; 515 516 rx_ops->reg_rx_ops.reg_get_unii_5g_bitmap = 517 ucfg_reg_get_unii_5g_bitmap; 518 519 rx_ops->reg_rx_ops.reg_set_ext_tpc_supported = 520 tgt_reg_set_ext_tpc_supported; 521 522 wlan_lmac_if_register_6g_edge_chan_supp(rx_ops); 523 524 wlan_lmac_if_register_afc_handlers(rx_ops); 525 526 wlan_lmac_if_register_super_chan_display(rx_ops); 527 } 528 529 #ifdef CONVERGED_P2P_ENABLE 530 #ifdef WLAN_FEATURE_MCC_QUOTA 531 static inline void 532 wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(struct wlan_lmac_if_rx_ops *rx_ops) 533 { 534 rx_ops->p2p.mcc_quota_ev_handler = tgt_p2p_mcc_quota_event_cb; 535 } 536 #else 537 static inline void wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota( 538 struct wlan_lmac_if_rx_ops *rx_ops) 539 { 540 } 541 #endif 542 543 #ifdef FEATURE_P2P_LISTEN_OFFLOAD 544 static inline void 545 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(struct wlan_lmac_if_rx_ops *rx_ops) 546 { 547 rx_ops->p2p.lo_ev_handler = tgt_p2p_lo_event_cb; 548 } 549 #else 550 static inline void 551 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(struct wlan_lmac_if_rx_ops *rx_ops) 552 { 553 } 554 #endif 555 556 static void wlan_lmac_if_umac_rx_ops_register_p2p( 557 struct wlan_lmac_if_rx_ops *rx_ops) 558 { 559 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(rx_ops); 560 rx_ops->p2p.noa_ev_handler = tgt_p2p_noa_event_cb; 561 rx_ops->p2p.add_mac_addr_filter_evt_handler = 562 tgt_p2p_add_mac_addr_status_event_cb; 563 wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(rx_ops); 564 } 565 #else 566 static void wlan_lmac_if_umac_rx_ops_register_p2p( 567 struct wlan_lmac_if_rx_ops *rx_ops) 568 { 569 } 570 #endif 571 572 /* 573 * register_precac_auto_chan_rx_ops_freq() - Register auto chan switch rx ops 574 * for frequency based channel APIs. 575 * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops 576 */ 577 #ifdef DFS_COMPONENT_ENABLE 578 #if defined(WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT) && defined(CONFIG_CHAN_FREQ_API) 579 static inline void 580 register_precac_auto_chan_rx_ops_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 581 { 582 if (!rx_ops) 583 return; 584 rx_ops->dfs_get_precac_chan_state_for_freq = 585 ucfg_dfs_get_precac_chan_state_for_freq; 586 } 587 #else 588 static inline void 589 register_precac_auto_chan_rx_ops_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 590 { 591 } 592 #endif 593 #endif 594 595 #ifdef DFS_COMPONENT_ENABLE 596 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT 597 static inline void 598 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 599 { 600 if (!rx_ops) 601 return; 602 rx_ops->dfs_set_precac_intermediate_chan = 603 ucfg_dfs_set_precac_intermediate_chan; 604 rx_ops->dfs_get_precac_intermediate_chan = 605 ucfg_dfs_get_precac_intermediate_chan; 606 } 607 #else 608 static inline void 609 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 610 { 611 } 612 #endif 613 614 /* 615 * register_dfs_rx_ops_for_freq() - Register DFS rx ops for frequency based 616 * channel APIs. 617 * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 618 */ 619 #ifdef CONFIG_CHAN_FREQ_API 620 static void register_dfs_rx_ops_for_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 621 { 622 if (!rx_ops) 623 return; 624 rx_ops->dfs_set_current_channel_for_freq = 625 tgt_dfs_set_current_channel_for_freq; 626 } 627 #endif 628 629 /* 630 * register_rcac_dfs_rx_ops() - Register DFS RX-Ops for RCAC specific 631 * APIs. 632 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 633 */ 634 #ifdef QCA_SUPPORT_ADFS_RCAC 635 static void register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 636 { 637 if (!rx_ops) 638 return; 639 rx_ops->dfs_set_rcac_enable = ucfg_dfs_set_rcac_enable; 640 rx_ops->dfs_get_rcac_enable = ucfg_dfs_get_rcac_enable; 641 rx_ops->dfs_set_rcac_freq = ucfg_dfs_set_rcac_freq; 642 rx_ops->dfs_get_rcac_freq = ucfg_dfs_get_rcac_freq; 643 rx_ops->dfs_is_agile_rcac_enabled = ucfg_dfs_is_agile_rcac_enabled; 644 } 645 #else 646 static inline void 647 register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 648 { 649 } 650 #endif 651 652 /* 653 * register_agile_dfs_rx_ops() - Register Rx-Ops for Agile Specific APIs 654 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 655 */ 656 #ifdef QCA_SUPPORT_AGILE_DFS 657 static void register_agile_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 658 { 659 if (!rx_ops) 660 return; 661 rx_ops->dfs_agile_sm_deliver_evt = utils_dfs_agile_sm_deliver_evt; 662 } 663 #else 664 static inline void 665 register_agile_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 666 { 667 } 668 #endif 669 670 #ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL 671 /* register_dfs_chan_postnol_rx_ops() - Register DFS Rx-Ops for postNOL 672 * channel change APIs. 673 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 674 */ 675 static void 676 register_dfs_chan_postnol_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 677 { 678 if (!rx_ops) 679 return; 680 681 rx_ops->dfs_set_postnol_freq = ucfg_dfs_set_postnol_freq; 682 rx_ops->dfs_set_postnol_mode = ucfg_dfs_set_postnol_mode; 683 rx_ops->dfs_set_postnol_cfreq2 = ucfg_dfs_set_postnol_cfreq2; 684 rx_ops->dfs_get_postnol_freq = ucfg_dfs_get_postnol_freq; 685 rx_ops->dfs_get_postnol_mode = ucfg_dfs_get_postnol_mode; 686 rx_ops->dfs_get_postnol_cfreq2 = ucfg_dfs_get_postnol_cfreq2; 687 } 688 #else 689 static inline void 690 register_dfs_chan_postnol_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 691 { 692 } 693 #endif 694 695 #ifdef QCA_DFS_BW_EXPAND 696 /* register_dfs_bw_expand_rx_ops() - Register DFS Rx-Ops for BW Expand 697 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 698 */ 699 static void 700 register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 701 { 702 if (!rx_ops) 703 return; 704 705 rx_ops->dfs_set_bw_expand = ucfg_dfs_set_bw_expand; 706 rx_ops->dfs_get_bw_expand = ucfg_dfs_get_bw_expand; 707 } 708 #else 709 static inline void 710 register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 711 { 712 } 713 #endif 714 715 #if defined(QCA_DFS_BW_PUNCTURE) && !defined(CONFIG_REG_CLIENT) 716 /* register_dfs_puncture_rx_ops() - Register DFS Rx-Ops for DFS puncture. 717 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 718 */ 719 static void 720 register_dfs_puncture_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 721 { 722 if (!rx_ops) 723 return; 724 725 rx_ops->dfs_set_dfs_puncture = ucfg_dfs_set_dfs_puncture; 726 rx_ops->dfs_get_dfs_puncture = ucfg_dfs_get_dfs_puncture; 727 } 728 #else 729 static inline void 730 register_dfs_puncture_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 731 { 732 } 733 #endif 734 735 #ifdef WLAN_MGMT_RX_REO_SUPPORT 736 static QDF_STATUS 737 wlan_lmac_if_mgmt_rx_reo_rx_ops_register( 738 struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops) 739 { 740 struct wlan_lmac_if_mgmt_rx_reo_rx_ops *mgmt_rx_reo_rx_ops; 741 742 mgmt_rx_reo_rx_ops = &mgmt_txrx_rx_ops->mgmt_rx_reo_rx_ops; 743 mgmt_rx_reo_rx_ops->fw_consumed_event_handler = 744 tgt_mgmt_rx_reo_fw_consumed_event_handler; 745 mgmt_rx_reo_rx_ops->host_drop_handler = 746 tgt_mgmt_rx_reo_host_drop_handler; 747 748 return QDF_STATUS_SUCCESS; 749 } 750 #else 751 static QDF_STATUS 752 wlan_lmac_if_mgmt_rx_reo_rx_ops_register( 753 struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops) 754 { 755 return QDF_STATUS_SUCCESS; 756 } 757 #endif 758 759 static QDF_STATUS 760 wlan_lmac_if_mgmt_txrx_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 761 { 762 struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops; 763 764 if (!rx_ops) { 765 qdf_print("lmac if rx ops pointer is NULL"); 766 return QDF_STATUS_E_NULL_VALUE; 767 } 768 769 /* mgmt txrx rx ops */ 770 mgmt_txrx_rx_ops = &rx_ops->mgmt_txrx_rx_ops; 771 772 mgmt_txrx_rx_ops->mgmt_tx_completion_handler = 773 tgt_mgmt_txrx_tx_completion_handler; 774 mgmt_txrx_rx_ops->mgmt_rx_frame_handler = 775 tgt_mgmt_txrx_rx_frame_handler; 776 mgmt_txrx_rx_ops->mgmt_txrx_get_nbuf_from_desc_id = 777 tgt_mgmt_txrx_get_nbuf_from_desc_id; 778 mgmt_txrx_rx_ops->mgmt_txrx_get_peer_from_desc_id = 779 tgt_mgmt_txrx_get_peer_from_desc_id; 780 mgmt_txrx_rx_ops->mgmt_txrx_get_vdev_id_from_desc_id = 781 tgt_mgmt_txrx_get_vdev_id_from_desc_id; 782 mgmt_txrx_rx_ops->mgmt_txrx_get_free_desc_pool_count = 783 tgt_mgmt_txrx_get_free_desc_pool_count; 784 mgmt_txrx_rx_ops->mgmt_rx_frame_entry = 785 tgt_mgmt_txrx_rx_frame_entry; 786 787 return wlan_lmac_if_mgmt_rx_reo_rx_ops_register(mgmt_txrx_rx_ops); 788 } 789 790 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 791 static void dfs_action_on_status_assign( 792 struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops) 793 { 794 dfs_rx_ops->dfs_action_on_status = tgt_dfs_action_on_status_from_fw; 795 } 796 #else 797 static inline void dfs_action_on_status_assign( 798 struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops) 799 { 800 } 801 #endif 802 803 static QDF_STATUS 804 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 805 { 806 struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops; 807 808 dfs_rx_ops = &rx_ops->dfs_rx_ops; 809 810 dfs_rx_ops->dfs_get_radars = tgt_dfs_get_radars; 811 dfs_rx_ops->dfs_process_phyerr = tgt_dfs_process_phyerr; 812 dfs_rx_ops->dfs_destroy_object = tgt_dfs_destroy_object; 813 dfs_rx_ops->dfs_radar_enable = tgt_dfs_radar_enable; 814 dfs_rx_ops->dfs_is_radar_enabled = tgt_dfs_is_radar_enabled; 815 dfs_rx_ops->dfs_control = tgt_dfs_control; 816 dfs_rx_ops->dfs_is_precac_timer_running = 817 tgt_dfs_is_precac_timer_running; 818 dfs_rx_ops->dfs_agile_precac_start = 819 tgt_dfs_agile_precac_start; 820 dfs_rx_ops->dfs_set_agile_precac_state = 821 tgt_dfs_set_agile_precac_state; 822 dfs_rx_ops->dfs_start_precac_timer = utils_dfs_start_precac_timer; 823 dfs_rx_ops->dfs_cancel_precac_timer = utils_dfs_cancel_precac_timer; 824 dfs_rx_ops->dfs_reset_adfs_config = ucfg_dfs_reset_agile_config; 825 dfs_rx_ops->dfs_override_precac_timeout = 826 ucfg_dfs_override_precac_timeout; 827 dfs_rx_ops->dfs_set_precac_enable = ucfg_dfs_set_precac_enable; 828 dfs_rx_ops->dfs_get_agile_precac_enable = 829 ucfg_dfs_get_agile_precac_enable; 830 dfs_rx_ops->dfs_get_override_precac_timeout = 831 ucfg_dfs_get_override_precac_timeout; 832 dfs_rx_ops->dfs_process_radar_ind = tgt_dfs_process_radar_ind; 833 dfs_rx_ops->dfs_dfs_cac_complete_ind = tgt_dfs_cac_complete; 834 dfs_rx_ops->dfs_dfs_ocac_complete_ind = tgt_dfs_ocac_complete; 835 dfs_rx_ops->dfs_stop = tgt_dfs_stop; 836 dfs_rx_ops->dfs_reinit_timers = ucfg_dfs_reinit_timers; 837 dfs_rx_ops->dfs_enable_stadfs = tgt_dfs_enable_stadfs; 838 dfs_rx_ops->dfs_is_stadfs_enabled = tgt_dfs_is_stadfs_enabled; 839 dfs_rx_ops->dfs_process_phyerr_filter_offload = 840 tgt_dfs_process_phyerr_filter_offload; 841 dfs_rx_ops->dfs_is_phyerr_filter_offload = 842 tgt_dfs_is_phyerr_filter_offload; 843 844 dfs_action_on_status_assign(dfs_rx_ops); 845 846 dfs_rx_ops->dfs_override_status_timeout = 847 ucfg_dfs_set_override_status_timeout; 848 dfs_rx_ops->dfs_get_override_status_timeout = 849 ucfg_dfs_get_override_status_timeout; 850 dfs_rx_ops->dfs_reset_spoof_test = 851 tgt_dfs_reset_spoof_test; 852 dfs_rx_ops->dfs_is_disable_radar_marking_set = 853 utils_dfs_get_disable_radar_marking; 854 dfs_rx_ops->dfs_set_nol_subchannel_marking = 855 ucfg_dfs_set_nol_subchannel_marking; 856 dfs_rx_ops->dfs_get_nol_subchannel_marking = 857 ucfg_dfs_get_nol_subchannel_marking; 858 dfs_rx_ops->dfs_set_bw_reduction = 859 utils_dfs_bw_reduce; 860 dfs_rx_ops->dfs_is_bw_reduction_needed = 861 utils_dfs_is_bw_reduce; 862 dfs_rx_ops->dfs_allow_hw_pulses = 863 ucfg_dfs_allow_hw_pulses; 864 dfs_rx_ops->dfs_is_hw_pulses_allowed = 865 ucfg_dfs_is_hw_pulses_allowed; 866 dfs_rx_ops->dfs_set_fw_adfs_support = 867 tgt_dfs_set_fw_adfs_support; 868 dfs_rx_ops->dfs_reset_dfs_prevchan = 869 utils_dfs_reset_dfs_prevchan; 870 dfs_rx_ops->dfs_init_tmp_psoc_nol = 871 tgt_dfs_init_tmp_psoc_nol; 872 dfs_rx_ops->dfs_deinit_tmp_psoc_nol = 873 tgt_dfs_deinit_tmp_psoc_nol; 874 dfs_rx_ops->dfs_save_dfs_nol_in_psoc = 875 tgt_dfs_save_dfs_nol_in_psoc; 876 dfs_rx_ops->dfs_reinit_nol_from_psoc_copy = 877 tgt_dfs_reinit_nol_from_psoc_copy; 878 dfs_rx_ops->dfs_reinit_precac_lists = 879 tgt_dfs_reinit_precac_lists; 880 dfs_rx_ops->dfs_complete_deferred_tasks = 881 tgt_dfs_complete_deferred_tasks; 882 register_precac_auto_chan_rx_ops(dfs_rx_ops); 883 register_precac_auto_chan_rx_ops_freq(dfs_rx_ops); 884 register_dfs_rx_ops_for_freq(dfs_rx_ops); 885 register_rcac_dfs_rx_ops(dfs_rx_ops); 886 register_agile_dfs_rx_ops(dfs_rx_ops); 887 register_dfs_chan_postnol_rx_ops(dfs_rx_ops); 888 register_dfs_bw_expand_rx_ops(dfs_rx_ops); 889 register_dfs_puncture_rx_ops(dfs_rx_ops); 890 891 return QDF_STATUS_SUCCESS; 892 } 893 #else 894 static QDF_STATUS 895 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 896 { 897 return QDF_STATUS_SUCCESS; 898 } 899 #endif 900 901 #ifdef FEATURE_WLAN_TDLS 902 static QDF_STATUS 903 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 904 { 905 rx_ops->tdls_rx_ops.tdls_ev_handler = tgt_tdls_event_handler; 906 907 return QDF_STATUS_SUCCESS; 908 } 909 #else 910 static QDF_STATUS 911 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 912 { 913 return QDF_STATUS_SUCCESS; 914 } 915 #endif 916 917 #ifdef WLAN_SUPPORT_GREEN_AP 918 static QDF_STATUS 919 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 920 { 921 rx_ops->green_ap_rx_ops.is_ps_enabled = wlan_green_ap_is_ps_enabled; 922 rx_ops->green_ap_rx_ops.is_dbg_print_enabled = 923 ucfg_green_ap_get_debug_prints; 924 rx_ops->green_ap_rx_ops.ps_set = ucfg_green_ap_set_ps_config; 925 rx_ops->green_ap_rx_ops.ps_get = ucfg_green_ap_get_ps_config; 926 rx_ops->green_ap_rx_ops.suspend_handle = wlan_green_ap_suspend_handle; 927 928 return QDF_STATUS_SUCCESS; 929 } 930 #else 931 static QDF_STATUS 932 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 933 { 934 return QDF_STATUS_SUCCESS; 935 } 936 #endif 937 938 #ifdef QCA_WIFI_FTM 939 static QDF_STATUS 940 wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 941 { 942 struct wlan_lmac_if_ftm_rx_ops *ftm_rx_ops; 943 944 ftm_rx_ops = &rx_ops->ftm_rx_ops; 945 946 ftm_rx_ops->ftm_ev_handler = wlan_ftm_process_utf_event; 947 948 return QDF_STATUS_SUCCESS; 949 } 950 #else 951 static QDF_STATUS 952 wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 953 { 954 return QDF_STATUS_SUCCESS; 955 } 956 #endif 957 958 #ifdef WLAN_FEATURE_11BE_MLO 959 /** 960 * wlan_lmac_if_mlo_mgr_rx_ops_register() - API to register mlo mgr Rx Ops 961 * @rx_ops: pointer to lmac rx ops 962 * 963 * This API will be used to register function pointers for FW events 964 * 965 * Return: void 966 */ 967 static void 968 wlan_lmac_if_mlo_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 969 { 970 /* register handler for received mlo related events */ 971 rx_ops->mlo_rx_ops.process_link_set_active_resp = 972 mlo_process_link_set_active_resp; 973 rx_ops->mlo_rx_ops.process_mlo_vdev_tid_to_link_map_event = 974 wlan_mlo_vdev_tid_to_link_map_event; 975 } 976 #else 977 static void 978 wlan_lmac_if_mlo_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 979 { 980 } 981 #endif /* WLAN_FEATURE_11BE_MLO */ 982 983 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED) 984 static 985 void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 986 { 987 tgt_twt_register_rx_ops(rx_ops); 988 } 989 #else 990 static 991 void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 992 { 993 } 994 #endif /* WLAN_SUPPORT_TWT && WLAN_TWT_CONV_SUPPORTED */ 995 996 #ifdef WLAN_FEATURE_DBAM_CONFIG 997 static void 998 wlan_lmac_if_dbam_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 999 { 1000 rx_ops->dbam_rx_ops.dbam_resp_event = target_if_dbam_process_event; 1001 } 1002 #else 1003 static void 1004 wlan_lmac_if_dbam_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 1005 { 1006 } 1007 #endif /* WLAN_FEATURE_DBAM_CONFIG */ 1008 1009 /** 1010 * wlan_lmac_if_umac_rx_ops_register() - UMAC rx handler register 1011 * @rx_ops: Pointer to rx_ops structure to be populated 1012 * 1013 * Register umac RX callabacks which will be called by DA/OL/WMA/WMI 1014 * 1015 * Return: QDF_STATUS_SUCCESS - in case of success 1016 */ 1017 QDF_STATUS 1018 wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 1019 { 1020 /* Component specific public api's to be called to register 1021 * respective callbacks 1022 * Ex: rx_ops->fp = function; 1023 */ 1024 1025 if (!rx_ops) { 1026 qdf_print("lmac if rx ops pointer is NULL"); 1027 return QDF_STATUS_E_INVAL; 1028 } 1029 1030 wlan_lmac_if_mgmt_txrx_rx_ops_register(rx_ops); 1031 1032 /* scan rx ops */ 1033 rx_ops->scan.scan_ev_handler = tgt_scan_event_handler; 1034 rx_ops->scan.scan_set_max_active_scans = tgt_scan_set_max_active_scans; 1035 1036 wlan_lmac_if_atf_rx_ops_register(rx_ops); 1037 1038 wlan_lmac_if_cp_stats_rx_ops_register(rx_ops); 1039 1040 wlan_target_if_dcs_rx_ops_register(rx_ops); 1041 1042 wlan_lmac_if_sa_api_rx_ops_register(rx_ops); 1043 1044 wlan_lmac_if_cfr_rx_ops_register(rx_ops); 1045 1046 wlan_lmac_if_crypto_rx_ops_register(rx_ops); 1047 /* wifi_pos rx ops */ 1048 wlan_lmac_if_umac_rx_ops_register_wifi_pos(rx_ops); 1049 1050 /* tdls rx ops */ 1051 wlan_lmac_if_umac_tdls_rx_ops_register(rx_ops); 1052 1053 wlan_lmac_if_umac_reg_rx_ops_register(rx_ops); 1054 1055 /* p2p rx ops */ 1056 wlan_lmac_if_umac_rx_ops_register_p2p(rx_ops); 1057 1058 /* DFS rx_ops */ 1059 wlan_lmac_if_umac_dfs_rx_ops_register(rx_ops); 1060 1061 wlan_lmac_if_umac_green_ap_rx_ops_register(rx_ops); 1062 1063 /* FTM rx_ops */ 1064 wlan_lmac_if_umac_ftm_rx_ops_register(rx_ops); 1065 1066 /* FILS Discovery */ 1067 wlan_lmac_if_fd_rx_ops_register(rx_ops); 1068 1069 /* MLME rx_ops */ 1070 tgt_vdev_mgr_rx_ops_register(rx_ops); 1071 1072 wlan_lmac_if_mlo_mgr_rx_ops_register(rx_ops); 1073 1074 wlan_lmac_if_twt_rx_ops_register(rx_ops); 1075 1076 wlan_lmac_if_dbam_rx_ops_register(rx_ops); 1077 1078 return QDF_STATUS_SUCCESS; 1079 } 1080 1081 QDF_STATUS wlan_lmac_if_set_umac_txops_registration_cb(QDF_STATUS (*handler) 1082 (struct wlan_lmac_if_tx_ops *)) 1083 { 1084 wlan_lmac_if_umac_tx_ops_register = handler; 1085 return QDF_STATUS_SUCCESS; 1086 } 1087 qdf_export_symbol(wlan_lmac_if_set_umac_txops_registration_cb); 1088 1089 QDF_STATUS wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb( 1090 QDF_STATUS (*handler)(struct wlan_lmac_if_rx_ops *)) 1091 { 1092 wlan_lmac_if_umac_crypto_rxpn_ops_register = handler; 1093 return QDF_STATUS_SUCCESS; 1094 } 1095 qdf_export_symbol(wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb); 1096