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
This commit is contained in:
Rakshith Suresh Patkar 2018-09-12 12:10:38 +05:30 • committed by nshrivas
commit d9f4e610c6
4 changed files with 34 additions and 0 deletions

17
Kbuild
View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -24,6 +24,7 @@
*/
/* Include Files */
#include <wbuff.h>
#include "cfg_ucfg_api.h"
#include <wlan_hdd_includes.h>
#include <cds_api.h>
@ -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);