From cf57262302a85d37dc36191989d1a2a11b295c18 Mon Sep 17 00:00:00 2001 From: Venkata Sharath Chandra Manchala Date: Mon, 29 Jul 2019 11:50:57 -0700 Subject: [PATCH] qcacld-3.0: Enable FEATURE_TSO_STATS Enable FEATURE_TSO_STATS based on FEATURE_TSO flag. Change-Id: I2fbeac180f6bb0988a6e3660936659ea1f5da4a4 CRs-Fixed: 2392266 --- Kbuild | 1 + configs/default_defconfig | 11 ++++++++++- core/dp/txrx/ol_txrx.c | 11 +++++++---- core/hdd/src/wlan_hdd_wext.c | 10 ++++++++-- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Kbuild b/Kbuild index e5ef7a438e0e..cee55604edbf 100644 --- a/Kbuild +++ b/Kbuild @@ -2619,6 +2619,7 @@ cppflags-$(CONFIG_TSOSEG_DEBUG) += -DTSOSEG_DEBUG cppflags-$(CONFIG_ENABLE_DEBUG_ADDRESS_MARKING) += -DENABLE_DEBUG_ADDRESS_MARKING cppflags-$(CONFIG_FEATURE_TSO) += -DFEATURE_TSO cppflags-$(CONFIG_FEATURE_TSO_DEBUG) += -DFEATURE_TSO_DEBUG +cppflags-$(CONFIG_FEATURE_TSO_STATS) += -DFEATURE_TSO_STATS cppflags-$(CONFIG_WLAN_LRO) += -DFEATURE_LRO diff --git a/configs/default_defconfig b/configs/default_defconfig index cfafb42fe98b..dc9c17cb31a6 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -412,7 +412,6 @@ CONFIG_DP_INTR_POLL_BASED := y CONFIG_TX_PER_PDEV_DESC_POOL := y CONFIG_DP_TRACE := y CONFIG_FEATURE_TSO := y -CONFIG_TSO_DEBUG_LOG_ENABLE := y CONFIG_DP_LFR := y CONFIG_DUP_RX_DESC_WAR := y CONFIG_HTT_PADDR64 := y @@ -420,6 +419,16 @@ CONFIG_RX_OL := y CONFIG_TX_TID_OVERRIDE := y CONFIG_DP_TXRX_SOC_ATTACH := y CONFIG_WLAN_CLD_PM_QOS := y +CONFIG_DISABLE_DP_STATS := n + +ifeq ($(CONFIG_FEATURE_TSO), y) + CONFIG_FEATURE_TSO_STATS := y + CONFIG_TSO_DEBUG_LOG_ENABLE := y +endif + +ifeq ($(CONFIG_DISABLE_DP_STATS), y) + CONFIG_FEATURE_TSO_STATS := n +endif endif # As per target team, build is done as follows: diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index 1e049c961813..f7e4c5fd6cec 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -4517,11 +4517,13 @@ ol_txrx_display_stats(void *soc, uint16_t value, /** * ol_txrx_clear_stats() - Clear OL TXRX stats - * @value: Module id for which stats needs to be cleared + * @soc - ol soc handle + * @value - Module id for which stats needs to be cleared * - * Return: None + * Return: 0 - success/ non-zero failure */ -static void ol_txrx_clear_stats(uint16_t value) +static QDF_STATUS ol_txrx_clear_stats(struct cdp_soc *soc, + uint8_t value) { ol_txrx_pdev_handle pdev; QDF_STATUS status = QDF_STATUS_SUCCESS; @@ -4530,7 +4532,7 @@ static void ol_txrx_clear_stats(uint16_t value) if (!pdev) { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, "%s: pdev is NULL", __func__); - return; + return QDF_STATUS_E_INVAL; } switch (value) { @@ -4567,6 +4569,7 @@ static void ol_txrx_clear_stats(uint16_t value) break; } + return status; } /** diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 05cba8e665c3..f058b53d60b9 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -4788,6 +4788,8 @@ static int hdd_we_set_amsdu(struct hdd_adapter *adapter, int amsdu) static int hdd_we_clear_stats(struct hdd_adapter *adapter, int option) { + QDF_STATUS status; + hdd_debug("option %d", option); switch (option) { @@ -4808,8 +4810,12 @@ static int hdd_we_clear_stats(struct hdd_adapter *adapter, int option) hdd_clear_napi_stats(); break; default: - cdp_clear_stats(cds_get_context(QDF_MODULE_ID_SOC), - option); + status = cdp_clear_stats(cds_get_context(QDF_MODULE_ID_SOC), + option); + if (status != QDF_STATUS_SUCCESS) + hdd_debug("Failed to dump stats for option: %d", + option); + break; } return 0;