Merge tag 'upstream-4.9-rc3' of git://git.infradead.org/linux-ubifs
[cascardo/linux.git] / include / net / 6lowpan.h
index da84cf9..5ab4c99 100644 (file)
@@ -141,6 +141,16 @@ struct lowpan_dev {
        u8 priv[0] __aligned(sizeof(void *));
 };
 
+struct lowpan_802154_neigh {
+       __le16 short_addr;
+};
+
+static inline
+struct lowpan_802154_neigh *lowpan_802154_neigh(void *neigh_priv)
+{
+       return neigh_priv;
+}
+
 static inline
 struct lowpan_dev *lowpan_dev(const struct net_device *dev)
 {
@@ -244,6 +254,12 @@ static inline bool lowpan_fetch_skb(struct sk_buff *skb, void *data,
        return false;
 }
 
+static inline bool lowpan_802154_is_valid_src_short_addr(__le16 addr)
+{
+       /* First bit of addr is multicast, reserved or 802.15.4 specific */
+       return !(addr & cpu_to_le16(0x8000));
+}
+
 static inline void lowpan_push_hc_data(u8 **hc_ptr, const void *data,
                                       const size_t len)
 {