qcacld-3.0: add build flag DYNAMIC_SINGLE_CHIP

Introduces a new build flag 'DYNAMIC_SINGLE_CHIP':
If DYNAMIC_SINGLE_CHIP is defined, which means there
are multiple possible drivers, but only requires one
instance of driver at a time. In such case, leave
MULTI_IF_NAME undefined, no matter what the module
name is, only prepend DYNAMIC_SINGLE_CHIP to names
of firmware/mac/ini files.

Take path of driverdump and ini file for example:
If both MULTI_IF_NAME and DYNAMIC_SINGLE_CHIP are not
defined, the paths are:
driverdump: '/proc/debugdriver/driverdump'
ini: '/<fw_root>/wlan/qca_cld/WCNSS_qcom_cfg.ini'

If DYNAMIC_SINGLE_CHIP is defined as 'qca6174':
driverdump: '/proc/debugdriver/driverdump'
ini: '/<fw_root>/wlan/qca_cld/qca6174/WCNSS_qcom_cfg.ini'

If MULTI_IF_NAME is defined as 'qca6174' and
DYNAMIC_SINGLE_CHIP is not defined:
driverdump: '/proc/debugdriverqca6174/driverdump'
ini: '/<fw_root>/wlan/qca_cld/qca6174/WCNSS_qcom_cfg.ini'

On LA platform, DYNAMIC_SINGLE_CHIP is controlled by
TARGET_WLAN_CHIP and TARGET_MULTI_WLAN:

If more than one WLAN devices are enabled in TARGET_WLAN_CHIP,
and TARGET_MULTI_WLAN is not set to 'true',
DYNAMIC_SINGLE_CHIP will be set to the device name, to
avoid name conflicts of firmware/mac/ini files;
meanwhile, MODNAME is set to 'wlan', then paths for
debugging are not changed.
Otherwise, MULTI_IF_NAME will be defined if requires
multiple instances of driver.

Change-Id: I22ed34d80d3540451bf8b891243c6cdac5a73d7e
CRs-Fixed: 2402432
This commit is contained in:
Yu Wang
2019-03-13 17:55:44 +08:00
committato da nshrivas
parent 793fd05680
commit 7d866f6906
5 ha cambiato i file con 67 aggiunte e 15 eliminazioni

12
Kbuild
Vedi File

@@ -2710,11 +2710,23 @@ endif
# This allows multiple instances of the driver with different module names.
# If the module name is wlan, leave MULTI_IF_NAME undefined and the code will
# treat the driver as the primary driver.
#
# If DYNAMIC_SINGLE_CHIP is defined, which means there are multiple possible
# drivers, but only 1 driver will be loaded at a time(WLAN dynamic detect),
# leave MULTI_IF_NAME undefined, no matter what the module name is, then
# host driver will only append DYNAMIC_SINGLE_CHIP to the path of
# firmware/mac/ini file.
ifneq ($(DYNAMIC_SINGLE_CHIP),)
ccflags-y += -DDYNAMIC_SINGLE_CHIP=\"$(DYNAMIC_SINGLE_CHIP)\"
else
ifneq ($(MODNAME), wlan)
CHIP_NAME ?= $(MODNAME)
ccflags-y += -DMULTI_IF_NAME=\"$(CHIP_NAME)\"
endif
endif #DYNAMIC_SINGLE_CHIP
# WLAN_HDD_ADAPTER_MAGIC must be unique for all instances of the driver on the
# system. If it is not defined, then the host driver will use the first 4
# characters (including NULL) of MULTI_IF_NAME to construct