qcacmn: Register monitor feature ops after mon object initialization

Register monitor dependent feature ops after monitor
object initialization to avoid race condition

Change-Id: Ia7973cdc2660c65f8afb708d251b7a1ec09c573c
CRs-Fixed: 3074789
This commit is contained in:
Jeevan Kukkalli
2021-11-23 21:19:34 +05:30
committed by Madan Koyyalamudi
parent 45be95484a
commit 6057057ee1
4 changed files with 257 additions and 193 deletions

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, The Linux Foundation. All rights reserved. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@@ -3211,6 +3212,122 @@ static void dp_mon_register_intr_ops_1_0(struct dp_soc *soc)
} }
#endif #endif
/**
* dp_mon_register_feature_ops_1_0() - register feature ops
*
* @soc: dp soc context
*
* @return: void
*/
static void
dp_mon_register_feature_ops_1_0(struct dp_soc *soc)
{
struct dp_mon_ops *mon_ops = dp_mon_ops_get(soc);
if (!mon_ops) {
dp_err("mon_ops is NULL, feature ops registration failed");
return;
}
mon_ops->mon_config_debug_sniffer = dp_config_debug_sniffer;
mon_ops->mon_peer_tx_init = dp_peer_tx_init;
mon_ops->mon_peer_tx_cleanup = dp_peer_tx_cleanup;
mon_ops->mon_htt_ppdu_stats_attach = dp_htt_ppdu_stats_attach;
mon_ops->mon_htt_ppdu_stats_detach = dp_htt_ppdu_stats_detach;
mon_ops->mon_print_pdev_rx_mon_stats = dp_print_pdev_rx_mon_stats;
mon_ops->mon_set_bsscolor = dp_mon_set_bsscolor;
mon_ops->mon_pdev_get_filter_ucast_data =
dp_pdev_get_filter_ucast_data;
mon_ops->mon_pdev_get_filter_mcast_data =
dp_pdev_get_filter_mcast_data;
mon_ops->mon_pdev_get_filter_non_data = dp_pdev_get_filter_non_data;
mon_ops->mon_neighbour_peer_add_ast = dp_mon_neighbour_peer_add_ast;
#ifdef WLAN_TX_PKT_CAPTURE_ENH
mon_ops->mon_peer_tid_peer_id_update = dp_peer_tid_peer_id_update;
mon_ops->mon_tx_ppdu_stats_attach = dp_tx_ppdu_stats_attach;
mon_ops->mon_tx_ppdu_stats_detach = dp_tx_ppdu_stats_detach;
mon_ops->mon_tx_capture_debugfs_init = dp_tx_capture_debugfs_init;
mon_ops->mon_tx_add_to_comp_queue = dp_tx_add_to_comp_queue;
mon_ops->mon_peer_tx_capture_filter_check =
dp_peer_tx_capture_filter_check;
mon_ops->mon_print_pdev_tx_capture_stats =
dp_print_pdev_tx_capture_stats;
mon_ops->mon_config_enh_tx_capture = dp_config_enh_tx_capture;
#endif
#if defined(WDI_EVENT_ENABLE) &&\
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
mon_ops->mon_ppdu_stats_ind_handler = dp_ppdu_stats_ind_handler;
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
mon_ops->mon_config_enh_rx_capture = dp_config_enh_rx_capture;
#endif
#ifdef QCA_SUPPORT_BPR
mon_ops->mon_set_bpr_enable = dp_set_bpr_enable_1_0;
#endif
#ifdef ATH_SUPPORT_NAC
mon_ops->mon_set_filter_neigh_peers = dp_set_filter_neigh_peers;
#endif
#ifdef WLAN_ATF_ENABLE
mon_ops->mon_set_atf_stats_enable = dp_set_atf_stats_enable;
#endif
#ifdef FEATURE_NAC_RSSI
mon_ops->mon_filter_neighbour_peer = dp_filter_neighbour_peer;
#endif
#ifdef QCA_MCOPY_SUPPORT
mon_ops->mon_filter_setup_mcopy_mode =
dp_mon_filter_setup_mcopy_mode_1_0;
mon_ops->mon_filter_reset_mcopy_mode =
dp_mon_filter_reset_mcopy_mode_1_0;
mon_ops->mon_mcopy_check_deliver = dp_mcopy_check_deliver;
#endif
#ifdef QCA_ENHANCED_STATS_SUPPORT
mon_ops->mon_filter_setup_enhanced_stats =
dp_mon_filter_setup_enhanced_stats_1_0;
mon_ops->mon_filter_reset_enhanced_stats =
dp_mon_filter_reset_enhanced_stats_1_0;
#endif
#if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC)
mon_ops->mon_filter_setup_smart_monitor =
dp_mon_filter_setup_smart_monitor_1_0;
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
mon_ops->mon_filter_setup_rx_enh_capture =
dp_mon_filter_setup_rx_enh_capture_1_0;
#endif
#ifdef WDI_EVENT_ENABLE
mon_ops->mon_set_pktlog_wifi3 = dp_set_pktlog_wifi3;
mon_ops->mon_filter_setup_rx_pkt_log_full =
dp_mon_filter_setup_rx_pkt_log_full_1_0;
mon_ops->mon_filter_reset_rx_pkt_log_full =
dp_mon_filter_reset_rx_pkt_log_full_1_0;
mon_ops->mon_filter_setup_rx_pkt_log_lite =
dp_mon_filter_setup_rx_pkt_log_lite_1_0;
mon_ops->mon_filter_reset_rx_pkt_log_lite =
dp_mon_filter_reset_rx_pkt_log_lite_1_0;
mon_ops->mon_filter_setup_rx_pkt_log_cbf =
dp_mon_filter_setup_rx_pkt_log_cbf_1_0;
mon_ops->mon_filter_reset_rx_pkt_log_cbf =
dp_mon_filter_reset_rx_pktlog_cbf_1_0;
#ifdef QCA_WIFI_QCN9224
mon_ops->mon_filter_setup_pktlog_hybrid =
dp_mon_filter_setup_pktlog_hybrid_1_0;
mon_ops->mon_filter_reset_pktlog_hybrid =
dp_mon_filter_reset_pktlog_hybrid_1_0;
#endif
#endif
#if defined(DP_CON_MON) && !defined(REMOVE_PKT_LOG)
mon_ops->mon_pktlogmod_exit = dp_pktlogmod_exit;
#endif
mon_ops->rx_packet_length_set = NULL;
mon_ops->rx_wmask_subscribe = NULL;
mon_ops->rx_enable_mpdu_logging = NULL;
mon_ops->mon_neighbour_peers_detach = dp_neighbour_peers_detach;
mon_ops->mon_vdev_set_monitor_mode_buf_rings =
dp_vdev_set_monitor_mode_buf_rings;
mon_ops->mon_vdev_set_monitor_mode_rings =
dp_vdev_set_monitor_mode_rings;
}
struct dp_mon_ops monitor_ops_1_0 = { struct dp_mon_ops monitor_ops_1_0 = {
.mon_soc_cfg_init = dp_mon_soc_cfg_init, .mon_soc_cfg_init = dp_mon_soc_cfg_init,
.mon_pdev_alloc = NULL, .mon_pdev_alloc = NULL,
@@ -3223,7 +3340,6 @@ struct dp_mon_ops monitor_ops_1_0 = {
.mon_vdev_detach = dp_mon_vdev_detach, .mon_vdev_detach = dp_mon_vdev_detach,
.mon_peer_attach = dp_mon_peer_attach, .mon_peer_attach = dp_mon_peer_attach,
.mon_peer_detach = dp_mon_peer_detach, .mon_peer_detach = dp_mon_peer_detach,
.mon_config_debug_sniffer = dp_config_debug_sniffer,
.mon_flush_rings = dp_flush_monitor_rings, .mon_flush_rings = dp_flush_monitor_rings,
#if !defined(DISABLE_MON_CONFIG) #if !defined(DISABLE_MON_CONFIG)
.mon_pdev_htt_srng_setup = dp_mon_htt_srng_setup_1_0, .mon_pdev_htt_srng_setup = dp_mon_htt_srng_setup_1_0,
@@ -3236,58 +3352,6 @@ struct dp_mon_ops monitor_ops_1_0 = {
#endif #endif
#if !defined(DISABLE_MON_CONFIG) && defined(MON_ENABLE_DROP_FOR_MAC) #if !defined(DISABLE_MON_CONFIG) && defined(MON_ENABLE_DROP_FOR_MAC)
.mon_drop_packets_for_mac = dp_mon_drop_packets_for_mac, .mon_drop_packets_for_mac = dp_mon_drop_packets_for_mac,
#endif
.mon_peer_tx_init = dp_peer_tx_init,
.mon_peer_tx_cleanup = dp_peer_tx_cleanup,
#ifdef WLAN_TX_PKT_CAPTURE_ENH
.mon_peer_tid_peer_id_update = dp_peer_tid_peer_id_update,
.mon_tx_ppdu_stats_attach = dp_tx_ppdu_stats_attach,
.mon_tx_ppdu_stats_detach = dp_tx_ppdu_stats_detach,
.mon_tx_capture_debugfs_init = dp_tx_capture_debugfs_init,
.mon_tx_add_to_comp_queue = dp_tx_add_to_comp_queue,
.mon_peer_tx_capture_filter_check = dp_peer_tx_capture_filter_check,
#endif
#if defined(WDI_EVENT_ENABLE) &&\
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
.mon_ppdu_stats_ind_handler = dp_ppdu_stats_ind_handler,
#endif
.mon_htt_ppdu_stats_attach = dp_htt_ppdu_stats_attach,
.mon_htt_ppdu_stats_detach = dp_htt_ppdu_stats_detach,
.mon_print_pdev_rx_mon_stats = dp_print_pdev_rx_mon_stats,
#ifdef WLAN_TX_PKT_CAPTURE_ENH
.mon_print_pdev_tx_capture_stats = dp_print_pdev_tx_capture_stats,
.mon_config_enh_tx_capture = dp_config_enh_tx_capture,
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
.mon_config_enh_rx_capture = dp_config_enh_rx_capture,
#endif
#ifdef QCA_SUPPORT_BPR
.mon_set_bpr_enable = dp_set_bpr_enable_1_0,
#endif
#ifdef ATH_SUPPORT_NAC
.mon_set_filter_neigh_peers = dp_set_filter_neigh_peers,
#endif
#ifdef WLAN_ATF_ENABLE
.mon_set_atf_stats_enable = dp_set_atf_stats_enable,
#endif
.mon_set_bsscolor = dp_mon_set_bsscolor,
.mon_pdev_get_filter_ucast_data = dp_pdev_get_filter_ucast_data,
.mon_pdev_get_filter_mcast_data = dp_pdev_get_filter_mcast_data,
.mon_pdev_get_filter_non_data = dp_pdev_get_filter_non_data,
#ifdef WDI_EVENT_ENABLE
.mon_set_pktlog_wifi3 = dp_set_pktlog_wifi3,
#endif
#if defined(DP_CON_MON) && !defined(REMOVE_PKT_LOG)
.mon_pktlogmod_exit = dp_pktlogmod_exit,
#endif
.mon_vdev_set_monitor_mode_buf_rings =
dp_vdev_set_monitor_mode_buf_rings,
.mon_vdev_set_monitor_mode_rings =
dp_vdev_set_monitor_mode_rings,
.mon_neighbour_peers_detach = dp_neighbour_peers_detach,
#ifdef FEATURE_NAC_RSSI
.mon_filter_neighbour_peer = dp_filter_neighbour_peer,
#endif #endif
.mon_vdev_timer_init = dp_mon_vdev_timer_init, .mon_vdev_timer_init = dp_mon_vdev_timer_init,
.mon_vdev_timer_start = dp_mon_vdev_timer_start, .mon_vdev_timer_start = dp_mon_vdev_timer_start,
@@ -3297,49 +3361,8 @@ struct dp_mon_ops monitor_ops_1_0 = {
.mon_reap_timer_start = dp_mon_reap_timer_start, .mon_reap_timer_start = dp_mon_reap_timer_start,
.mon_reap_timer_stop = dp_mon_reap_timer_stop, .mon_reap_timer_stop = dp_mon_reap_timer_stop,
.mon_reap_timer_deinit = dp_mon_reap_timer_deinit, .mon_reap_timer_deinit = dp_mon_reap_timer_deinit,
#ifdef QCA_MCOPY_SUPPORT
.mon_mcopy_check_deliver = dp_mcopy_check_deliver,
#endif
.mon_neighbour_peer_add_ast = dp_mon_neighbour_peer_add_ast,
#ifdef QCA_ENHANCED_STATS_SUPPORT
.mon_filter_setup_enhanced_stats =
dp_mon_filter_setup_enhanced_stats_1_0,
.mon_filter_reset_enhanced_stats =
dp_mon_filter_reset_enhanced_stats_1_0,
#endif
#ifdef QCA_MCOPY_SUPPORT
.mon_filter_setup_mcopy_mode = dp_mon_filter_setup_mcopy_mode_1_0,
.mon_filter_reset_mcopy_mode = dp_mon_filter_reset_mcopy_mode_1_0,
#endif
#if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC)
.mon_filter_setup_smart_monitor = dp_mon_filter_setup_smart_monitor_1_0,
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
.mon_filter_setup_rx_enh_capture =
dp_mon_filter_setup_rx_enh_capture_1_0,
#endif
.mon_filter_setup_mon_mode = dp_mon_filter_setup_mon_mode_1_0, .mon_filter_setup_mon_mode = dp_mon_filter_setup_mon_mode_1_0,
.mon_filter_reset_mon_mode = dp_mon_filter_reset_mon_mode_1_0, .mon_filter_reset_mon_mode = dp_mon_filter_reset_mon_mode_1_0,
#ifdef WDI_EVENT_ENABLE
.mon_filter_setup_rx_pkt_log_full =
dp_mon_filter_setup_rx_pkt_log_full_1_0,
.mon_filter_reset_rx_pkt_log_full =
dp_mon_filter_reset_rx_pkt_log_full_1_0,
.mon_filter_setup_rx_pkt_log_lite =
dp_mon_filter_setup_rx_pkt_log_lite_1_0,
.mon_filter_reset_rx_pkt_log_lite =
dp_mon_filter_reset_rx_pkt_log_lite_1_0,
.mon_filter_setup_rx_pkt_log_cbf =
dp_mon_filter_setup_rx_pkt_log_cbf_1_0,
.mon_filter_reset_rx_pkt_log_cbf =
dp_mon_filter_reset_rx_pktlog_cbf_1_0,
#ifdef QCA_WIFI_QCN9224
.mon_filter_setup_pktlog_hybrid =
dp_mon_filter_setup_pktlog_hybrid_1_0,
.mon_filter_reset_pktlog_hybrid =
dp_mon_filter_reset_pktlog_hybrid_1_0,
#endif
#endif
.mon_filter_update = dp_mon_filter_update_1_0, .mon_filter_update = dp_mon_filter_update_1_0,
.rx_mon_desc_pool_init = dp_rx_pdev_mon_desc_pool_init, .rx_mon_desc_pool_init = dp_rx_pdev_mon_desc_pool_init,
.rx_mon_desc_pool_deinit = dp_rx_pdev_mon_desc_pool_deinit, .rx_mon_desc_pool_deinit = dp_rx_pdev_mon_desc_pool_deinit,
@@ -3355,12 +3378,10 @@ struct dp_mon_ops monitor_ops_1_0 = {
.mon_rings_free = dp_mon_rings_free_1_0, .mon_rings_free = dp_mon_rings_free_1_0,
.mon_rings_init = dp_mon_rings_init_1_0, .mon_rings_init = dp_mon_rings_init_1_0,
.mon_rings_deinit = dp_mon_rings_deinit_1_0, .mon_rings_deinit = dp_mon_rings_deinit_1_0,
.rx_packet_length_set = NULL,
.rx_wmask_subscribe = NULL,
.rx_enable_mpdu_logging = NULL,
#if !defined(DISABLE_MON_CONFIG) #if !defined(DISABLE_MON_CONFIG)
.mon_register_intr_ops = dp_mon_register_intr_ops_1_0, .mon_register_intr_ops = dp_mon_register_intr_ops_1_0,
#endif #endif
.mon_register_feature_ops = dp_mon_register_feature_ops_1_0,
}; };
struct cdp_mon_ops dp_ops_mon_1_0 = { struct cdp_mon_ops dp_ops_mon_1_0 = {

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, The Linux Foundation. All rights reserved. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@@ -755,6 +756,121 @@ static void dp_mon_register_intr_ops_2_0(struct dp_soc *soc)
mon_soc->mon_rx_process = dp_rx_mon_process_2_0; mon_soc->mon_rx_process = dp_rx_mon_process_2_0;
} }
/**
* dp_mon_register_feature_ops_2_0() - register feature ops
*
* @soc: dp soc context
*
* @return: void
*/
static void
dp_mon_register_feature_ops_2_0(struct dp_soc *soc)
{
struct dp_mon_ops *mon_ops = dp_mon_ops_get(soc);
if (!mon_ops) {
dp_err("mon_ops is NULL, feature ops registration failed");
return;
}
mon_ops->mon_config_debug_sniffer = dp_config_debug_sniffer;
mon_ops->mon_peer_tx_init = NULL;
mon_ops->mon_peer_tx_cleanup = NULL;
mon_ops->mon_htt_ppdu_stats_attach = dp_htt_ppdu_stats_attach;
mon_ops->mon_htt_ppdu_stats_detach = dp_htt_ppdu_stats_detach;
mon_ops->mon_print_pdev_rx_mon_stats = dp_print_pdev_rx_mon_stats;
mon_ops->mon_set_bsscolor = dp_mon_set_bsscolor;
mon_ops->mon_pdev_get_filter_ucast_data =
dp_pdev_get_filter_ucast_data;
mon_ops->mon_pdev_get_filter_mcast_data =
dp_pdev_get_filter_mcast_data;
mon_ops->mon_pdev_get_filter_non_data = dp_pdev_get_filter_non_data;
mon_ops->mon_neighbour_peer_add_ast = NULL;
#ifndef DISABLE_MON_CONFIG
mon_ops->mon_tx_process = dp_tx_mon_process;
#endif
#ifdef WLAN_TX_PKT_CAPTURE_ENH
mon_ops->mon_peer_tid_peer_id_update = NULL;
mon_ops->mon_tx_ppdu_stats_attach = dp_tx_ppdu_stats_attach;
mon_ops->mon_tx_ppdu_stats_detach = dp_tx_ppdu_stats_detach;
mon_ops->mon_tx_capture_debugfs_init = NULL;
mon_ops->mon_tx_add_to_comp_queue = NULL;
mon_ops->mon_peer_tx_capture_filter_check = NULL;
mon_ops->mon_print_pdev_tx_capture_stats = NULL;
mon_ops->mon_config_enh_tx_capture = dp_config_enh_tx_capture;
#endif
#if defined(WDI_EVENT_ENABLE) &&\
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
mon_ops->mon_ppdu_stats_ind_handler = NULL;
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
mon_ops->mon_config_enh_rx_capture = NULL;
#endif
#ifdef QCA_SUPPORT_BPR
mon_ops->mon_set_bpr_enable = dp_set_bpr_enable_2_0;
#endif
#ifdef ATH_SUPPORT_NAC
mon_ops->mon_set_filter_neigh_peers = dp_set_filter_neigh_peers;
#endif
#ifdef WLAN_ATF_ENABLE
mon_ops->mon_set_atf_stats_enable = dp_set_atf_stats_enable;
#endif
#ifdef FEATURE_NAC_RSSI
mon_ops->mon_filter_neighbour_peer = dp_filter_neighbour_peer;
#endif
#ifdef QCA_MCOPY_SUPPORT
mon_ops->mon_filter_setup_mcopy_mode =
dp_mon_filter_setup_mcopy_mode_2_0;
mon_ops->mon_filter_reset_mcopy_mode =
dp_mon_filter_reset_mcopy_mode_2_0;
mon_ops->mon_mcopy_check_deliver = NULL;
#endif
#ifdef QCA_ENHANCED_STATS_SUPPORT
mon_ops->mon_filter_setup_enhanced_stats =
dp_mon_filter_setup_enhanced_stats_2_0;
mon_ops->mon_filter_reset_enhanced_stats =
dp_mon_filter_reset_enhanced_stats_2_0;
#endif
#if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC)
mon_ops->mon_filter_setup_smart_monitor =
dp_mon_filter_setup_smart_monitor_2_0;
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
mon_ops->mon_filter_setup_rx_enh_capture =
dp_mon_filter_setup_rx_enh_capture_2_0;
#endif
#ifdef WDI_EVENT_ENABLE
mon_ops->mon_set_pktlog_wifi3 = dp_set_pktlog_wifi3;
mon_ops->mon_filter_setup_rx_pkt_log_full =
dp_mon_filter_setup_rx_pkt_log_full_2_0;
mon_ops->mon_filter_reset_rx_pkt_log_full =
dp_mon_filter_reset_rx_pkt_log_full_2_0;
mon_ops->mon_filter_setup_rx_pkt_log_lite =
dp_mon_filter_setup_rx_pkt_log_lite_2_0;
mon_ops->mon_filter_reset_rx_pkt_log_lite =
dp_mon_filter_reset_rx_pkt_log_lite_2_0;
mon_ops->mon_filter_setup_rx_pkt_log_cbf =
dp_mon_filter_setup_rx_pkt_log_cbf_2_0;
mon_ops->mon_filter_reset_rx_pkt_log_cbf =
dp_mon_filter_reset_rx_pktlog_cbf_2_0;
mon_ops->mon_filter_setup_pktlog_hybrid =
dp_mon_filter_setup_pktlog_hybrid_2_0;
mon_ops->mon_filter_reset_pktlog_hybrid =
dp_mon_filter_reset_pktlog_hybrid_2_0;
#endif
#if defined(DP_CON_MON) && !defined(REMOVE_PKT_LOG)
mon_ops->mon_pktlogmod_exit = dp_pktlogmod_exit;
#endif
mon_ops->rx_packet_length_set = dp_rx_mon_packet_length_set;
mon_ops->rx_wmask_subscribe = dp_rx_mon_word_mask_subscribe;
mon_ops->rx_enable_mpdu_logging = dp_rx_mon_enable_mpdu_logging;
mon_ops->mon_neighbour_peers_detach = dp_neighbour_peers_detach;
mon_ops->mon_vdev_set_monitor_mode_buf_rings =
dp_vdev_set_monitor_mode_buf_rings_2_0;
mon_ops->mon_vdev_set_monitor_mode_rings =
dp_vdev_set_monitor_mode_rings_2_0;
}
struct dp_mon_ops monitor_ops_2_0 = { struct dp_mon_ops monitor_ops_2_0 = {
.mon_soc_cfg_init = dp_mon_soc_cfg_init, .mon_soc_cfg_init = dp_mon_soc_cfg_init,
.mon_soc_attach = dp_mon_soc_attach_2_0, .mon_soc_attach = dp_mon_soc_attach_2_0,
@@ -771,7 +887,6 @@ struct dp_mon_ops monitor_ops_2_0 = {
.mon_vdev_detach = dp_mon_vdev_detach, .mon_vdev_detach = dp_mon_vdev_detach,
.mon_peer_attach = dp_mon_peer_attach, .mon_peer_attach = dp_mon_peer_attach,
.mon_peer_detach = dp_mon_peer_detach, .mon_peer_detach = dp_mon_peer_detach,
.mon_config_debug_sniffer = dp_config_debug_sniffer,
.mon_flush_rings = NULL, .mon_flush_rings = NULL,
#if !defined(DISABLE_MON_CONFIG) #if !defined(DISABLE_MON_CONFIG)
.mon_pdev_htt_srng_setup = dp_mon_pdev_htt_srng_setup_2_0, .mon_pdev_htt_srng_setup = dp_mon_pdev_htt_srng_setup_2_0,
@@ -782,62 +897,9 @@ struct dp_mon_ops monitor_ops_2_0 = {
#endif #endif
#ifndef DISABLE_MON_CONFIG #ifndef DISABLE_MON_CONFIG
.mon_rx_process = NULL, .mon_rx_process = NULL,
.mon_tx_process = dp_tx_mon_process,
#endif #endif
#if !defined(DISABLE_MON_CONFIG) && defined(MON_ENABLE_DROP_FOR_MAC) #if !defined(DISABLE_MON_CONFIG) && defined(MON_ENABLE_DROP_FOR_MAC)
.mon_drop_packets_for_mac = NULL, .mon_drop_packets_for_mac = NULL,
#endif
.mon_peer_tx_init = NULL,
.mon_peer_tx_cleanup = NULL,
#ifdef WLAN_TX_PKT_CAPTURE_ENH
.mon_peer_tid_peer_id_update = NULL,
.mon_tx_ppdu_stats_attach = dp_tx_ppdu_stats_attach,
.mon_tx_ppdu_stats_detach = dp_tx_ppdu_stats_detach,
.mon_tx_capture_debugfs_init = NULL,
.mon_tx_add_to_comp_queue = NULL,
.mon_peer_tx_capture_filter_check = NULL,
#endif
#if defined(WDI_EVENT_ENABLE) &&\
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
.mon_ppdu_stats_ind_handler = NULL,
#endif
.mon_htt_ppdu_stats_attach = dp_htt_ppdu_stats_attach,
.mon_htt_ppdu_stats_detach = dp_htt_ppdu_stats_detach,
.mon_print_pdev_rx_mon_stats = dp_print_pdev_rx_mon_stats,
#ifdef WLAN_TX_PKT_CAPTURE_ENH
.mon_print_pdev_tx_capture_stats = NULL,
.mon_config_enh_tx_capture = dp_config_enh_tx_capture,
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
.mon_config_enh_rx_capture = NULL,
#endif
#ifdef QCA_SUPPORT_BPR
.mon_set_bpr_enable = dp_set_bpr_enable_2_0,
#endif
#ifdef ATH_SUPPORT_NAC
.mon_set_filter_neigh_peers = dp_set_filter_neigh_peers,
#endif
#ifdef WLAN_ATF_ENABLE
.mon_set_atf_stats_enable = dp_set_atf_stats_enable,
#endif
.mon_set_bsscolor = dp_mon_set_bsscolor,
.mon_pdev_get_filter_ucast_data = dp_pdev_get_filter_ucast_data,
.mon_pdev_get_filter_mcast_data = dp_pdev_get_filter_mcast_data,
.mon_pdev_get_filter_non_data = dp_pdev_get_filter_non_data,
#ifdef WDI_EVENT_ENABLE
.mon_set_pktlog_wifi3 = dp_set_pktlog_wifi3,
#endif
#if defined(DP_CON_MON) && !defined(REMOVE_PKT_LOG)
.mon_pktlogmod_exit = dp_pktlogmod_exit,
#endif
.mon_vdev_set_monitor_mode_buf_rings =
dp_vdev_set_monitor_mode_buf_rings_2_0,
.mon_vdev_set_monitor_mode_rings =
dp_vdev_set_monitor_mode_rings_2_0,
.mon_neighbour_peers_detach = dp_neighbour_peers_detach,
#ifdef FEATURE_NAC_RSSI
.mon_filter_neighbour_peer = dp_filter_neighbour_peer,
#endif #endif
.mon_vdev_timer_init = NULL, .mon_vdev_timer_init = NULL,
.mon_vdev_timer_start = NULL, .mon_vdev_timer_start = NULL,
@@ -847,47 +909,8 @@ struct dp_mon_ops monitor_ops_2_0 = {
.mon_reap_timer_start = NULL, .mon_reap_timer_start = NULL,
.mon_reap_timer_stop = NULL, .mon_reap_timer_stop = NULL,
.mon_reap_timer_deinit = NULL, .mon_reap_timer_deinit = NULL,
#ifdef QCA_MCOPY_SUPPORT
.mon_mcopy_check_deliver = NULL,
#endif
.mon_neighbour_peer_add_ast = NULL,
#ifdef QCA_ENHANCED_STATS_SUPPORT
.mon_filter_setup_enhanced_stats =
dp_mon_filter_setup_enhanced_stats_2_0,
.mon_filter_reset_enhanced_stats =
dp_mon_filter_reset_enhanced_stats_2_0,
#endif
#ifdef QCA_MCOPY_SUPPORT
.mon_filter_setup_mcopy_mode = dp_mon_filter_setup_mcopy_mode_2_0,
.mon_filter_reset_mcopy_mode = dp_mon_filter_reset_mcopy_mode_2_0,
#endif
#if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC)
.mon_filter_setup_smart_monitor = dp_mon_filter_setup_smart_monitor_2_0,
#endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH
.mon_filter_setup_rx_enh_capture =
dp_mon_filter_setup_rx_enh_capture_2_0,
#endif
.mon_filter_setup_mon_mode = dp_mon_filter_setup_mon_mode_2_0, .mon_filter_setup_mon_mode = dp_mon_filter_setup_mon_mode_2_0,
.mon_filter_reset_mon_mode = dp_mon_filter_reset_mon_mode_2_0, .mon_filter_reset_mon_mode = dp_mon_filter_reset_mon_mode_2_0,
#ifdef WDI_EVENT_ENABLE
.mon_filter_setup_rx_pkt_log_full =
dp_mon_filter_setup_rx_pkt_log_full_2_0,
.mon_filter_reset_rx_pkt_log_full =
dp_mon_filter_reset_rx_pkt_log_full_2_0,
.mon_filter_setup_rx_pkt_log_lite =
dp_mon_filter_setup_rx_pkt_log_lite_2_0,
.mon_filter_reset_rx_pkt_log_lite =
dp_mon_filter_reset_rx_pkt_log_lite_2_0,
.mon_filter_setup_rx_pkt_log_cbf =
dp_mon_filter_setup_rx_pkt_log_cbf_2_0,
.mon_filter_reset_rx_pkt_log_cbf =
dp_mon_filter_reset_rx_pktlog_cbf_2_0,
.mon_filter_setup_pktlog_hybrid =
dp_mon_filter_setup_pktlog_hybrid_2_0,
.mon_filter_reset_pktlog_hybrid =
dp_mon_filter_reset_pktlog_hybrid_2_0,
#endif
.mon_filter_update = dp_mon_filter_update_2_0, .mon_filter_update = dp_mon_filter_update_2_0,
.mon_rings_alloc = dp_pdev_mon_rings_alloc_2_0, .mon_rings_alloc = dp_pdev_mon_rings_alloc_2_0,
.mon_rings_free = dp_pdev_mon_rings_free_2_0, .mon_rings_free = dp_pdev_mon_rings_free_2_0,
@@ -903,12 +926,10 @@ struct dp_mon_ops monitor_ops_2_0 = {
.tx_mon_desc_pool_deinit = NULL, .tx_mon_desc_pool_deinit = NULL,
.tx_mon_desc_pool_alloc = NULL, .tx_mon_desc_pool_alloc = NULL,
.tx_mon_desc_pool_free = NULL, .tx_mon_desc_pool_free = NULL,
.rx_packet_length_set = dp_rx_mon_packet_length_set,
.rx_wmask_subscribe = dp_rx_mon_word_mask_subscribe,
.rx_enable_mpdu_logging = dp_rx_mon_enable_mpdu_logging,
#ifndef DISABLE_MON_CONFIG #ifndef DISABLE_MON_CONFIG
.mon_register_intr_ops = dp_mon_register_intr_ops_2_0, .mon_register_intr_ops = dp_mon_register_intr_ops_2_0,
#endif #endif
.mon_register_feature_ops = dp_mon_register_feature_ops_1_0,
}; };
struct cdp_mon_ops dp_ops_mon_2_0 = { struct cdp_mon_ops dp_ops_mon_2_0 = {

View File

@@ -2561,6 +2561,7 @@ QDF_STATUS dp_mon_soc_attach(struct dp_soc *soc)
dp_mon_register_intr_ops(soc); dp_mon_register_intr_ops(soc);
dp_mon_cdp_ops_register(soc); dp_mon_cdp_ops_register(soc);
dp_mon_register_feature_ops(soc);
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }

View File

@@ -537,6 +537,7 @@ struct dp_mon_ops {
#ifndef DISABLE_MON_CONFIG #ifndef DISABLE_MON_CONFIG
void (*mon_register_intr_ops)(struct dp_soc *soc); void (*mon_register_intr_ops)(struct dp_soc *soc);
#endif #endif
void (*mon_register_feature_ops)(struct dp_soc *soc);
}; };
struct dp_mon_soc { struct dp_mon_soc {
@@ -3251,4 +3252,24 @@ struct dp_mon_ops *dp_mon_ops_get_2_0(void);
struct cdp_mon_ops *dp_mon_cdp_ops_get_2_0(void); struct cdp_mon_ops *dp_mon_cdp_ops_get_2_0(void);
#endif #endif
/**
* dp_mon_register_feature_ops(): Register mon feature ops
* @soc: Datapath soc context
*
* return: void
*/
static inline
void dp_mon_register_feature_ops(struct dp_soc *soc)
{
struct dp_mon_ops *mon_ops = NULL;
mon_ops = dp_mon_ops_get(soc);
if (!mon_ops) {
dp_mon_err("Monitor ops is NULL");
return;
}
if (mon_ops->mon_register_feature_ops)
mon_ops->mon_register_feature_ops(soc);
}
#endif /* _DP_MON_H_ */ #endif /* _DP_MON_H_ */