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
このコミットが含まれているのは:
Adwait Nayak
2022-01-25 22:20:12 +05:30
committed by Madan Koyyalamudi
コミット df88a8bdc9
13個のファイルの変更80行の追加89行の削除

ファイルの表示

@@ -697,9 +697,7 @@ enum WDI_EVENT {
WDI_EVENT_RX_CBF, WDI_EVENT_RX_CBF,
WDI_EVENT_PKT_CAPTURE_PPDU_STATS, WDI_EVENT_PKT_CAPTURE_PPDU_STATS,
WDI_EVENT_HOST_SW_EVENT, WDI_EVENT_HOST_SW_EVENT,
#ifdef QCA_WIFI_QCN9224
WDI_EVENT_HYBRID_TX, WDI_EVENT_HYBRID_TX,
#endif
#ifdef WLAN_FEATURE_11BE_MLO #ifdef WLAN_FEATURE_11BE_MLO
WDI_EVENT_MLO_TSTMP, WDI_EVENT_MLO_TSTMP,
#endif #endif

ファイルの表示

@@ -45,7 +45,7 @@
#endif #endif
#define RX_BUFFER_RESERVATION 0 #define RX_BUFFER_RESERVATION 0
#ifdef QCA_WIFI_QCN9224 #ifdef BE_PKTLOG_SUPPORT
#define RX_MON_MIN_HEAD_ROOM 64 #define RX_MON_MIN_HEAD_ROOM 64
#endif #endif

ファイルの表示

@@ -196,7 +196,7 @@ struct cdp_soc_rate_stats_ctx;
struct dp_rx_fst; struct dp_rx_fst;
struct dp_mon_filter; struct dp_mon_filter;
struct dp_mon_mpdu; struct dp_mon_mpdu;
#ifdef QCA_WIFI_QCN9224 #ifdef BE_PKTLOG_SUPPORT
struct dp_mon_filter_be; struct dp_mon_filter_be;
#endif #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; dp_mon_filter_setup_rx_pkt_log_cbf_1_0;
mon_ops->mon_filter_reset_rx_pkt_log_cbf = mon_ops->mon_filter_reset_rx_pkt_log_cbf =
dp_mon_filter_reset_rx_pktlog_cbf_1_0; dp_mon_filter_reset_rx_pktlog_cbf_1_0;
#ifdef QCA_WIFI_QCN9224 #ifdef BE_PKTLOG_SUPPORT
mon_ops->mon_filter_setup_pktlog_hybrid = mon_ops->mon_filter_setup_pktlog_hybrid = NULL;
dp_mon_filter_setup_pktlog_hybrid_1_0; mon_ops->mon_filter_reset_pktlog_hybrid = NULL;
mon_ops->mon_filter_reset_pktlog_hybrid =
dp_mon_filter_reset_pktlog_hybrid_1_0;
#endif #endif
#endif #endif
#if defined(DP_CON_MON) && !defined(REMOVE_PKT_LOG) #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, 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 * 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
@@ -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; srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS;
mon_pdev->filter[mode][srng_type] = filter; 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 */ #endif /* WDI_EVENT_ENABLE */
#ifdef WLAN_DP_RESET_MON_BUF_RING_FILTER #ifdef WLAN_DP_RESET_MON_BUF_RING_FILTER

ファイルの表示

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2021, The Linux Foundation. All rights reserved. * 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 * 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
@@ -155,19 +155,6 @@ void dp_mon_filter_setup_rx_pkt_log_cbf_1_0(struct dp_pdev *pdev);
* @pdev: DP pdev handle * @pdev: DP pdev handle
*/ */
void dp_mon_filter_reset_rx_pktlog_cbf_1_0(struct dp_pdev *pdev); 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 #else
static inline void dp_mon_filter_setup_rx_pkt_log_full_1_0(struct dp_pdev *pdev) 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) 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 #endif
QDF_STATUS dp_mon_filter_update_1_0(struct dp_pdev *pdev); 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 #endif
#ifdef WDI_EVENT_ENABLE #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, int dp_set_pktlog_wifi3(struct dp_pdev *pdev, uint32_t event,
bool enable) bool enable)
{ {
@@ -912,35 +967,11 @@ int dp_set_pktlog_wifi3(struct dp_pdev *pdev, uint32_t event,
} }
break; break;
#ifdef QCA_WIFI_QCN9224
case WDI_EVENT_HYBRID_TX: case WDI_EVENT_HYBRID_TX:
if (mon_pdev->mvdev) { if (!dp_set_hybrid_pktlog_enable(pdev,
/* Nothing needs to be done if monitor mode is mon_pdev, mon_soc))
* enabled
*/
mon_pdev->pktlog_hybrid_mode = true;
return 0; 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; break;
#endif
default: default:
/* Nothing needs to be done for other pktlog types */ /* 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; mon_pdev->rx_pktlog_cbf = false;
break; break;
#ifdef QCA_WIFI_QCN9224
case WDI_EVENT_HYBRID_TX: case WDI_EVENT_HYBRID_TX:
mon_pdev->pktlog_hybrid_mode = false; dp_set_hybrid_pktlog_disable(mon_pdev);
break; break;
#endif
default: default:
/* Nothing needs to be done for other pktlog types */ /* 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_reset_rx_pkt_log_lite)(struct dp_pdev *pdev);
void (*mon_filter_setup_rx_pkt_log_cbf)(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); 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_setup_pktlog_hybrid)(struct dp_pdev *pdev);
void (*mon_filter_reset_pktlog_hybrid)(struct dp_pdev *pdev); void (*mon_filter_reset_pktlog_hybrid)(struct dp_pdev *pdev);
#endif #endif
@@ -773,8 +773,8 @@ struct dp_mon_pdev {
/* Enable pktlog logging cbf */ /* Enable pktlog logging cbf */
bool rx_pktlog_cbf; bool rx_pktlog_cbf;
#ifdef BE_PKTLOG_SUPPORT
/* Enable pktlog logging hybrid */ /* Enable pktlog logging hybrid */
#ifdef QCA_WIFI_QCN9224
bool pktlog_hybrid_mode; bool pktlog_hybrid_mode;
#endif #endif
bool tx_sniffer_enable; bool tx_sniffer_enable;

ファイルの表示

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. * 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 * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -25,7 +25,7 @@
/** /**
* dp_mon_filter_mode_type_to_str * 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] = { int8_t *dp_mon_filter_mode_type_to_str[DP_MON_FILTER_MAX_MODE] = {
#ifdef QCA_ENHANCED_STATS_SUPPORT #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 FULL MODE",
"DP MON FILTER PKT LOG LITE MODE", "DP MON FILTER PKT LOG LITE MODE",
"DP MON FILTER PKT LOG CBF MODE", "DP MON FILTER PKT LOG CBF MODE",
#ifdef QCA_WIFI_QCN9224 #ifdef BE_PKTLOG_SUPPORT
"DP MON FILTER PKT LOG HYBRID MODE", "DP MON FILTER PKT LOG HYBRID MODE",
#endif #endif
#endif /* WDI_EVENT_ENABLE */ #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); 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) void dp_mon_filter_setup_pktlog_hybrid(struct dp_pdev *pdev)
{ {
struct dp_mon_ops *mon_ops = NULL; struct dp_mon_ops *mon_ops = NULL;

ファイルの表示

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. * 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 * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * 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_FULL_MODE,
DP_MON_FILTER_PKT_LOG_LITE_MODE, DP_MON_FILTER_PKT_LOG_LITE_MODE,
DP_MON_FILTER_PKT_LOG_CBF_MODE, DP_MON_FILTER_PKT_LOG_CBF_MODE,
#ifdef QCA_WIFI_QCN9224 #ifdef BE_PKTLOG_SUPPORT
DP_MON_FILTER_PKT_LOG_HYBRID_MODE, DP_MON_FILTER_PKT_LOG_HYBRID_MODE,
#endif #endif
#endif /* WDI_EVENT_ENABLE */ #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); 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 * dp_mon_filter_setup_pktlog_hybrid() - Setup the pktlog hybrid mode filter
* in the radio object. * in the radio object.

ファイルの表示

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2012-2022 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 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 * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * 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_T2H_SUBSCRIBER;
wdi_event_subscribe PKTLOG_LITE_RX_SUBSCRIBER; wdi_event_subscribe PKTLOG_LITE_RX_SUBSCRIBER;
wdi_event_subscribe PKTLOG_OFFLOAD_SUBSCRIBER; wdi_event_subscribe PKTLOG_OFFLOAD_SUBSCRIBER;
#ifdef QCA_WIFI_QCN9224 #ifdef BE_PKTLOG_SUPPORT
wdi_event_subscribe PKTLOG_HYBRID_SUBSCRIBER; wdi_event_subscribe PKTLOG_HYBRID_SUBSCRIBER;
#endif #endif

ファイルの表示

@@ -6498,7 +6498,7 @@ enum {
WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT, WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT,
WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_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 #endif
}; };
@@ -6527,7 +6527,7 @@ typedef enum {
BIT(WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT), BIT(WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT),
WMI_HOST_PKTLOG_EVENT_CBF = WMI_HOST_PKTLOG_EVENT_CBF =
BIT(WMI_HOST_PKTLOG_EVENT_CBF_BIT), BIT(WMI_HOST_PKTLOG_EVENT_CBF_BIT),
#ifdef QCA_WIFI_QCN9224 #ifdef BE_PKTLOG_SUPPORT
WMI_HOST_PKTLOG_EVENT_HYBRID_TX = WMI_HOST_PKTLOG_EVENT_HYBRID_TX =
BIT(WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT), BIT(WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT),
#endif #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_TX_DATA_CAPTURE_BIT] = 0,
[WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT] = WMI_PKTLOG_EVENT_PHY, [WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT] = WMI_PKTLOG_EVENT_PHY,
[WMI_HOST_PKTLOG_EVENT_CBF_BIT] = WMI_PKTLOG_EVENT_CBF, [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, [WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT] = WMI_PKTLOG_EVENT_HYBRID_TX,
#endif #endif
}; };