qcacld-3.0: Add support for multiple instances of the host driver

Propagation from qcacld-2.0 to qcacld-3.0.

If the module name is changed to something other than wlan in
Makefile or Kbuild, then MULTI_IF_NAME is defined to be the module name.
When MULTI_IF_NAME is defined, the names for the config files, log files,
and firmware files are prepended or appended with MULTI_IF_NAME. This
prevents file name collisions allowing multiple instances of this driver
to be loaded with different module names.

Change-Id: Id880c5fe423eb0b2a2c01677d8fa7c4a784c74df
CRs-Fixed: 946520
This commit is contained in:
Samuel Ahn
2016-09-19 15:46:36 +05:30
committed by qcabuildsw
父節點 42234d808e
當前提交 c9c48ca408
共有 9 個文件被更改,包括 135 次插入19 次删除

17
Kbuild
查看文件

@@ -1670,6 +1670,23 @@ endif
ifeq ($(call cc-option-yn, -Wheader-guard),y)
EXTRA_CFLAGS += -Wheader-guard
endif
# If the module name is not "wlan", then the define MULTI_IF_NAME to be the
# same a the module name. The host driver will then append MULTI_IF_NAME to
# any string that must be unique for all instances of the driver on the system.
# 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.
ifneq ($(MODNAME), wlan)
CDEFINES += -DMULTI_IF_NAME=\"$(MODNAME)\"
endif
# 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
# WLAN_HDD_ADAPTER_MAGIC.
ifdef WLAN_HDD_ADAPTER_MAGIC
CDEFINES += -DWLAN_HDD_ADAPTER_MAGIC=$(WLAN_HDD_ADAPTER_MAGIC)
endif
# Module information used by KBuild framework
obj-$(CONFIG_QCA_CLD_WLAN) += $(MODNAME).o