From 3e69162ea4a9e927cb3619b96c86aae4ded60112 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Wed, 30 Oct 2013 09:18:22 +0100 Subject: 6lowpan: set and use mac_len for mac header length Set the mac header length while creating the 802.15.4 mac header. Drop the function for recalculate mac header length in upper layers which was static and works for intra pan communication only. Signed-off-by: Alexander Aring Reviewed-by: Werner Almesberger Signed-off-by: David S. Miller --- net/mac802154/wpan.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net/mac802154') diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c index 2ca2f4dceab7..e24bcf977296 100644 --- a/net/mac802154/wpan.c +++ b/net/mac802154/wpan.c @@ -208,6 +208,8 @@ static int mac802154_header_create(struct sk_buff *skb, head[1] = fc >> 8; memcpy(skb_push(skb, pos), head, pos); + skb_reset_mac_header(skb); + skb->mac_len = pos; return pos; } -- cgit v1.2.3