diff options
author | Alexander Aring <aar@pengutronix.de> | 2016-04-11 05:04:23 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-04-13 04:41:10 -0400 |
commit | 2732363181766533af65e9ced3dc04a30502c5d1 (patch) | |
tree | 17abe73f09eca0722d63d3cc4fc9bd57d3759c91 | |
parent | a5862f2aba4ba53d461450685a67ae252935ab94 (diff) |
6lowpan: add lowpan_is_ll function
This patch adds the lowpan_is_ll function, which can be used to make a
special 6lowpan linklayer handling for a specific 6lowpan linklayer
type.
Signed-off-by: Alexander Aring <aar@pengutronix.de>
Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/6lowpan/6lowpan_i.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/6lowpan/6lowpan_i.h b/net/6lowpan/6lowpan_i.h index d16bb4b14aa1..97ecc27aeca6 100644 --- a/net/6lowpan/6lowpan_i.h +++ b/net/6lowpan/6lowpan_i.h | |||
@@ -3,6 +3,15 @@ | |||
3 | 3 | ||
4 | #include <linux/netdevice.h> | 4 | #include <linux/netdevice.h> |
5 | 5 | ||
6 | #include <net/6lowpan.h> | ||
7 | |||
8 | /* caller need to be sure it's dev->type is ARPHRD_6LOWPAN */ | ||
9 | static inline bool lowpan_is_ll(const struct net_device *dev, | ||
10 | enum lowpan_lltypes lltype) | ||
11 | { | ||
12 | return lowpan_dev(dev)->lltype == lltype; | ||
13 | } | ||
14 | |||
6 | #ifdef CONFIG_6LOWPAN_DEBUGFS | 15 | #ifdef CONFIG_6LOWPAN_DEBUGFS |
7 | int lowpan_dev_debugfs_init(struct net_device *dev); | 16 | int lowpan_dev_debugfs_init(struct net_device *dev); |
8 | void lowpan_dev_debugfs_exit(struct net_device *dev); | 17 | void lowpan_dev_debugfs_exit(struct net_device *dev); |