diff options
author | Alexander Aring <aar@pengutronix.de> | 2016-04-11 11:04:23 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-04-13 10:41:10 +0200 |
commit | 2732363181766533af65e9ced3dc04a30502c5d1 (patch) | |
tree | 17abe73f09eca0722d63d3cc4fc9bd57d3759c91 /net/6lowpan | |
parent | 6lowpan: move eui64 uncompress function (diff) | |
download | linux-2732363181766533af65e9ced3dc04a30502c5d1.tar.xz linux-2732363181766533af65e9ced3dc04a30502c5d1.zip |
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>
Diffstat (limited to 'net/6lowpan')
-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 @@ #include <linux/netdevice.h> +#include <net/6lowpan.h> + +/* caller need to be sure it's dev->type is ARPHRD_6LOWPAN */ +static inline bool lowpan_is_ll(const struct net_device *dev, + enum lowpan_lltypes lltype) +{ + return lowpan_dev(dev)->lltype == lltype; +} + #ifdef CONFIG_6LOWPAN_DEBUGFS int lowpan_dev_debugfs_init(struct net_device *dev); void lowpan_dev_debugfs_exit(struct net_device *dev); |