diff --git a/dp/inc/cdp_txrx_stats_struct.h b/dp/inc/cdp_txrx_stats_struct.h index 8abf2a52fb..cfba1e5e37 100644 --- a/dp/inc/cdp_txrx_stats_struct.h +++ b/dp/inc/cdp_txrx_stats_struct.h @@ -697,9 +697,7 @@ enum WDI_EVENT { WDI_EVENT_RX_CBF, WDI_EVENT_PKT_CAPTURE_PPDU_STATS, WDI_EVENT_HOST_SW_EVENT, -#ifdef QCA_WIFI_QCN9224 WDI_EVENT_HYBRID_TX, -#endif #ifdef WLAN_FEATURE_11BE_MLO WDI_EVENT_MLO_TSTMP, #endif diff --git a/dp/wifi3.0/dp_rx.h b/dp/wifi3.0/dp_rx.h index d8419861d2..524562fccd 100644 --- a/dp/wifi3.0/dp_rx.h +++ b/dp/wifi3.0/dp_rx.h @@ -45,7 +45,7 @@ #endif #define RX_BUFFER_RESERVATION 0 -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT #define RX_MON_MIN_HEAD_ROOM 64 #endif diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 9da5dabcda..82ced51452 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -196,7 +196,7 @@ struct cdp_soc_rate_stats_ctx; struct dp_rx_fst; struct dp_mon_filter; struct dp_mon_mpdu; -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT struct dp_mon_filter_be; #endif diff --git a/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c b/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c index f98ec4173a..d2f938ca26 100644 --- a/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c +++ b/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c @@ -949,11 +949,9 @@ dp_mon_register_feature_ops_1_0(struct dp_soc *soc) 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; +#ifdef BE_PKTLOG_SUPPORT + mon_ops->mon_filter_setup_pktlog_hybrid = NULL; + mon_ops->mon_filter_reset_pktlog_hybrid = NULL; #endif #endif #if defined(DP_CON_MON) && !defined(REMOVE_PKT_LOG) diff --git a/dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.c b/dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.c index 7b9f0c5c8b..02eaf411a0 100644 --- a/dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.c +++ b/dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -748,17 +748,6 @@ void dp_mon_filter_reset_rx_pktlog_cbf_1_0(struct dp_pdev *pdev) srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; mon_pdev->filter[mode][srng_type] = filter; } - -#ifdef QCA_WIFI_QCN9224 -void dp_mon_filter_setup_pktlog_hybrid_1_0(struct dp_pdev *pdev) -{ - dp_mon_filter_err("This mode is only supported for QCN9224"); -} - -void dp_mon_filter_reset_pktlog_hybrid_1_0(struct dp_pdev *pdev) -{ -} -#endif #endif /* WDI_EVENT_ENABLE */ #ifdef WLAN_DP_RESET_MON_BUF_RING_FILTER diff --git a/dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.h b/dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.h index 8573e063d1..d5464f21f1 100644 --- a/dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.h +++ b/dp/wifi3.0/monitor/1.0/dp_mon_filter_1.0.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -155,19 +155,6 @@ void dp_mon_filter_setup_rx_pkt_log_cbf_1_0(struct dp_pdev *pdev); * @pdev: DP pdev handle */ void dp_mon_filter_reset_rx_pktlog_cbf_1_0(struct dp_pdev *pdev); -#ifdef QCA_WIFI_QCN9224 -/** - * dp_mon_filter_setup_pktlog_hybrid_1_0() - Setup the pktlog hybrid mode filter - * @pdev: DP pdev handle - */ -void dp_mon_filter_setup_pktlog_hybrid_1_0(struct dp_pdev *pdev); - -/** - * dp_mon_filter_reset_pktlog_hybrid_1_0() - Reset pktlog hybrid mode filter - * @pdev: DP pdev handle - */ -void dp_mon_filter_reset_pktlog_hybrid_1_0(struct dp_pdev *pdev); -#endif #else static inline void dp_mon_filter_setup_rx_pkt_log_full_1_0(struct dp_pdev *pdev) { @@ -192,16 +179,6 @@ static inline void dp_mon_filter_setup_rx_pkt_log_cbf_1_0(struct dp_pdev *pdev) static inline void dp_mon_filter_reset_rx_pktlog_cbf_1_0(struct dp_pdev *pdev) { } - -#ifdef QCA_WIFI_QCN9224 -static inline void dp_mon_filter_setup_pktlog_hybrid_1_0(struct dp_pdev *pdev) -{ -} - -static inline void dp_mon_filter_reset_pktlog_hybrid_1_0(struct dp_pdev *pdev) -{ -} -#endif #endif QDF_STATUS dp_mon_filter_update_1_0(struct dp_pdev *pdev); diff --git a/dp/wifi3.0/monitor/dp_mon.c b/dp/wifi3.0/monitor/dp_mon.c index dc8234efec..cb3777891c 100644 --- a/dp/wifi3.0/monitor/dp_mon.c +++ b/dp/wifi3.0/monitor/dp_mon.c @@ -778,6 +778,61 @@ dp_set_bpr_enable(struct dp_pdev *pdev, int val) #endif #ifdef WDI_EVENT_ENABLE +#ifdef BE_PKTLOG_SUPPORT +static bool +dp_set_hybrid_pktlog_enable(struct dp_pdev *pdev, + struct dp_mon_pdev *mon_pdev, + struct dp_mon_soc *mon_soc) +{ + if (mon_pdev->mvdev) { + /* Nothing needs to be done if monitor mode is + * enabled + */ + mon_pdev->pktlog_hybrid_mode = true; + return false; + } + + if (!mon_pdev->pktlog_hybrid_mode) { + mon_pdev->pktlog_hybrid_mode = true; + dp_mon_filter_setup_pktlog_hybrid(pdev); + if (dp_mon_filter_update(pdev) != + QDF_STATUS_SUCCESS) { + dp_cdp_err("Set hybrid filters failed"); + dp_mon_filter_reset_pktlog_hybrid(pdev); + mon_pdev->rx_pktlog_mode = + DP_RX_PKTLOG_DISABLED; + return false; + } + + if (mon_soc->reap_timer_init && + !dp_mon_is_enable_reap_timer_non_pkt(pdev)) + qdf_timer_mod(&mon_soc->mon_reap_timer, + DP_INTR_POLL_TIMER_MS); + } + + return true; +} + +static void +dp_set_hybrid_pktlog_disable(struct dp_mon_pdev *mon_pdev) +{ + mon_pdev->pktlog_hybrid_mode = false; +} +#else +static void +dp_set_hybrid_pktlog_disable(struct dp_mon_pdev *mon_pdev) +{ +} + +static bool +dp_set_hybrid_pktlog_enable(struct dp_pdev *pdev, + struct dp_mon_pdev *mon_pdev, + struct dp_mon_soc *mon_soc) +{ + dp_cdp_err("Hybrid mode is supported only on beryllium"); + return true; +} +#endif int dp_set_pktlog_wifi3(struct dp_pdev *pdev, uint32_t event, bool enable) { @@ -912,35 +967,11 @@ int dp_set_pktlog_wifi3(struct dp_pdev *pdev, uint32_t event, } break; -#ifdef QCA_WIFI_QCN9224 case WDI_EVENT_HYBRID_TX: - if (mon_pdev->mvdev) { - /* Nothing needs to be done if monitor mode is - * enabled - */ - mon_pdev->pktlog_hybrid_mode = true; + if (!dp_set_hybrid_pktlog_enable(pdev, + mon_pdev, mon_soc)) return 0; - } - - if (!mon_pdev->pktlog_hybrid_mode) { - mon_pdev->pktlog_hybrid_mode = true; - dp_mon_filter_setup_pktlog_hybrid(pdev); - if (dp_mon_filter_update(pdev) != - QDF_STATUS_SUCCESS) { - dp_cdp_err("Set hybrid filters failed"); - dp_mon_filter_reset_pktlog_hybrid(pdev); - mon_pdev->rx_pktlog_mode = - DP_RX_PKTLOG_DISABLED; - return 0; - } - - if (mon_soc->reap_timer_init && - !dp_mon_is_enable_reap_timer_non_pkt(pdev)) - qdf_timer_mod(&mon_soc->mon_reap_timer, - DP_INTR_POLL_TIMER_MS); - } break; -#endif default: /* Nothing needs to be done for other pktlog types */ @@ -1014,11 +1045,9 @@ int dp_set_pktlog_wifi3(struct dp_pdev *pdev, uint32_t event, mon_pdev->rx_pktlog_cbf = false; break; -#ifdef QCA_WIFI_QCN9224 case WDI_EVENT_HYBRID_TX: - mon_pdev->pktlog_hybrid_mode = false; + dp_set_hybrid_pktlog_disable(mon_pdev); break; -#endif default: /* Nothing needs to be done for other pktlog types */ diff --git a/dp/wifi3.0/monitor/dp_mon.h b/dp/wifi3.0/monitor/dp_mon.h index 8fe723adb7..85ad8ed0cc 100644 --- a/dp/wifi3.0/monitor/dp_mon.h +++ b/dp/wifi3.0/monitor/dp_mon.h @@ -578,7 +578,7 @@ struct dp_mon_ops { void (*mon_filter_reset_rx_pkt_log_lite)(struct dp_pdev *pdev); void (*mon_filter_setup_rx_pkt_log_cbf)(struct dp_pdev *pdev); void (*mon_filter_reset_rx_pkt_log_cbf)(struct dp_pdev *pdev); -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT void (*mon_filter_setup_pktlog_hybrid)(struct dp_pdev *pdev); void (*mon_filter_reset_pktlog_hybrid)(struct dp_pdev *pdev); #endif @@ -773,8 +773,8 @@ struct dp_mon_pdev { /* Enable pktlog logging cbf */ bool rx_pktlog_cbf; +#ifdef BE_PKTLOG_SUPPORT /* Enable pktlog logging hybrid */ -#ifdef QCA_WIFI_QCN9224 bool pktlog_hybrid_mode; #endif bool tx_sniffer_enable; diff --git a/dp/wifi3.0/monitor/dp_mon_filter.c b/dp/wifi3.0/monitor/dp_mon_filter.c index 3b51157657..aef3353a27 100644 --- a/dp/wifi3.0/monitor/dp_mon_filter.c +++ b/dp/wifi3.0/monitor/dp_mon_filter.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -25,7 +25,7 @@ /** * dp_mon_filter_mode_type_to_str - * Monitor Filter mode to string + * Monitor Filter mode to string */ int8_t *dp_mon_filter_mode_type_to_str[DP_MON_FILTER_MAX_MODE] = { #ifdef QCA_ENHANCED_STATS_SUPPORT @@ -45,7 +45,7 @@ int8_t *dp_mon_filter_mode_type_to_str[DP_MON_FILTER_MAX_MODE] = { "DP MON FILTER PKT LOG FULL MODE", "DP MON FILTER PKT LOG LITE MODE", "DP MON FILTER PKT LOG CBF MODE", -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT "DP MON FILTER PKT LOG HYBRID MODE", #endif #endif /* WDI_EVENT_ENABLE */ @@ -467,7 +467,7 @@ void dp_mon_filter_reset_rx_pktlog_cbf(struct dp_pdev *pdev) mon_ops->mon_filter_reset_rx_pkt_log_cbf(pdev); } -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT void dp_mon_filter_setup_pktlog_hybrid(struct dp_pdev *pdev) { struct dp_mon_ops *mon_ops = NULL; diff --git a/dp/wifi3.0/monitor/dp_mon_filter.h b/dp/wifi3.0/monitor/dp_mon_filter.h index b64f37fddd..ed0fb7206a 100644 --- a/dp/wifi3.0/monitor/dp_mon_filter.h +++ b/dp/wifi3.0/monitor/dp_mon_filter.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021,2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -127,7 +127,7 @@ enum dp_mon_filter_mode { DP_MON_FILTER_PKT_LOG_FULL_MODE, DP_MON_FILTER_PKT_LOG_LITE_MODE, DP_MON_FILTER_PKT_LOG_CBF_MODE, -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT DP_MON_FILTER_PKT_LOG_HYBRID_MODE, #endif #endif /* WDI_EVENT_ENABLE */ @@ -277,7 +277,7 @@ void dp_mon_filter_setup_rx_pkt_log_cbf(struct dp_pdev *pdev); */ void dp_mon_filter_reset_rx_pktlog_cbf(struct dp_pdev *pdev); -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT /** * dp_mon_filter_setup_pktlog_hybrid() - Setup the pktlog hybrid mode filter * in the radio object. diff --git a/utils/pktlog/pktlog_ac.c b/utils/pktlog/pktlog_ac.c index 3536e6fb65..1588e043d3 100644 --- a/utils/pktlog/pktlog_ac.c +++ b/utils/pktlog/pktlog_ac.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2012-2022 The Linux Foundation. All rights reserved. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -57,7 +57,7 @@ wdi_event_subscribe PKTLOG_SW_EVENT_SUBSCRIBER; wdi_event_subscribe PKTLOG_LITE_T2H_SUBSCRIBER; wdi_event_subscribe PKTLOG_LITE_RX_SUBSCRIBER; wdi_event_subscribe PKTLOG_OFFLOAD_SUBSCRIBER; -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT wdi_event_subscribe PKTLOG_HYBRID_SUBSCRIBER; #endif diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index dc784aa880..59b6453ea7 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -6498,7 +6498,7 @@ enum { WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT, WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT, WMI_HOST_PKTLOG_EVENT_CBF_BIT, -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT, #endif }; @@ -6527,7 +6527,7 @@ typedef enum { BIT(WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT), WMI_HOST_PKTLOG_EVENT_CBF = BIT(WMI_HOST_PKTLOG_EVENT_CBF_BIT), -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT WMI_HOST_PKTLOG_EVENT_HYBRID_TX = BIT(WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT), #endif diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 094f08aad0..6025e25488 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -570,7 +570,7 @@ static const uint32_t pktlog_event_tlv[] = { [WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT] = 0, [WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT] = WMI_PKTLOG_EVENT_PHY, [WMI_HOST_PKTLOG_EVENT_CBF_BIT] = WMI_PKTLOG_EVENT_CBF, -#ifdef QCA_WIFI_QCN9224 +#ifdef BE_PKTLOG_SUPPORT [WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT] = WMI_PKTLOG_EVENT_HYBRID_TX, #endif };