These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / net / 6lowpan / nhc.c
index fd20fc5..7008d53 100644 (file)
@@ -95,23 +95,20 @@ static struct lowpan_nhc *lowpan_nhc_by_nhcid(const struct sk_buff *skb)
 }
 
 int lowpan_nhc_check_compression(struct sk_buff *skb,
-                                const struct ipv6hdr *hdr, u8 **hc_ptr,
-                                u8 *iphc0)
+                                const struct ipv6hdr *hdr, u8 **hc_ptr)
 {
        struct lowpan_nhc *nhc;
+       int ret = 0;
 
        spin_lock_bh(&lowpan_nhc_lock);
 
        nhc = lowpan_nexthdr_nhcs[hdr->nexthdr];
-       if (nhc && nhc->compress)
-               *iphc0 |= LOWPAN_IPHC_NH_C;
-       else
-               lowpan_push_hc_data(hc_ptr, &hdr->nexthdr,
-                                   sizeof(hdr->nexthdr));
+       if (!(nhc && nhc->compress))
+               ret = -ENOENT;
 
        spin_unlock_bh(&lowpan_nhc_lock);
 
-       return 0;
+       return ret;
 }
 
 int lowpan_nhc_do_compression(struct sk_buff *skb, const struct ipv6hdr *hdr,
@@ -157,7 +154,8 @@ out:
        return ret;
 }
 
-int lowpan_nhc_do_uncompression(struct sk_buff *skb, struct net_device *dev,
+int lowpan_nhc_do_uncompression(struct sk_buff *skb,
+                               const struct net_device *dev,
                                struct ipv6hdr *hdr)
 {
        struct lowpan_nhc *nhc;