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 #ifdef WLAN_ATF_INCREASED_STA 184 static void 185 wlan_lmac_if_atf_rx_ops_max_clients(struct wlan_lmac_if_atf_rx_ops *atf_rx_ops) 186 { 187 atf_rx_ops->atf_set_fw_max_client_512_support = 188 tgt_atf_set_fw_cap_max_client_512_support; 189 } 190 #else 191 static void 192 wlan_lmac_if_atf_rx_ops_max_clients(struct wlan_lmac_if_atf_rx_ops *atf_rx_ops) 193 { 194 } 195 #endif /* WLAN_ATF_INCREASED_STA */ 196 197 /** 198 * wlan_lmac_if_atf_rx_ops_register() - Function to register ATF RX ops. 199 * @rx_ops: Pointer to wlan_lmac_if_rx_ops 200 */ 201 static void 202 wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 203 { 204 struct wlan_lmac_if_atf_rx_ops *atf_rx_ops = &rx_ops->atf_rx_ops; 205 206 /* ATF rx ops */ 207 atf_rx_ops->atf_get_fmcap = tgt_atf_get_fmcap; 208 atf_rx_ops->atf_get_mode = tgt_atf_get_mode; 209 atf_rx_ops->atf_get_msdu_desc = tgt_atf_get_msdu_desc; 210 atf_rx_ops->atf_get_max_vdevs = tgt_atf_get_max_vdevs; 211 atf_rx_ops->atf_get_peers = tgt_atf_get_peers; 212 atf_rx_ops->atf_get_tput_based = tgt_atf_get_tput_based; 213 atf_rx_ops->atf_get_logging = tgt_atf_get_logging; 214 atf_rx_ops->atf_get_ssidgroup = tgt_atf_get_ssidgroup; 215 atf_rx_ops->atf_get_vdev_ac_blk_cnt = tgt_atf_get_vdev_ac_blk_cnt; 216 atf_rx_ops->atf_get_peer_blk_txbitmap = tgt_atf_get_peer_blk_txbitmap; 217 atf_rx_ops->atf_get_vdev_blk_txtraffic = tgt_atf_get_vdev_blk_txtraffic; 218 atf_rx_ops->atf_get_sched = tgt_atf_get_sched; 219 atf_rx_ops->atf_get_peer_stats = tgt_atf_get_peer_stats; 220 atf_rx_ops->atf_get_token_allocated = tgt_atf_get_token_allocated; 221 atf_rx_ops->atf_get_token_utilized = tgt_atf_get_token_utilized; 222 223 atf_rx_ops->atf_set_sched = tgt_atf_set_sched; 224 atf_rx_ops->atf_set_fmcap = tgt_atf_set_fmcap; 225 atf_rx_ops->atf_set_msdu_desc = tgt_atf_set_msdu_desc; 226 atf_rx_ops->atf_set_max_vdevs = tgt_atf_set_max_vdevs; 227 atf_rx_ops->atf_set_peers = tgt_atf_set_peers; 228 atf_rx_ops->atf_set_peer_stats = tgt_atf_set_peer_stats; 229 atf_rx_ops->atf_set_vdev_blk_txtraffic = tgt_atf_set_vdev_blk_txtraffic; 230 atf_rx_ops->atf_peer_blk_txtraffic = tgt_atf_peer_blk_txtraffic; 231 atf_rx_ops->atf_peer_unblk_txtraffic = tgt_atf_peer_unblk_txtraffic; 232 atf_rx_ops->atf_set_token_allocated = tgt_atf_set_token_allocated; 233 atf_rx_ops->atf_set_token_utilized = tgt_atf_set_token_utilized; 234 atf_rx_ops->atf_process_tx_ppdu_stats = tgt_atf_process_tx_ppdu_stats; 235 atf_rx_ops->atf_process_rx_ppdu_stats = tgt_atf_process_rx_ppdu_stats; 236 atf_rx_ops->atf_is_stats_enabled = tgt_atf_is_stats_enabled; 237 wlan_lmac_if_atf_rx_ops_max_clients(atf_rx_ops); 238 } 239 #else 240 static void 241 wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 242 { 243 } 244 #endif 245 246 #ifdef WLAN_SUPPORT_FILS 247 static void 248 wlan_lmac_if_fd_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 249 { 250 struct wlan_lmac_if_fd_rx_ops *fd_rx_ops = &rx_ops->fd_rx_ops; 251 252 fd_rx_ops->fd_is_fils_enable = tgt_fd_is_fils_enable; 253 fd_rx_ops->fd_alloc = tgt_fd_alloc; 254 fd_rx_ops->fd_stop = tgt_fd_stop; 255 fd_rx_ops->fd_free = tgt_fd_free; 256 fd_rx_ops->fd_get_valid_fd_period = tgt_fd_get_valid_fd_period; 257 fd_rx_ops->fd_swfda_handler = tgt_fd_swfda_handler; 258 fd_rx_ops->fd_offload = tgt_fd_offload; 259 fd_rx_ops->fd_tmpl_update = tgt_fd_tmpl_update; 260 } 261 #else 262 static void 263 wlan_lmac_if_fd_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 264 { 265 } 266 #endif 267 268 #ifdef WLAN_SA_API_ENABLE 269 /** 270 * wlan_lmac_if_sa_api_rx_ops_register() - Function to register SA_API RX ops. 271 * @rx_ops: Pointer to wlan_lmac_if_rx_ops 272 */ 273 static void 274 wlan_lmac_if_sa_api_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 275 { 276 struct wlan_lmac_if_sa_api_rx_ops *sa_api_rx_ops = &rx_ops->sa_api_rx_ops; 277 278 /* SA API rx ops */ 279 sa_api_rx_ops->sa_api_get_sa_supported = tgt_sa_api_get_sa_supported; 280 sa_api_rx_ops->sa_api_get_validate_sw = tgt_sa_api_get_validate_sw; 281 sa_api_rx_ops->sa_api_enable_sa = tgt_sa_api_enable_sa; 282 sa_api_rx_ops->sa_api_get_sa_enable = tgt_sa_api_get_sa_enable; 283 284 sa_api_rx_ops->sa_api_peer_assoc_hanldler = tgt_sa_api_peer_assoc_hanldler; 285 sa_api_rx_ops->sa_api_update_tx_feedback = tgt_sa_api_update_tx_feedback; 286 sa_api_rx_ops->sa_api_update_rx_feedback = tgt_sa_api_update_rx_feedback; 287 288 sa_api_rx_ops->sa_api_ucfg_set_param = tgt_sa_api_ucfg_set_param; 289 sa_api_rx_ops->sa_api_ucfg_get_param = tgt_sa_api_ucfg_get_param; 290 291 sa_api_rx_ops->sa_api_is_tx_feedback_enabled = tgt_sa_api_is_tx_feedback_enabled; 292 sa_api_rx_ops->sa_api_is_rx_feedback_enabled = tgt_sa_api_is_rx_feedback_enabled; 293 294 sa_api_rx_ops->sa_api_convert_rate_2g = tgt_sa_api_convert_rate_2g; 295 sa_api_rx_ops->sa_api_convert_rate_5g = tgt_sa_api_convert_rate_5g; 296 sa_api_rx_ops->sa_api_get_sa_mode = tgt_sa_api_get_sa_mode; 297 298 sa_api_rx_ops->sa_api_get_beacon_txantenna = tgt_sa_api_get_beacon_txantenna; 299 sa_api_rx_ops->sa_api_cwm_action = tgt_sa_api_cwm_action; 300 } 301 #else 302 static void 303 wlan_lmac_if_sa_api_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 304 { 305 } 306 #endif 307 308 #ifdef WLAN_CFR_ENABLE 309 /** 310 * wlan_lmac_if_cfr_rx_ops_register() - Function to register CFR RX ops 311 * @rx_ops: Pointer to wlan_lmac_if_rx_ops 312 */ 313 static void 314 wlan_lmac_if_cfr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 315 { 316 struct wlan_lmac_if_cfr_rx_ops *cfr_rx_ops = &rx_ops->cfr_rx_ops; 317 318 /* CFR rx ops */ 319 cfr_rx_ops->cfr_support_set = tgt_cfr_support_set; 320 cfr_rx_ops->cfr_info_send = tgt_cfr_info_send; 321 cfr_rx_ops->cfr_capture_count_support_set = 322 tgt_cfr_capture_count_support_set; 323 cfr_rx_ops->cfr_mo_marking_support_set = tgt_cfr_mo_marking_support_set; 324 cfr_rx_ops->cfr_aoa_for_rcc_support_set = 325 tgt_cfr_aoa_for_rcc_support_set; 326 } 327 #else 328 static void 329 wlan_lmac_if_cfr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 330 { 331 } 332 #endif 333 334 static void 335 wlan_lmac_if_crypto_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 336 { 337 wlan_crypto_register_crypto_rx_ops(&rx_ops->crypto_rx_ops); 338 if (wlan_lmac_if_umac_crypto_rxpn_ops_register) 339 wlan_lmac_if_umac_crypto_rxpn_ops_register(rx_ops); 340 } 341 342 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT) 343 static void 344 wlan_lmac_if_wifi_pos_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) 345 { 346 struct wlan_lmac_if_wifi_pos_rx_ops *wifi_pos_rx_ops = 347 &rx_ops->wifi_pos_rx_ops; 348 349 wifi_pos_rx_ops->wifi_pos_ranging_peer_create_cb = 350 wifi_pos_handle_ranging_peer_create; 351 wifi_pos_rx_ops->wifi_pos_ranging_peer_create_rsp_cb = 352 wifi_pos_handle_ranging_peer_create_rsp; 353 wifi_pos_rx_ops->wifi_pos_ranging_peer_delete_cb = 354 wifi_pos_handle_ranging_peer_delete; 355 wifi_pos_rx_ops->wifi_pos_vdev_delete_all_ranging_peers_rsp_cb = 356 wifi_pos_vdev_delete_all_ranging_peers_rsp; 357 } 358 #else 359 static inline void 360 wlan_lmac_if_wifi_pos_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) 361 {} 362 #endif 363 364 #ifdef WIFI_POS_CONVERGED 365 static void 366 wlan_lmac_if_umac_rx_ops_register_wifi_pos(struct wlan_lmac_if_rx_ops *rx_ops) 367 { 368 wifi_pos_register_rx_ops(rx_ops); 369 wlan_lmac_if_wifi_pos_rx_ops(rx_ops); 370 } 371 #else 372 static void wlan_lmac_if_umac_rx_ops_register_wifi_pos( 373 struct wlan_lmac_if_rx_ops *rx_ops) 374 { 375 } 376 #endif /* WIFI_POS_CONVERGED */ 377 378 #ifdef CONFIG_BAND_6GHZ 379 static void wlan_lmac_if_register_master_list_ext_handler( 380 struct wlan_lmac_if_rx_ops *rx_ops) 381 { 382 rx_ops->reg_rx_ops.master_list_ext_handler = 383 tgt_reg_process_master_chan_list_ext; 384 } 385 386 static void wlan_lmac_if_register_super_chan_display( 387 struct wlan_lmac_if_rx_ops *rx_ops) 388 { 389 rx_ops->reg_rx_ops.reg_display_super_chan_list = 390 wlan_reg_display_super_chan_list; 391 } 392 393 #ifdef CONFIG_AFC_SUPPORT 394 static void wlan_lmac_if_register_afc_handlers( 395 struct wlan_lmac_if_rx_ops *rx_ops) 396 { 397 rx_ops->reg_rx_ops.afc_event_handler = tgt_reg_process_afc_event; 398 rx_ops->reg_rx_ops.reg_set_afc_dev_type = tgt_reg_set_afc_dev_type; 399 rx_ops->reg_rx_ops.reg_get_afc_dev_type = tgt_reg_get_afc_dev_type; 400 rx_ops->reg_rx_ops.reg_set_eirp_preferred_support = 401 tgt_reg_set_eirp_preferred_support; 402 rx_ops->reg_rx_ops.reg_get_eirp_preferred_support = 403 tgt_reg_get_eirp_preferred_support; 404 } 405 #else 406 static inline void wlan_lmac_if_register_afc_handlers( 407 struct wlan_lmac_if_rx_ops *rx_ops) 408 { 409 } 410 #endif 411 412 #else 413 static inline void wlan_lmac_if_register_master_list_ext_handler( 414 struct wlan_lmac_if_rx_ops *rx_ops) 415 { 416 } 417 418 static inline void wlan_lmac_if_register_afc_handlers( 419 struct wlan_lmac_if_rx_ops *rx_ops) 420 { 421 } 422 423 static inline void wlan_lmac_if_register_super_chan_display( 424 struct wlan_lmac_if_rx_ops *rx_ops) 425 { 426 } 427 #endif 428 429 #if defined(CONFIG_BAND_6GHZ) 430 static void wlan_lmac_if_register_6g_edge_chan_supp( 431 struct wlan_lmac_if_rx_ops *rx_ops) 432 { 433 rx_ops->reg_rx_ops.reg_set_lower_6g_edge_ch_supp = 434 tgt_reg_set_lower_6g_edge_ch_supp; 435 436 rx_ops->reg_rx_ops.reg_set_disable_upper_6g_edge_ch_supp = 437 tgt_reg_set_disable_upper_6g_edge_ch_supp; 438 } 439 #else 440 static inline void wlan_lmac_if_register_6g_edge_chan_supp( 441 struct wlan_lmac_if_rx_ops *rx_ops) 442 { 443 } 444 #endif 445 446 #ifdef WLAN_REG_PARTIAL_OFFLOAD 447 /** 448 * wlan_lmac_if_umac_reg_rx_ops_register_po() - Function to register Reg RX ops 449 * for Partial Offload 450 * @rx_ops: Pointer to wlan_lmac_if_rx_ops 451 * 452 * Return: void 453 */ 454 static void wlan_lmac_if_umac_reg_rx_ops_register_po( 455 struct wlan_lmac_if_rx_ops *rx_ops) 456 { 457 rx_ops->reg_rx_ops.reg_program_default_cc = 458 ucfg_reg_program_default_cc; 459 460 rx_ops->reg_rx_ops.reg_get_current_regdomain = 461 wlan_reg_get_curr_regdomain; 462 } 463 #else 464 static void wlan_lmac_if_umac_reg_rx_ops_register_po( 465 struct wlan_lmac_if_rx_ops *rx_ops) 466 { 467 } 468 #endif 469 470 static void wlan_lmac_if_umac_reg_rx_ops_register( 471 struct wlan_lmac_if_rx_ops *rx_ops) 472 { 473 rx_ops->reg_rx_ops.master_list_handler = 474 tgt_reg_process_master_chan_list; 475 476 wlan_lmac_if_register_master_list_ext_handler(rx_ops); 477 478 rx_ops->reg_rx_ops.reg_11d_new_cc_handler = 479 tgt_reg_process_11d_new_country; 480 481 rx_ops->reg_rx_ops.reg_set_regdb_offloaded = 482 tgt_reg_set_regdb_offloaded; 483 484 rx_ops->reg_rx_ops.reg_set_11d_offloaded = 485 tgt_reg_set_11d_offloaded; 486 487 rx_ops->reg_rx_ops.reg_set_6ghz_supported = 488 tgt_reg_set_6ghz_supported; 489 490 rx_ops->reg_rx_ops.reg_set_5dot9_ghz_supported = 491 tgt_reg_set_5dot9_ghz_supported; 492 493 rx_ops->reg_rx_ops.get_dfs_region = 494 wlan_reg_get_dfs_region; 495 496 rx_ops->reg_rx_ops.reg_ch_avoid_event_handler = 497 tgt_reg_process_ch_avoid_event; 498 499 rx_ops->reg_rx_ops.reg_freq_to_chan = 500 wlan_reg_freq_to_chan; 501 502 rx_ops->reg_rx_ops.reg_set_chan_144 = 503 ucfg_reg_modify_chan_144; 504 505 rx_ops->reg_rx_ops.reg_get_chan_144 = 506 ucfg_reg_get_en_chan_144; 507 508 wlan_lmac_if_umac_reg_rx_ops_register_po(rx_ops); 509 510 rx_ops->reg_rx_ops.reg_enable_dfs_channels = 511 ucfg_reg_enable_dfs_channels; 512 513 rx_ops->reg_rx_ops.reg_modify_pdev_chan_range = 514 wlan_reg_modify_pdev_chan_range; 515 516 rx_ops->reg_rx_ops.reg_update_pdev_wireless_modes = 517 wlan_reg_update_pdev_wireless_modes; 518 519 rx_ops->reg_rx_ops.reg_is_range_only6g = 520 wlan_reg_is_range_only6g; 521 522 rx_ops->reg_rx_ops.reg_is_range_overlap_6g = 523 wlan_reg_is_range_overlap_6g; 524 525 rx_ops->reg_rx_ops.reg_ignore_fw_reg_offload_ind = 526 tgt_reg_ignore_fw_reg_offload_ind; 527 528 rx_ops->reg_rx_ops.reg_disable_chan_coex = 529 wlan_reg_disable_chan_coex; 530 531 rx_ops->reg_rx_ops.reg_get_unii_5g_bitmap = 532 ucfg_reg_get_unii_5g_bitmap; 533 534 rx_ops->reg_rx_ops.reg_set_ext_tpc_supported = 535 tgt_reg_set_ext_tpc_supported; 536 537 wlan_lmac_if_register_6g_edge_chan_supp(rx_ops); 538 539 wlan_lmac_if_register_afc_handlers(rx_ops); 540 541 wlan_lmac_if_register_super_chan_display(rx_ops); 542 543 rx_ops->reg_rx_ops.reg_r2p_table_update_response_handler = 544 tgt_reg_process_r2p_table_update_response; 545 } 546 547 #ifdef CONVERGED_P2P_ENABLE 548 #ifdef WLAN_FEATURE_MCC_QUOTA 549 static inline void 550 wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(struct wlan_lmac_if_rx_ops *rx_ops) 551 { 552 rx_ops->p2p.mcc_quota_ev_handler = tgt_p2p_mcc_quota_event_cb; 553 } 554 #else 555 static inline void wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota( 556 struct wlan_lmac_if_rx_ops *rx_ops) 557 { 558 } 559 #endif 560 561 #ifdef FEATURE_P2P_LISTEN_OFFLOAD 562 static inline void 563 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(struct wlan_lmac_if_rx_ops *rx_ops) 564 { 565 rx_ops->p2p.lo_ev_handler = tgt_p2p_lo_event_cb; 566 } 567 #else 568 static inline void 569 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(struct wlan_lmac_if_rx_ops *rx_ops) 570 { 571 } 572 #endif 573 574 static void wlan_lmac_if_umac_rx_ops_register_p2p( 575 struct wlan_lmac_if_rx_ops *rx_ops) 576 { 577 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(rx_ops); 578 rx_ops->p2p.noa_ev_handler = tgt_p2p_noa_event_cb; 579 rx_ops->p2p.add_mac_addr_filter_evt_handler = 580 tgt_p2p_add_mac_addr_status_event_cb; 581 wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(rx_ops); 582 } 583 #else 584 static void wlan_lmac_if_umac_rx_ops_register_p2p( 585 struct wlan_lmac_if_rx_ops *rx_ops) 586 { 587 } 588 #endif 589 590 /* 591 * register_precac_auto_chan_rx_ops_freq() - Register auto chan switch rx ops 592 * for frequency based channel APIs. 593 * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops 594 */ 595 #ifdef DFS_COMPONENT_ENABLE 596 #if defined(WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT) && defined(CONFIG_CHAN_FREQ_API) 597 static inline void 598 register_precac_auto_chan_rx_ops_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 599 { 600 if (!rx_ops) 601 return; 602 rx_ops->dfs_get_precac_chan_state_for_freq = 603 ucfg_dfs_get_precac_chan_state_for_freq; 604 } 605 #else 606 static inline void 607 register_precac_auto_chan_rx_ops_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 608 { 609 } 610 #endif 611 #endif 612 613 #ifdef DFS_COMPONENT_ENABLE 614 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT 615 static inline void 616 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 617 { 618 if (!rx_ops) 619 return; 620 rx_ops->dfs_set_precac_intermediate_chan = 621 ucfg_dfs_set_precac_intermediate_chan; 622 rx_ops->dfs_get_precac_intermediate_chan = 623 ucfg_dfs_get_precac_intermediate_chan; 624 } 625 #else 626 static inline void 627 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 628 { 629 } 630 #endif 631 632 /* 633 * register_dfs_rx_ops_for_freq() - Register DFS rx ops for frequency based 634 * channel APIs. 635 * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 636 */ 637 #ifdef CONFIG_CHAN_FREQ_API 638 static void register_dfs_rx_ops_for_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 639 { 640 if (!rx_ops) 641 return; 642 rx_ops->dfs_set_current_channel_for_freq = 643 tgt_dfs_set_current_channel_for_freq; 644 } 645 #endif 646 647 /* 648 * register_rcac_dfs_rx_ops() - Register DFS RX-Ops for RCAC specific 649 * APIs. 650 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 651 */ 652 #ifdef QCA_SUPPORT_ADFS_RCAC 653 static void register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 654 { 655 if (!rx_ops) 656 return; 657 rx_ops->dfs_set_rcac_enable = ucfg_dfs_set_rcac_enable; 658 rx_ops->dfs_get_rcac_enable = ucfg_dfs_get_rcac_enable; 659 rx_ops->dfs_set_rcac_freq = ucfg_dfs_set_rcac_freq; 660 rx_ops->dfs_get_rcac_freq = ucfg_dfs_get_rcac_freq; 661 rx_ops->dfs_is_agile_rcac_enabled = ucfg_dfs_is_agile_rcac_enabled; 662 } 663 #else 664 static inline void 665 register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 666 { 667 } 668 #endif 669 670 /* 671 * register_agile_dfs_rx_ops() - Register Rx-Ops for Agile Specific APIs 672 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 673 */ 674 #ifdef QCA_SUPPORT_AGILE_DFS 675 static void register_agile_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 676 { 677 if (!rx_ops) 678 return; 679 rx_ops->dfs_agile_sm_deliver_evt = utils_dfs_agile_sm_deliver_evt; 680 } 681 #else 682 static inline void 683 register_agile_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 684 { 685 } 686 #endif 687 688 #ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL 689 /* register_dfs_chan_postnol_rx_ops() - Register DFS Rx-Ops for postNOL 690 * channel change APIs. 691 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 692 */ 693 static void 694 register_dfs_chan_postnol_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 695 { 696 if (!rx_ops) 697 return; 698 699 rx_ops->dfs_set_postnol_freq = ucfg_dfs_set_postnol_freq; 700 rx_ops->dfs_set_postnol_mode = ucfg_dfs_set_postnol_mode; 701 rx_ops->dfs_set_postnol_cfreq2 = ucfg_dfs_set_postnol_cfreq2; 702 rx_ops->dfs_get_postnol_freq = ucfg_dfs_get_postnol_freq; 703 rx_ops->dfs_get_postnol_mode = ucfg_dfs_get_postnol_mode; 704 rx_ops->dfs_get_postnol_cfreq2 = ucfg_dfs_get_postnol_cfreq2; 705 } 706 #else 707 static inline void 708 register_dfs_chan_postnol_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 709 { 710 } 711 #endif 712 713 #ifdef QCA_DFS_BW_EXPAND 714 /* register_dfs_bw_expand_rx_ops() - Register DFS Rx-Ops for BW Expand 715 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 716 */ 717 static void 718 register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 719 { 720 if (!rx_ops) 721 return; 722 723 rx_ops->dfs_set_bw_expand = ucfg_dfs_set_bw_expand; 724 rx_ops->dfs_get_bw_expand = ucfg_dfs_get_bw_expand; 725 } 726 #else 727 static inline void 728 register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 729 { 730 } 731 #endif 732 733 #if defined(QCA_DFS_BW_PUNCTURE) && !defined(CONFIG_REG_CLIENT) 734 /* register_dfs_puncture_rx_ops() - Register DFS Rx-Ops for DFS puncture. 735 * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops. 736 */ 737 static void 738 register_dfs_puncture_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 739 { 740 if (!rx_ops) 741 return; 742 743 rx_ops->dfs_set_dfs_puncture = ucfg_dfs_set_dfs_puncture; 744 rx_ops->dfs_get_dfs_puncture = ucfg_dfs_get_dfs_puncture; 745 } 746 #else 747 static inline void 748 register_dfs_puncture_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops) 749 { 750 } 751 #endif 752 753 #ifdef WLAN_MGMT_RX_REO_SUPPORT 754 static QDF_STATUS 755 wlan_lmac_if_mgmt_rx_reo_rx_ops_register( 756 struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops) 757 { 758 struct wlan_lmac_if_mgmt_rx_reo_rx_ops *mgmt_rx_reo_rx_ops; 759 760 mgmt_rx_reo_rx_ops = &mgmt_txrx_rx_ops->mgmt_rx_reo_rx_ops; 761 mgmt_rx_reo_rx_ops->fw_consumed_event_handler = 762 tgt_mgmt_rx_reo_fw_consumed_event_handler; 763 mgmt_rx_reo_rx_ops->host_drop_handler = 764 tgt_mgmt_rx_reo_host_drop_handler; 765 mgmt_rx_reo_rx_ops->release_frames = tgt_mgmt_rx_reo_release_frames; 766 767 return QDF_STATUS_SUCCESS; 768 } 769 #else 770 static QDF_STATUS 771 wlan_lmac_if_mgmt_rx_reo_rx_ops_register( 772 struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops) 773 { 774 return QDF_STATUS_SUCCESS; 775 } 776 #endif 777 778 static QDF_STATUS 779 wlan_lmac_if_mgmt_txrx_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 780 { 781 struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops; 782 783 if (!rx_ops) { 784 qdf_print("lmac if rx ops pointer is NULL"); 785 return QDF_STATUS_E_NULL_VALUE; 786 } 787 788 /* mgmt txrx rx ops */ 789 mgmt_txrx_rx_ops = &rx_ops->mgmt_txrx_rx_ops; 790 791 mgmt_txrx_rx_ops->mgmt_tx_completion_handler = 792 tgt_mgmt_txrx_tx_completion_handler; 793 mgmt_txrx_rx_ops->mgmt_rx_frame_handler = 794 tgt_mgmt_txrx_rx_frame_handler; 795 mgmt_txrx_rx_ops->mgmt_txrx_get_nbuf_from_desc_id = 796 tgt_mgmt_txrx_get_nbuf_from_desc_id; 797 mgmt_txrx_rx_ops->mgmt_txrx_get_peer_from_desc_id = 798 tgt_mgmt_txrx_get_peer_from_desc_id; 799 mgmt_txrx_rx_ops->mgmt_txrx_get_vdev_id_from_desc_id = 800 tgt_mgmt_txrx_get_vdev_id_from_desc_id; 801 mgmt_txrx_rx_ops->mgmt_txrx_get_free_desc_pool_count = 802 tgt_mgmt_txrx_get_free_desc_pool_count; 803 mgmt_txrx_rx_ops->mgmt_rx_frame_entry = 804 tgt_mgmt_txrx_rx_frame_entry; 805 806 return wlan_lmac_if_mgmt_rx_reo_rx_ops_register(mgmt_txrx_rx_ops); 807 } 808 809 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 810 static void dfs_action_on_status_assign( 811 struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops) 812 { 813 dfs_rx_ops->dfs_action_on_status = tgt_dfs_action_on_status_from_fw; 814 } 815 #else 816 static inline void dfs_action_on_status_assign( 817 struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops) 818 { 819 } 820 #endif 821 822 static QDF_STATUS 823 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 824 { 825 struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops; 826 827 dfs_rx_ops = &rx_ops->dfs_rx_ops; 828 829 dfs_rx_ops->dfs_get_radars = tgt_dfs_get_radars; 830 dfs_rx_ops->dfs_process_phyerr = tgt_dfs_process_phyerr; 831 dfs_rx_ops->dfs_destroy_object = tgt_dfs_destroy_object; 832 dfs_rx_ops->dfs_radar_enable = tgt_dfs_radar_enable; 833 dfs_rx_ops->dfs_is_radar_enabled = tgt_dfs_is_radar_enabled; 834 dfs_rx_ops->dfs_control = tgt_dfs_control; 835 dfs_rx_ops->dfs_is_precac_timer_running = 836 tgt_dfs_is_precac_timer_running; 837 dfs_rx_ops->dfs_agile_precac_start = 838 tgt_dfs_agile_precac_start; 839 dfs_rx_ops->dfs_set_agile_precac_state = 840 tgt_dfs_set_agile_precac_state; 841 dfs_rx_ops->dfs_start_precac_timer = utils_dfs_start_precac_timer; 842 dfs_rx_ops->dfs_cancel_precac_timer = utils_dfs_cancel_precac_timer; 843 dfs_rx_ops->dfs_reset_adfs_config = ucfg_dfs_reset_agile_config; 844 dfs_rx_ops->dfs_override_precac_timeout = 845 ucfg_dfs_override_precac_timeout; 846 dfs_rx_ops->dfs_set_precac_enable = ucfg_dfs_set_precac_enable; 847 dfs_rx_ops->dfs_get_agile_precac_enable = 848 ucfg_dfs_get_agile_precac_enable; 849 dfs_rx_ops->dfs_get_override_precac_timeout = 850 ucfg_dfs_get_override_precac_timeout; 851 dfs_rx_ops->dfs_process_radar_ind = tgt_dfs_process_radar_ind; 852 dfs_rx_ops->dfs_dfs_cac_complete_ind = tgt_dfs_cac_complete; 853 dfs_rx_ops->dfs_dfs_ocac_complete_ind = tgt_dfs_ocac_complete; 854 dfs_rx_ops->dfs_stop = tgt_dfs_stop; 855 dfs_rx_ops->dfs_reinit_timers = ucfg_dfs_reinit_timers; 856 dfs_rx_ops->dfs_enable_stadfs = tgt_dfs_enable_stadfs; 857 dfs_rx_ops->dfs_is_stadfs_enabled = tgt_dfs_is_stadfs_enabled; 858 dfs_rx_ops->dfs_process_phyerr_filter_offload = 859 tgt_dfs_process_phyerr_filter_offload; 860 dfs_rx_ops->dfs_is_phyerr_filter_offload = 861 tgt_dfs_is_phyerr_filter_offload; 862 863 dfs_action_on_status_assign(dfs_rx_ops); 864 865 dfs_rx_ops->dfs_override_status_timeout = 866 ucfg_dfs_set_override_status_timeout; 867 dfs_rx_ops->dfs_get_override_status_timeout = 868 ucfg_dfs_get_override_status_timeout; 869 dfs_rx_ops->dfs_reset_spoof_test = 870 tgt_dfs_reset_spoof_test; 871 dfs_rx_ops->dfs_is_disable_radar_marking_set = 872 utils_dfs_get_disable_radar_marking; 873 dfs_rx_ops->dfs_set_nol_subchannel_marking = 874 ucfg_dfs_set_nol_subchannel_marking; 875 dfs_rx_ops->dfs_get_nol_subchannel_marking = 876 ucfg_dfs_get_nol_subchannel_marking; 877 dfs_rx_ops->dfs_set_bw_reduction = 878 utils_dfs_bw_reduce; 879 dfs_rx_ops->dfs_is_bw_reduction_needed = 880 utils_dfs_is_bw_reduce; 881 dfs_rx_ops->dfs_allow_hw_pulses = 882 ucfg_dfs_allow_hw_pulses; 883 dfs_rx_ops->dfs_is_hw_pulses_allowed = 884 ucfg_dfs_is_hw_pulses_allowed; 885 dfs_rx_ops->dfs_set_fw_adfs_support = 886 tgt_dfs_set_fw_adfs_support; 887 dfs_rx_ops->dfs_reset_dfs_prevchan = 888 utils_dfs_reset_dfs_prevchan; 889 dfs_rx_ops->dfs_init_tmp_psoc_nol = 890 tgt_dfs_init_tmp_psoc_nol; 891 dfs_rx_ops->dfs_deinit_tmp_psoc_nol = 892 tgt_dfs_deinit_tmp_psoc_nol; 893 dfs_rx_ops->dfs_save_dfs_nol_in_psoc = 894 tgt_dfs_save_dfs_nol_in_psoc; 895 dfs_rx_ops->dfs_reinit_nol_from_psoc_copy = 896 tgt_dfs_reinit_nol_from_psoc_copy; 897 dfs_rx_ops->dfs_reinit_precac_lists = 898 tgt_dfs_reinit_precac_lists; 899 dfs_rx_ops->dfs_complete_deferred_tasks = 900 tgt_dfs_complete_deferred_tasks; 901 register_precac_auto_chan_rx_ops(dfs_rx_ops); 902 register_precac_auto_chan_rx_ops_freq(dfs_rx_ops); 903 register_dfs_rx_ops_for_freq(dfs_rx_ops); 904 register_rcac_dfs_rx_ops(dfs_rx_ops); 905 register_agile_dfs_rx_ops(dfs_rx_ops); 906 register_dfs_chan_postnol_rx_ops(dfs_rx_ops); 907 register_dfs_bw_expand_rx_ops(dfs_rx_ops); 908 register_dfs_puncture_rx_ops(dfs_rx_ops); 909 910 return QDF_STATUS_SUCCESS; 911 } 912 #else 913 static QDF_STATUS 914 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 915 { 916 return QDF_STATUS_SUCCESS; 917 } 918 #endif 919 920 #ifdef FEATURE_WLAN_TDLS 921 static QDF_STATUS 922 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 923 { 924 rx_ops->tdls_rx_ops.tdls_ev_handler = tgt_tdls_event_handler; 925 926 return QDF_STATUS_SUCCESS; 927 } 928 #else 929 static QDF_STATUS 930 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 931 { 932 return QDF_STATUS_SUCCESS; 933 } 934 #endif 935 936 #ifdef WLAN_SUPPORT_GREEN_AP 937 static QDF_STATUS 938 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 939 { 940 rx_ops->green_ap_rx_ops.is_ps_enabled = wlan_green_ap_is_ps_enabled; 941 rx_ops->green_ap_rx_ops.is_dbg_print_enabled = 942 ucfg_green_ap_get_debug_prints; 943 rx_ops->green_ap_rx_ops.ps_set = ucfg_green_ap_set_ps_config; 944 rx_ops->green_ap_rx_ops.ps_get = ucfg_green_ap_get_ps_config; 945 rx_ops->green_ap_rx_ops.suspend_handle = wlan_green_ap_suspend_handle; 946 947 return QDF_STATUS_SUCCESS; 948 } 949 #else 950 static QDF_STATUS 951 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 952 { 953 return QDF_STATUS_SUCCESS; 954 } 955 #endif 956 957 #ifdef QCA_WIFI_FTM 958 static QDF_STATUS 959 wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 960 { 961 struct wlan_lmac_if_ftm_rx_ops *ftm_rx_ops; 962 963 ftm_rx_ops = &rx_ops->ftm_rx_ops; 964 965 ftm_rx_ops->ftm_ev_handler = wlan_ftm_process_utf_event; 966 967 return QDF_STATUS_SUCCESS; 968 } 969 #else 970 static QDF_STATUS 971 wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 972 { 973 return QDF_STATUS_SUCCESS; 974 } 975 #endif 976 977 #ifdef WLAN_FEATURE_11BE_MLO 978 #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE 979 static inline void 980 wlan_lmac_if_mlo_rx_link_switch_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 981 { 982 rx_ops->mlo_rx_ops.mlo_link_switch_request_handler = 983 mlo_mgr_link_switch_request_params; 984 } 985 #else 986 static inline void 987 wlan_lmac_if_mlo_rx_link_switch_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 988 { 989 } 990 #endif /* WLAN_FEATURE_11BE_MLO_ADV_FEATURE */ 991 992 /** 993 * wlan_lmac_if_mlo_mgr_rx_ops_register() - API to register mlo mgr Rx Ops 994 * @rx_ops: pointer to lmac rx ops 995 * 996 * This API will be used to register function pointers for FW events 997 * 998 * Return: void 999 */ 1000 static void 1001 wlan_lmac_if_mlo_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 1002 { 1003 /* register handler for received mlo related events */ 1004 rx_ops->mlo_rx_ops.process_link_set_active_resp = 1005 mlo_process_link_set_active_resp; 1006 rx_ops->mlo_rx_ops.process_mlo_vdev_tid_to_link_map_event = 1007 wlan_mlo_vdev_tid_to_link_map_event; 1008 rx_ops->mlo_rx_ops.process_mlo_link_state_info_event = 1009 wlan_handle_ml_link_state_info_event; 1010 rx_ops->mlo_rx_ops.mlo_link_disable_request_handler = 1011 wlan_mlo_link_disable_request_handler; 1012 1013 wlan_lmac_if_mlo_rx_link_switch_ops_register(rx_ops); 1014 } 1015 #else 1016 static void 1017 wlan_lmac_if_mlo_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 1018 { 1019 } 1020 #endif /* WLAN_FEATURE_11BE_MLO */ 1021 1022 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED) 1023 static 1024 void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 1025 { 1026 tgt_twt_register_rx_ops(rx_ops); 1027 } 1028 #else 1029 static 1030 void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 1031 { 1032 } 1033 #endif /* WLAN_SUPPORT_TWT && WLAN_TWT_CONV_SUPPORTED */ 1034 1035 #ifdef WLAN_FEATURE_DBAM_CONFIG 1036 static void 1037 wlan_lmac_if_dbam_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 1038 { 1039 rx_ops->dbam_rx_ops.dbam_resp_event = target_if_dbam_process_event; 1040 } 1041 #else 1042 static void 1043 wlan_lmac_if_dbam_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 1044 { 1045 } 1046 #endif /* WLAN_FEATURE_DBAM_CONFIG */ 1047 1048 /** 1049 * wlan_lmac_if_umac_rx_ops_register() - UMAC rx handler register 1050 * @rx_ops: Pointer to rx_ops structure to be populated 1051 * 1052 * Register umac RX callabacks which will be called by DA/OL/WMA/WMI 1053 * 1054 * Return: QDF_STATUS_SUCCESS - in case of success 1055 */ 1056 QDF_STATUS 1057 wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) 1058 { 1059 /* Component specific public api's to be called to register 1060 * respective callbacks 1061 * Ex: rx_ops->fp = function; 1062 */ 1063 1064 if (!rx_ops) { 1065 qdf_print("lmac if rx ops pointer is NULL"); 1066 return QDF_STATUS_E_INVAL; 1067 } 1068 1069 wlan_lmac_if_mgmt_txrx_rx_ops_register(rx_ops); 1070 1071 /* scan rx ops */ 1072 rx_ops->scan.scan_ev_handler = tgt_scan_event_handler; 1073 rx_ops->scan.scan_set_max_active_scans = tgt_scan_set_max_active_scans; 1074 1075 wlan_lmac_if_atf_rx_ops_register(rx_ops); 1076 1077 wlan_lmac_if_cp_stats_rx_ops_register(rx_ops); 1078 1079 wlan_target_if_dcs_rx_ops_register(rx_ops); 1080 1081 wlan_lmac_if_sa_api_rx_ops_register(rx_ops); 1082 1083 wlan_lmac_if_cfr_rx_ops_register(rx_ops); 1084 1085 wlan_lmac_if_crypto_rx_ops_register(rx_ops); 1086 /* wifi_pos rx ops */ 1087 wlan_lmac_if_umac_rx_ops_register_wifi_pos(rx_ops); 1088 1089 /* tdls rx ops */ 1090 wlan_lmac_if_umac_tdls_rx_ops_register(rx_ops); 1091 1092 wlan_lmac_if_umac_reg_rx_ops_register(rx_ops); 1093 1094 /* p2p rx ops */ 1095 wlan_lmac_if_umac_rx_ops_register_p2p(rx_ops); 1096 1097 /* DFS rx_ops */ 1098 wlan_lmac_if_umac_dfs_rx_ops_register(rx_ops); 1099 1100 wlan_lmac_if_umac_green_ap_rx_ops_register(rx_ops); 1101 1102 /* FTM rx_ops */ 1103 wlan_lmac_if_umac_ftm_rx_ops_register(rx_ops); 1104 1105 /* FILS Discovery */ 1106 wlan_lmac_if_fd_rx_ops_register(rx_ops); 1107 1108 /* MLME rx_ops */ 1109 tgt_vdev_mgr_rx_ops_register(rx_ops); 1110 1111 wlan_lmac_if_mlo_mgr_rx_ops_register(rx_ops); 1112 1113 wlan_lmac_if_twt_rx_ops_register(rx_ops); 1114 1115 wlan_lmac_if_dbam_rx_ops_register(rx_ops); 1116 1117 return QDF_STATUS_SUCCESS; 1118 } 1119 1120 QDF_STATUS wlan_lmac_if_set_umac_txops_registration_cb(QDF_STATUS (*handler) 1121 (struct wlan_lmac_if_tx_ops *)) 1122 { 1123 wlan_lmac_if_umac_tx_ops_register = handler; 1124 return QDF_STATUS_SUCCESS; 1125 } 1126 qdf_export_symbol(wlan_lmac_if_set_umac_txops_registration_cb); 1127 1128 QDF_STATUS wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb( 1129 QDF_STATUS (*handler)(struct wlan_lmac_if_rx_ops *)) 1130 { 1131 wlan_lmac_if_umac_crypto_rxpn_ops_register = handler; 1132 return QDF_STATUS_SUCCESS; 1133 } 1134 qdf_export_symbol(wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb); 1135