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 <[email protected]>
Reviewed-by: Werner Almesberger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Alexander Aring 2013-10-30 09:18:22 +01:00 • committed by David S. Miller
commit 3e69162ea4
2 changed files with 3 additions and 12 deletions

View file

@ -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;
}