소스 검색

mac80211: make cfg80211 testmode support optional (and disabled by default)

Testmode commands are typically only used for manufacturing or vendor specific
debugging features, so they should not be in the default image

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 5 년 전
부모
커밋
25e0ae6bfc
1개의 변경된 파일16개의 추가작업 그리고 1개의 파일을 삭제
  1. 16 1
      package/kernel/mac80211/Makefile

+ 16 - 1
package/kernel/mac80211/Makefile

@@ -35,6 +35,7 @@ PKG_DRIVERS = \
 
 
 PKG_CONFIG_DEPENDS:= \
 PKG_CONFIG_DEPENDS:= \
 	CONFIG_PACKAGE_kmod-mac80211 \
 	CONFIG_PACKAGE_kmod-mac80211 \
+	CONFIG_PACKAGE_CFG80211_TESTMODE \
 	CONFIG_PACKAGE_MAC80211_DEBUGFS \
 	CONFIG_PACKAGE_MAC80211_DEBUGFS \
 	CONFIG_PACKAGE_MAC80211_MESH \
 	CONFIG_PACKAGE_MAC80211_MESH \
 	CONFIG_PACKAGE_MAC80211_TRACING \
 	CONFIG_PACKAGE_MAC80211_TRACING \
@@ -56,7 +57,6 @@ config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
 
 
 config-y:= \
 config-y:= \
 	WLAN \
 	WLAN \
-	NL80211_TESTMODE \
 	CFG80211_WEXT \
 	CFG80211_WEXT \
 	CFG80211_CERTIFICATION_ONUS \
 	CFG80211_CERTIFICATION_ONUS \
 	MAC80211_RC_MINSTREL \
 	MAC80211_RC_MINSTREL \
@@ -80,6 +80,7 @@ config-y:= \
 	WLAN_VENDOR_ZYDAS \
 	WLAN_VENDOR_ZYDAS \
 
 
 config-$(call config_package,cfg80211) += CFG80211
 config-$(call config_package,cfg80211) += CFG80211
+config-$(CONFIG_PACKAGE_CFG80211_TESTMODE) += NL80211_TESTMODE
 
 
 config-$(call config_package,mac80211) += MAC80211
 config-$(call config_package,mac80211) += MAC80211
 config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
 config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
@@ -108,6 +109,20 @@ define KernelPackage/cfg80211/description
 cfg80211 is the Linux wireless LAN (802.11) configuration API.
 cfg80211 is the Linux wireless LAN (802.11) configuration API.
 endef
 endef
 
 
+define KernelPackage/cfg80211/config
+  if PACKAGE_kmod-cfg80211
+
+	config PACKAGE_CFG80211_TESTMODE
+		bool "Enable testmode command support"
+		default n
+		help
+		  This is typically used for tests and calibration during
+		  manufacturing, or vendor specific debugging features
+
+  endif
+endef
+
+
 define KernelPackage/mac80211
 define KernelPackage/mac80211
   $(call KernelPackage/mac80211/Default)
   $(call KernelPackage/mac80211/Default)
   TITLE:=Linux 802.11 Wireless Networking Stack
   TITLE:=Linux 802.11 Wireless Networking Stack