qcacld-3.0: Define macro WLAN_SYSFS for feature sysfs interface
Disable this feature for MOBILE_ROUTER product, since some MOBILE_ROUTER
platform will attach two wlan cards with separate wlan driver,
during second driver loading process, it will report a warning of
"cannot create duplicate filename" as node with same name has been
created after first driver was loaded.
Change-Id: I9e06439b3a6dacdf4eb5ae87898338ab1eeb8b16
CRs-Fixed: 2295391
diff --git a/Kbuild b/Kbuild
index 2d937f0..05e4bf6 100755
--- a/Kbuild
+++ b/Kbuild
@@ -56,7 +56,6 @@
$(HDD_SRC_DIR)/wlan_hdd_scan.o \
$(HDD_SRC_DIR)/wlan_hdd_softap_tx_rx.o \
$(HDD_SRC_DIR)/wlan_hdd_stats.o \
- $(HDD_SRC_DIR)/wlan_hdd_sysfs.o \
$(HDD_SRC_DIR)/wlan_hdd_trace.o \
$(HDD_SRC_DIR)/wlan_hdd_tx_rx.o \
$(HDD_SRC_DIR)/wlan_hdd_wmm.o \
@@ -206,6 +205,9 @@
HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_p2p_listen_offload.o
endif
+ifeq ($(CONFIG_WLAN_SYSFS), y)
+HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs.o
+endif
########### Driver Synchronization Core (DSC) ###########
DSC_DIR := components/dsc
DSC_INC_DIR := $(DSC_DIR)/inc
@@ -1910,14 +1912,11 @@
cppflags-$(CONFIG_WLAN_LOG_DEBUG) += -DWLAN_LOG_DEBUG
cppflags-$(CONFIG_WLAN_LOG_ENTER) += -DWLAN_LOG_ENTER
cppflags-$(CONFIG_WLAN_LOG_EXIT) += -DWLAN_LOG_EXIT
-
cppflags-$(WLAN_OPEN_SOURCE) += -DWLAN_OPEN_SOURCE
-
cppflags-$(CONFIG_FEATURE_STATS_EXT) += -DWLAN_FEATURE_STATS_EXT
-
cppflags-$(CONFIG_QCACLD_FEATURE_NAN) += -DWLAN_FEATURE_NAN
-
cppflags-$(CONFIG_QCA_IBSS_SUPPORT) += -DQCA_IBSS_SUPPORT
+cppflags-$(CONFIG_WLAN_SYSFS) += -DWLAN_SYSFS
#Enable OL debug and wmi unified functions
cppflags-$(CONFIG_ATH_PERF_PWR_OFFLOAD) += -DATH_PERF_PWR_OFFLOAD
diff --git a/configs/default_defconfig b/configs/default_defconfig
index 47d8a7d..e55b94b 100644
--- a/configs/default_defconfig
+++ b/configs/default_defconfig
@@ -89,6 +89,8 @@
ifneq ($(CONFIG_MOBILE_ROUTER), y)
#Flag to enable TDLS feature
CONFIG_QCOM_TDLS := y
+
+CONFIG_WLAN_SYSFS := y
endif
CONFIG_QCACLD_FEATURE_GREEN_AP := y
diff --git a/core/hdd/inc/wlan_hdd_sysfs.h b/core/hdd/inc/wlan_hdd_sysfs.h
index 6ba49b0..07e3bb4 100644
--- a/core/hdd/inc/wlan_hdd_sysfs.h
+++ b/core/hdd/inc/wlan_hdd_sysfs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -16,6 +16,10 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef _WLAN_HDD_SYSFS_H_
+#define _WLAN_HDD_SYSFS_H_
+
+#ifdef WLAN_SYSFS
/**
* hdd_sysfs_create_version_interface() - create version interface
* @psoc: PSOC ptr
@@ -30,3 +34,15 @@
* Return: none
*/
void hdd_sysfs_destroy_version_interface(void);
+#else
+static inline
+void hdd_sysfs_create_version_interface(struct wlan_objmgr_psoc *psoc)
+{
+}
+
+static inline
+void hdd_sysfs_destroy_version_interface(void)
+{
+}
+#endif
+#endif