qcacld-3.0: Featurize wlan BMI

Featurize wlan BMI to compile out when not needed.

Change-Id: I4ea1e34ee4299840cf7a601396c4dba7af415623
CRs-Fixed: 2258614
This commit is contained in:
Qiwei Cai
2018-07-11 10:02:03 +08:00
committed by nshrivas
parent cb5fd01a0c
commit a01a96291f
5 changed files with 64 additions and 10 deletions

22
Kbuild
View File

@@ -807,10 +807,12 @@ BMI_DIR := core/bmi
BMI_INC := -I$(WLAN_ROOT)/$(BMI_DIR)/inc BMI_INC := -I$(WLAN_ROOT)/$(BMI_DIR)/inc
ifeq ($(CONFIG_WLAN_FEATURE_BMI), y)
BMI_OBJS := $(BMI_DIR)/src/bmi.o \ BMI_OBJS := $(BMI_DIR)/src/bmi.o \
$(BMI_DIR)/src/bmi_1.o \
$(BMI_DIR)/src/ol_fw.o \ $(BMI_DIR)/src/ol_fw.o \
$(BMI_DIR)/src/ol_fw_common.o $(BMI_DIR)/src/ol_fw_common.o
BMI_OBJS += $(BMI_DIR)/src/bmi_1.o endif
########## TARGET_IF ####### ########## TARGET_IF #######
TARGET_IF_DIR := $(WLAN_COMMON_ROOT)/target_if TARGET_IF_DIR := $(WLAN_COMMON_ROOT)/target_if
@@ -1178,15 +1180,16 @@ HIF_COMMON_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/hif_exec.o
HIF_COMMON_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/hif_irq_affinity.o HIF_COMMON_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/hif_irq_affinity.o
endif endif
HIF_CE_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_diag.o \
HIF_CE_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_bmi.o \
$(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_diag.o \
$(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_main.o \ $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_main.o \
$(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_service.o \ $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_service.o \
$(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_tasklet.o \ $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_tasklet.o \
$(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/regtable.o $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/regtable.o
ifeq ($(CONFIG_WLAN_FEATURE_BMI), y)
HIF_CE_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_bmi.o
endif
ifeq ($(CONFIG_LITHIUM), y) ifeq ($(CONFIG_LITHIUM), y)
ifeq ($(CONFIG_CNSS_QCA6290), y) ifeq ($(CONFIG_CNSS_QCA6290), y)
HIF_CE_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/qca6290def.o HIF_CE_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/qca6290def.o
@@ -1204,12 +1207,16 @@ HIF_USB_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/usbdrv.o \
$(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/if_usb.o \ $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/if_usb.o \
$(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/regtable_usb.o $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/regtable_usb.o
HIF_SDIO_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_bmi_reg_access.o \ HIF_SDIO_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_diag_reg_access.o \
$(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_diag_reg_access.o \
$(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_sdio_dev.o \ $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_sdio_dev.o \
$(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_sdio.o \ $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_sdio.o \
$(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/regtable_sdio.o \ $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/regtable_sdio.o \
$(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/transfer/transfer.o $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/transfer/transfer.o
ifeq ($(CONFIG_WLAN_FEATURE_BMI), y)
HIF_SDIO_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_bmi_reg_access.o
endif
ifeq ($(CONFIG_SDIO_TRANSFER), adma) ifeq ($(CONFIG_SDIO_TRANSFER), adma)
HIF_SDIO_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/transfer/adma.o HIF_SDIO_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/transfer/adma.o
else else
@@ -1962,6 +1969,7 @@ cppflags-$(CONFIG_FEATURE_TSO) += -DFEATURE_TSO
cppflags-$(CONFIG_TSO_DEBUG_LOG_ENABLE) += -DTSO_DEBUG_LOG_ENABLE cppflags-$(CONFIG_TSO_DEBUG_LOG_ENABLE) += -DTSO_DEBUG_LOG_ENABLE
cppflags-$(CONFIG_DP_LFR) += -DDP_LFR cppflags-$(CONFIG_DP_LFR) += -DDP_LFR
cppflags-$(CONFIG_HTT_PADDR64) += -DHTT_PADDR64 cppflags-$(CONFIG_HTT_PADDR64) += -DHTT_PADDR64
cppflags-$(CONFIG_WLAN_FEATURE_BMI) += -DWLAN_FEATURE_BMI
ccflags-$(CONFIG_QCA_LL_TX_FLOW_CONTROL_RESIZE) += -DQCA_LL_TX_FLOW_CONTROL_RESIZE ccflags-$(CONFIG_QCA_LL_TX_FLOW_CONTROL_RESIZE) += -DQCA_LL_TX_FLOW_CONTROL_RESIZE

View File

@@ -547,6 +547,7 @@ CONFIG_WLAN_SPECTRAL_ENABLE := y
CONFIG_WMI_CMD_STRINGS := y CONFIG_WMI_CMD_STRINGS := y
CONFIG_FEATURE_MONITOR_MODE_SUPPORT := y CONFIG_FEATURE_MONITOR_MODE_SUPPORT := y
CONFIG_WLAN_FEATURE_TWT := y CONFIG_WLAN_FEATURE_TWT := y
CONFIG_WLAN_FEATURE_BMI := y
ifeq ($(CONFIG_HELIUMPLUS), y) ifeq ($(CONFIG_HELIUMPLUS), y)
ifneq ($(CONFIG_FORCE_ALLOC_FROM_DMA_ZONE), y) ifneq ($(CONFIG_FORCE_ALLOC_FROM_DMA_ZONE), y)

View File

@@ -112,6 +112,7 @@ CONFIG_WLAN_FEATURE_DISA := n
CONFIG_WLAN_FEATURE_FIPS := y CONFIG_WLAN_FEATURE_FIPS := y
CONFIG_WLAN_FEATURE_SAE := y CONFIG_WLAN_FEATURE_SAE := y
CONFIG_CHNL_MATRIX_RESTRICTION := n CONFIG_CHNL_MATRIX_RESTRICTION := n
CONFIG_WLAN_FEATURE_BMI := n
ifeq ($(CONFIG_ARCH_SDM845), y) ifeq ($(CONFIG_ARCH_SDM845), y)
ifeq ($(CONFIG_IPA_OFFLOAD), y) ifeq ($(CONFIG_IPA_OFFLOAD), y)

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2018 The Linux Foundation. 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
@@ -29,8 +29,6 @@
#include "hif.h" #include "hif.h"
struct ol_context; struct ol_context;
QDF_STATUS ol_cds_init(qdf_device_t qdf_dev, void *hif_ctx);
void ol_cds_free(void);
/** /**
* struct hif_config_info - Place Holder for hif confiruation * struct hif_config_info - Place Holder for hif confiruation
@@ -51,10 +49,52 @@ struct ol_config_info {
bool enable_ramdump_collection; bool enable_ramdump_collection;
}; };
#ifdef WLAN_FEATURE_BMI
QDF_STATUS ol_cds_init(qdf_device_t qdf_dev, void *hif_ctx);
void ol_cds_free(void);
void ol_init_ini_config(struct ol_context *ol_ctx, void ol_init_ini_config(struct ol_context *ol_ctx,
struct ol_config_info *cfg); struct ol_config_info *cfg);
void bmi_cleanup(struct ol_context *scn); void bmi_cleanup(struct ol_context *scn);
QDF_STATUS bmi_done(struct ol_context *ol_ctx); QDF_STATUS bmi_done(struct ol_context *ol_ctx);
void bmi_target_ready(struct hif_opaque_softc *scn, void *cfg_ctx); void bmi_target_ready(struct hif_opaque_softc *scn, void *cfg_ctx);
QDF_STATUS bmi_download_firmware(struct ol_context *ol_ctx); QDF_STATUS bmi_download_firmware(struct ol_context *ol_ctx);
#else /* WLAN_FEATURE_BMI */
static inline QDF_STATUS
ol_cds_init(qdf_device_t qdf_dev, void *hif_ctx)
{
return QDF_STATUS_SUCCESS;
}
static inline void ol_cds_free(void)
{
}
static inline void
ol_init_ini_config(struct ol_context *ol_ctx, struct ol_config_info *cfg)
{
}
static inline void bmi_cleanup(struct ol_context *scn)
{
}
static inline QDF_STATUS bmi_done(struct ol_context *ol_ctx)
{
return QDF_STATUS_SUCCESS;
}
static inline void
bmi_target_ready(struct hif_opaque_softc *scn, void *cfg_ctx)
{
}
static inline QDF_STATUS
bmi_download_firmware(struct ol_context *ol_ctx)
{
return QDF_STATUS_SUCCESS;
}
#endif /* WLAN_FEATURE_BMI */
#endif /* _BMI_H_ */ #endif /* _BMI_H_ */

View File

@@ -34,9 +34,13 @@
#define HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_FW_ACK (1 << 16) #define HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_FW_ACK (1 << 16)
#define HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_FW_ACK (1 << 17) #define HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_FW_ACK (1 << 17)
#ifdef WLAN_FEATURE_BMI
void ol_target_failure(void *instance, QDF_STATUS status); void ol_target_failure(void *instance, QDF_STATUS status);
void ol_target_ready(struct hif_opaque_softc *scn, void *cfg_ctx); void ol_target_ready(struct hif_opaque_softc *scn, void *cfg_ctx);
QDF_STATUS ol_get_fw_files(struct ol_context *ol_ctx); QDF_STATUS ol_get_fw_files(struct ol_context *ol_ctx);
QDF_STATUS ol_extra_initialization(struct ol_context *ol_ctx); QDF_STATUS ol_extra_initialization(struct ol_context *ol_ctx);
#else /* WLAN_FEATURE_BMI */
static inline void ol_target_failure(void *instance, QDF_STATUS status) {}
#endif /* WLAN_FEATURE_BMI */
#endif /* _OL_FW_H_ */ #endif /* _OL_FW_H_ */