[RFC bluetooth-next 10/19] 6lowpan: add lowpan_is_ll function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 include/net/6lowpan.h | 7 +++++++
 1 file changed, 7 insertions(+)

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 */
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux