From d9f4e610c6942285e332680a7de3afa1ebf3cede Mon Sep 17 00:00:00 2001 From: Rakshith Suresh Patkar Date: Wed, 12 Sep 2018 12:10:38 +0530 Subject: [PATCH] qcacld-3.0: Enable wbuff module wbuff is a module which maintains a pre-allocated pool of skbs for each registered module and allocates skbs when requested. Change-Id: Ia4d13479d8a1342227a2ecbaf29cc7a89bc5e30b CRs-Fixed: 2313446 --- Kbuild | 17 +++++++++++++++++ configs/default_defconfig | 3 +++ configs/genoa.common | 3 +++ core/hdd/src/wlan_hdd_main.c | 11 +++++++++++ 4 files changed, 34 insertions(+) diff --git a/Kbuild b/Kbuild index 2b04ae3bd147..2a532f1a956f 100644 --- a/Kbuild +++ b/Kbuild @@ -563,6 +563,18 @@ ifeq ($(CONFIG_LEAK_DETECTION), y) QDF_OBJS += $(QDF_OBJ_DIR)/qdf_debug_domain.o endif +############ WBUFF ############ +WBUFF_OS_DIR := wbuff +WBUFF_OS_INC_DIR := $(WBUFF_OS_DIR)/inc +WBUFF_OS_SRC_DIR := $(WBUFF_OS_DIR)/src +WBUFF_OBJ_DIR := $(WLAN_COMMON_ROOT)/$(WBUFF_OS_SRC_DIR) + +WBUFF_INC := -I$(WLAN_COMMON_INC)/$(WBUFF_OS_INC_DIR) \ + +ifeq ($(CONFIG_WLAN_WBUFF), y) +WBUFF_OBJS += $(WBUFF_OBJ_DIR)/wbuff.o +endif + ##########QAL ####### QAL_OS_DIR := qal QAL_OS_INC_DIR := $(QAL_OS_DIR)/inc @@ -1587,6 +1599,7 @@ INCS := $(HDD_INC) \ $(SYS_INC) \ $(QAL_INC) \ $(QDF_INC) \ + $(WBUFF_INC) \ $(CDS_INC) \ $(CFG_INC) \ $(DFS_INC) \ @@ -1686,6 +1699,7 @@ OBJS := $(HDD_OBJS) \ $(SYS_OBJS) \ $(QAL_OBJS) \ $(QDF_OBJS) \ + $(WBUFF_OBJS) \ $(CDS_OBJS) \ $(CFG_OBJS) \ $(FTM_OBJS) @@ -2098,6 +2112,9 @@ ifeq ($(CONFIG_ARCH_SDX20), y) cppflags-y += -DSYNC_IPA_READY endif +#Enable wbuff +cppflags-$(CONFIG_WLAN_WBUFF) += -DWLAN_FEATURE_WBUFF + #Enable GTK Offload cppflags-$(CONFIG_GTK_OFFLOAD) += -DWLAN_FEATURE_GTK_OFFLOAD diff --git a/configs/default_defconfig b/configs/default_defconfig index 9a090e571e14..e8740ad444a9 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -551,6 +551,9 @@ CONFIG_ENABLE_MTRACE_LOG := y #Flag to enable nud tracking feature CONFIG_WLAN_NUD_TRACKING := y +#Flag to enable wbuff feature +CONFIG_WLAN_WBUFF := y + #Flag to enable set and get disable channel list feature CONFIG_DISABLE_CHANNEL_LIST :=y diff --git a/configs/genoa.common b/configs/genoa.common index 1bfe0a73d36f..bbca03164f5c 100644 --- a/configs/genoa.common +++ b/configs/genoa.common @@ -89,6 +89,9 @@ PANIC_ON_BUG := y WLAN_WARN_ON_ASSERT := y CONFIG_WLAN_LOGGING_SOCK_SVC := y +#Flag to enable wbuff feature +CONFIG_WLAN_WBUFF := n + # other features WLAN_OPEN_SOURCE := y CONFIG_ATH_PERF_PWR_OFFLOAD := y diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a42de08ab774..a46351f65b03 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -24,6 +24,7 @@ */ /* Include Files */ +#include #include "cfg_ucfg_api.h" #include #include @@ -2910,6 +2911,10 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) goto deinit_config; } + status = wbuff_module_init(); + if (QDF_IS_STATUS_ERROR(status)) + hdd_err("WBUFF init unsuccessful; status: %d", status); + status = cds_open(hdd_ctx->hdd_psoc); if (QDF_IS_STATUS_ERROR(status)) { hdd_err("Failed to Open CDS; status: %d", status); @@ -11009,7 +11014,13 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) ret = -EINVAL; QDF_ASSERT(0); } + + qdf_status = wbuff_module_deinit(); + if (!QDF_IS_STATUS_SUCCESS(qdf_status)) + hdd_err("WBUFF de-init unsuccessful; status: %d", qdf_status); + hdd_component_pdev_close(hdd_ctx->pdev); + hdd_component_psoc_close(hdd_ctx->hdd_psoc); dispatcher_pdev_close(hdd_ctx->pdev); ret = hdd_objmgr_release_and_destroy_pdev(hdd_ctx);