Creating "6lowpan" debugfs entry (/sys/kernel/debugfs/6lowpan) for usage by 6lowpan module. Signed-off-by: Lukasz Duda <lukasz.duda@xxxxxxxxxxxxx> Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@xxxxxxxxxxxxx> --- include/net/6lowpan.h | 2 ++ net/6lowpan/iphc.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/net/6lowpan.h b/include/net/6lowpan.h index dc03d77..37ddbdf 100644 --- a/include/net/6lowpan.h +++ b/include/net/6lowpan.h @@ -197,6 +197,8 @@ #define LOWPAN_NHC_UDP_CS_P_11 0xF3 /* source & dest = 0xF0B + 4bit inline */ #define LOWPAN_NHC_UDP_CS_C 0x04 /* checksum elided */ +extern struct dentry *lowpan_debugfs; + #ifdef DEBUG /* print data in line */ static inline void raw_dump_inline(const char *caller, char *msg, diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c index 9055d7b..c845a8a 100644 --- a/net/6lowpan/iphc.c +++ b/net/6lowpan/iphc.c @@ -50,12 +50,16 @@ #include <linux/if_arp.h> #include <linux/module.h> #include <linux/netdevice.h> +#include <linux/debugfs.h> #include <net/6lowpan.h> #include <net/ipv6.h> #include <net/af_ieee802154.h> #include "nhc.h" +struct dentry *lowpan_debugfs; +EXPORT_SYMBOL_GPL(lowpan_debugfs); + /* Uncompress address function for source and * destination address(non-multicast). * @@ -613,6 +617,8 @@ EXPORT_SYMBOL_GPL(lowpan_header_compress); static int __init lowpan_module_init(void) { + lowpan_debugfs = debugfs_create_dir("6lowpan", NULL); + request_module_nowait("ipv6"); request_module_nowait("nhc_dest"); @@ -625,6 +631,13 @@ static int __init lowpan_module_init(void) return 0; } + +static void __exit lowpan_module_exit(void) +{ + debugfs_remove(lowpan_debugfs); +} + module_init(lowpan_module_init); +module_exit(lowpan_module_exit); MODULE_LICENSE("GPL"); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html