qcacmn: Place pktlog specific code under BE_PKTLOG_SUPPORT
Introduce a new flag "BE_PKTLOG_SUPPORT" for beryllium specific pktlog support. Change-Id: If91156541b322905ad5d97cf2d9d7ae687290ecb CRs-Fixed: 3115832
This commit is contained in:

committed by
Madan Koyyalamudi

parent
a1f2c00c65
commit
df88a8bdc9
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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 */
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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.
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
};
|
||||
|
Reference in New Issue
Block a user