瀏覽代碼

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
Kai Liu 6 年之前
父節點
當前提交
aa88d2f9c2
共有 3 個文件被更改,包括 23 次插入6 次删除
  1. 4 5
      Kbuild
  2. 2 0
      configs/default_defconfig
  3. 17 1
      core/hdd/inc/wlan_hdd_sysfs.h

+ 4 - 5
Kbuild

@@ -56,7 +56,6 @@ HDD_OBJS := 	$(HDD_SRC_DIR)/wlan_hdd_assoc.o \
 		$(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 @@ ifeq ($(CONFIG_FEATURE_P2P_LISTEN_OFFLOAD), y)
 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_INFO) += -DWLAN_LOG_INFO
 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

+ 2 - 0
configs/default_defconfig

@@ -89,6 +89,8 @@ endif
 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

+ 17 - 1
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 @@ void hdd_sysfs_create_version_interface(struct wlan_objmgr_psoc *psoc);
  * 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