The IEEE 802.15.4 protocol stack (net/ieee802154/) generates a lot
of debugging messages.

The DEBUG option was hard-coded in the Makefile. This patch adds a
config option (defaulting to "yes") to allow selectively disabling
the debugging output.

Signed-off-by: Werner Almesberger <wer...@almesberger.net>

---
 net/ieee802154/Kconfig  |    8 ++++++++
 net/ieee802154/Makefile |    3 ++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/net/ieee802154/Kconfig b/net/ieee802154/Kconfig
index 1c1de97..70a979a 100644
--- a/net/ieee802154/Kconfig
+++ b/net/ieee802154/Kconfig
@@ -10,3 +10,11 @@ config IEEE802154
 
          Say Y here to compile LR-WPAN support into the kernel or say M to
          compile it as modules.
+
+config IEEE802154_PROTO_DEBUG
+       bool "IEEE 802.15.4 protocol stack debugging messages"
+       depends on IEEE802154
+       default y
+       help
+         Say Y here to make the IEEE 802.15.4 protocol stack generate
+         extensive debugging messages.
diff --git a/net/ieee802154/Makefile b/net/ieee802154/Makefile
index ce2d335..53f1ec3 100644
--- a/net/ieee802154/Makefile
+++ b/net/ieee802154/Makefile
@@ -2,4 +2,5 @@ obj-$(CONFIG_IEEE802154) +=     ieee802154.o af_802154.o
 ieee802154-y           := netlink.o nl-mac.o nl-phy.o nl_policy.o wpan-class.o
 af_802154-y            := af_ieee802154.o raw.o dgram.o
 
-ccflags-y += -Wall -DDEBUG
+ccflags-$(CONFIG_IEEE802154_PROTO_DEBUG) += -DDEBUG
+ccflags-y += -Wall
-- 
1.7.0.4


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to