qcacld-3.0: add support for wlan config override

Introduce a new Kbuild option 'WLAN_CFG_OVERRIDE' to override
wlan configurations.
Value of this option is a list, which includes the config items
those need to override, its pattern is as below:
WLAN_CFG_OVERRIDE="WLAN_CFG_1=n WLAN_CFG_2=y WLAN_CFG_3=n"

For LA build, it makes use of this Kbuild option, and introduces
new android build options for different products:
  WLAN_CFG_OVERRIDE_wlan: for single wlan driver case.
  WLAN_CFG_OVERRIDE_<chip>: for multiple wlan drivers case, for
    example WLAN_CFG_OVERRIDE_qca6390 and WLAN_CFG_OVERRIDE_qca6174.

Change-Id: I8e062c62d36e076a79032a47aa04501d4543a9c8
CRs-Fixed: 2515905
This commit is contained in:
Yu Wang 2019-08-08 19:48:16 +08:00 committed by nshrivas
parent 235615809c
commit baff800e4d
2 changed files with 16 additions and 0 deletions

View File

@ -112,6 +112,10 @@ KBUILD_OPTIONS += MODNAME=$(LOCAL_MOD_NAME)
KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
KBUILD_OPTIONS += $(WLAN_SELECT)
ifneq ($(WLAN_CFG_OVERRIDE_$(LOCAL_DEV_NAME)),)
KBUILD_OPTIONS += WLAN_CFG_OVERRIDE="$(WLAN_CFG_OVERRIDE_$(LOCAL_DEV_NAME))"
endif
include $(CLEAR_VARS)
LOCAL_MODULE := $(WLAN_CHIPSET)_$(LOCAL_DEV_NAME).ko
LOCAL_MODULE_KBUILD_NAME := $(LOCAL_MOD_NAME).ko

12
Kbuild
View File

@ -33,6 +33,18 @@ endif
include $(WLAN_ROOT)/configs/$(CONFIG_QCA_CLD_WLAN_PROFILE)_defconfig
# add configurations in WLAN_CFG_OVERRIDE
ifneq ($(WLAN_CFG_OVERRIDE),)
WLAN_CFG_OVERRIDE_FILE := $(WLAN_ROOT)/.wlan_cfg_override
$(shell echo > $(WLAN_CFG_OVERRIDE_FILE))
$(foreach cfg, $(WLAN_CFG_OVERRIDE), \
$(shell echo $(cfg) >> $(WLAN_CFG_OVERRIDE_FILE)))
include $(WLAN_CFG_OVERRIDE_FILE)
$(warning "Overriding WLAN config with: $(shell cat $(WLAN_CFG_OVERRIDE_FILE))")
endif
############ UAPI ############
UAPI_DIR := uapi
UAPI_INC := -I$(WLAN_ROOT)/$(UAPI_DIR)/linux