Skip to content

Commit

Permalink
6lowpan: add lowpan_is_ll function
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Stefan Schmidt<[email protected]>
Acked-by: Jukka Rissanen <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
Alexander Aring authored and holtmann committed Apr 13, 2016
1 parent a5862f2 commit 2732363
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions net/6lowpan/6lowpan_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2732363

Please sign in to comment.