Message ID | 1458652515-7862-11-git-send-email-aar@pengutronix.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
diff --git a/include/net/6lowpan.h b/include/net/6lowpan.h index 04b877c..6c09d01 100644 --- a/include/net/6lowpan.h +++ b/include/net/6lowpan.h @@ -144,6 +144,13 @@ struct lowpan_dev *lowpan_dev(const struct net_device *dev) return netdev_priv(dev); } +static inline bool lowpan_is_ll(const struct net_device *dev, + enum lowpan_lltypes lltype) +{ + return (dev->type == ARPHRD_6LOWPAN && + lowpan_dev(dev)->lltype == lltype); +} + /* private device info */ struct lowpan_802154_dev { struct net_device *wdev; /* wpan device ptr */
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> --- include/net/6lowpan.h | 7 +++++++ 1 file changed, 7 insertions(+)