summaryrefslogtreecommitdiffstats
path: root/net/6lowpan/nhc.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-10-13 13:42:58 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-10-21 00:49:24 +0200
commit8911d7748ca360ef96cb207cc5165eb9c08669e5 (patch)
treeed912fd4c9021f1f937eece443d0be1173b9c5c1 /net/6lowpan/nhc.c
parenta6f773891a836abfa16fcbb8af14c29c3e109336 (diff)
downloadlinux-8911d7748ca360ef96cb207cc5165eb9c08669e5.tar.gz
linux-8911d7748ca360ef96cb207cc5165eb9c08669e5.tar.bz2
linux-8911d7748ca360ef96cb207cc5165eb9c08669e5.zip
6lowpan: cleanup lowpan_header_decompress
This patch changes the lowpan_header_decompress function by removing inklayer related information from parameters. This is currently for supporting short and extended address for iphc handling in 802154. We don't support short address handling anyway right now, but there exists already code for handling short addresses in lowpan_header_decompress. The address parameters are also changed to a void pointer, so 6LoWPAN linklayer specific code can put complex structures as these parameters and cast it again inside the generic code by evaluating linklayer type before. The order is also changed by destination address at first and then source address, which is the same like all others functions where destination is always the first, memcpy, dev_hard_header, lowpan_header_compress, etc. This patch also moves the fetching of iphc values from 6LoWPAN linklayer specific code into the generic branch. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/6lowpan/nhc.c')
-rw-r--r--net/6lowpan/nhc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/6lowpan/nhc.c b/net/6lowpan/nhc.c
index fd20fc51a7c4..589224e458dd 100644
--- a/net/6lowpan/nhc.c
+++ b/net/6lowpan/nhc.c
@@ -157,7 +157,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;