uncouple ATH_DEBUGFS from MAC80211_DEBUGFS

MAC80211_DEBUGFS selects the atheros wireless debugfs options,
but not the debugfs options from rt2x00-lib and b43.
Make it consistent and add a ATH_DEBUGFS option.

ATH_DEBUG needs ATH_DEBUGFS, so select it.

When the new ATH_DEBUGFS is disabled and MAC80211_DEBUGFS is enabled,
it saves about 25k on a compressed image here.

Signed-off-by: Stefan Hellermann <[email protected]>


--- a/package/mac80211/Makefile
+++ b/package/mac80211/Makefile
@@ -35,6 +35,7 @@ PKG_CONFIG_DEPENDS:= \
        $(patsubst %,CONFIG_PACKAGE_kmod-%,$(PKG_DRIVERS)) \
        CONFIG_PACKAGE_MAC80211_DEBUGFS \
        CONFIG_PACKAGE_MAC80211_MESH \
+       CONFIG_PACKAGE_ATH_DEBUGFS \
        CONFIG_PACKAGE_ATH_DEBUG \
        CONFIG_PACKAGE_B43_DEBUG \
        CONFIG_PACKAGE_B43_PIO \
@@ -220,7 +221,7 @@ define KernelPackage/rt2x00-lib/config
 
        config PACKAGE_RT2X00_LIB_DEBUGFS
                bool "Enable rt2x00 debugfs support"
-               depends PACKAGE_MAC80211_DEBUGFS
+               select PACKAGE_MAC80211_DEBUGFS
                help
                  Enable creation of debugfs files for the rt2x00 drivers.
                  These debugfs files support both reading and writing of the
@@ -383,11 +384,22 @@ define KernelPackage/ath/config
                  Select this option if you want the driver to respect the 
user's decision about
                  regulatory settings.
 
+       config PACKAGE_ATH_DEBUGFS
+               bool "Atheros wireless debugfs support"
+               select PACKAGE_MAC80211_DEBUGFS
+               default y
+               help
+                 Enable creation of debugfs files for the atheros wireless 
drivers.
+                 These debugfs files support both reading and writing of the
+                 most important register types of the atheros wireless 
hardware.
+                 Additionally you can read extensive information and 
statistics.
+                 It's used on Buffalo WZR-HP-AG300H to enable LED support.
+
        config PACKAGE_ATH_DEBUG
                bool "Atheros wireless debugging"
+               select PACKAGE_ATH_DEBUGFS
                help
                  Say Y, if you want to debug atheros wireless drivers.
-                 Right now only ath9k makes use of this.
   endif
 endef
 
@@ -1171,9 +1183,10 @@ BUILDFLAGS:= \
        -DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG \
        $(if $(CONFIG_PCI),-DCONFIG_ATH9K_PCI) \
        $(if $(CONFIG_TARGET_ar71xx),-DCONFIG_ATH9K_AHB) \
-       $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS), -DCONFIG_CFG80211_DEBUGFS 
-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS -DCONFIG_CARL9170_DEBUGFS 
-DCONFIG_ATH9K_HTC_DEBUGFS -DCONFIG_ATH5K_DEBUG) \
+       $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS), -DCONFIG_CFG80211_DEBUGFS 
-DCONFIG_MAC80211_DEBUGFS) \
+       $(if $(CONFIG_PACKAGE_ATH_DEBUGFS), -DCONFIG_ATH9K_DEBUGFS 
-DCONFIG_CARL9170_DEBUGFS -DCONFIG_ATH9K_HTC_DEBUGFS) \
        $(if $(CONFIG_PACKAGE_MAC80211_MESH),-DCONFIG_MAC80211_MESH) \
-       $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG 
-DCONFIG_ATH9K_PKTLOG) \
+       $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG 
-DCONFIG_ATH9K_MAC_DEBUG -DCONFIG_ATH9K_PKTLOG -DCONFIG_ATH5K_DEBUG) \
        -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
        -DCONFIG_MAC80211_RC_MINSTREL_HT \
        $(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \
@@ -1239,17 +1252,18 @@ MAKE_OPTS:= \
        CONFIG_ATH5K=$(if $(CONFIG_PACKAGE_kmod-ath5k),m) \
        CONFIG_ATH5K_PCI=$(if $(CONFIG_TARGET_atheros),,y) \
        CONFIG_ATH5K_AHB=$(if $(CONFIG_TARGET_atheros),y) \
-       CONFIG_ATH5K_DEBUG=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
+       CONFIG_ATH5K_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
        CONFIG_ATH9K=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
        CONFIG_ATH9K_PCI=$(CONFIG_PCI) \
        CONFIG_ATH9K_AHB=$(if $(CONFIG_TARGET_ar71xx),y) \
        CONFIG_ATH9K_HTC=$(if $(CONFIG_PACKAGE_kmod-ath9k-htc),m) \
-       CONFIG_ATH9K_HTC_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
+       CONFIG_ATH9K_HTC_DEBUGFS=$(if $(CONFIG_PACKAGE_ATH_DEBUGFS),y) \
        CONFIG_ATH9K_HW=$(if $(CONFIG_PACKAGE_kmod-ath9k-common),m) \
        CONFIG_ATH9K_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath9k-common),m) \
-       CONFIG_ATH9K_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
+       CONFIG_ATH9K_DEBUGFS=$(if $(CONFIG_PACKAGE_ATH_DEBUGFS),y) \
+       CONFIG_ATH9K_MAC_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
        CONFIG_CARL9170=$(if $(CONFIG_PACKAGE_kmod-carl9170),m) \
-       CONFIG_CARL9170_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
+       CONFIG_CARL9170_DEBUGFS=$(if $(CONFIG_PACKAGE_ATH_DEBUGFS),y) \
        CONFIG_COMPAT_ZD1211RW=$(if $(CONFIG_PACKAGE_kmod-zd1211rw),m) \
        CONFIG_P54_COMMON=$(if $(CONFIG_PACKAGE_kmod-p54-common),m) \
        CONFIG_P54_PCI=$(if $(CONFIG_PACKAGE_kmod-p54-pci),m) \
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to