1 /* This program is free software; you can redistribute it and/or modify
2 * it under the terms of the GNU General Public License version 2
3 * as published by the Free Software Foundation.
5 * This program is distributed in the hope that it will be useful,
6 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8 * GNU General Public License for more details.
11 * (C) 2015 Pengutronix, Alexander Aring <aar@pengutronix.de>
12 * Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
15 #include <net/6lowpan.h>
17 #include "6lowpan_i.h"
19 static struct dentry
*lowpan_debugfs
;
21 int lowpan_dev_debugfs_init(struct net_device
*dev
)
23 struct lowpan_priv
*lpriv
= lowpan_priv(dev
);
25 /* creating the root */
26 lpriv
->iface_debugfs
= debugfs_create_dir(dev
->name
, lowpan_debugfs
);
27 if (!lpriv
->iface_debugfs
)
36 void lowpan_dev_debugfs_exit(struct net_device
*dev
)
38 debugfs_remove_recursive(lowpan_priv(dev
)->iface_debugfs
);
41 int __init
lowpan_debugfs_init(void)
43 lowpan_debugfs
= debugfs_create_dir("6lowpan", NULL
);
50 void lowpan_debugfs_exit(void)
52 debugfs_remove_recursive(lowpan_debugfs
);