aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2013-10-30 04:18:21 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-30 17:18:45 -0400
commit3961532fd41f13e6d6958c44c0ccc567da144a79 (patch)
treed69c7f6af0de8e0b0c5ddf78799bcd68b9dd4bae /net
parentba4865027c11d7ac8e5a33e0624dd415caab2027 (diff)
6lowpan: remove unnecessary set of headers
On receiving side we don't need to set any headers in skb because the 6LoWPAN layer do not access it. Currently these values will set twice after calling netif_rx. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Werner Almesberger <werner@almesberger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ieee802154/6lowpan.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index fde90e63027d..6d6778432144 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -737,7 +737,6 @@ static int lowpan_skb_deliver(struct sk_buff *skb, struct ipv6hdr *hdr)
737 return -ENOMEM; 737 return -ENOMEM;
738 738
739 skb_push(new, sizeof(struct ipv6hdr)); 739 skb_push(new, sizeof(struct ipv6hdr));
740 skb_reset_network_header(new);
741 skb_copy_to_linear_data(new, hdr, sizeof(struct ipv6hdr)); 740 skb_copy_to_linear_data(new, hdr, sizeof(struct ipv6hdr));
742 741
743 new->protocol = htons(ETH_P_IPV6); 742 new->protocol = htons(ETH_P_IPV6);
@@ -1059,7 +1058,6 @@ lowpan_process_data(struct sk_buff *skb)
1059 skb = new; 1058 skb = new;
1060 1059
1061 skb_push(skb, sizeof(struct udphdr)); 1060 skb_push(skb, sizeof(struct udphdr));
1062 skb_reset_transport_header(skb);
1063 skb_copy_to_linear_data(skb, &uh, sizeof(struct udphdr)); 1061 skb_copy_to_linear_data(skb, &uh, sizeof(struct udphdr));
1064 1062
1065 lowpan_raw_dump_table(__func__, "raw UDP header dump", 1063 lowpan_raw_dump_table(__func__, "raw UDP header dump",
@@ -1323,8 +1321,6 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *dev,
1323 1321
1324 /* Pull off the 1-byte of 6lowpan header. */ 1322 /* Pull off the 1-byte of 6lowpan header. */
1325 skb_pull(local_skb, 1); 1323 skb_pull(local_skb, 1);
1326 skb_reset_network_header(local_skb);
1327 skb_set_transport_header(local_skb, sizeof(struct ipv6hdr));
1328 1324
1329 lowpan_give_skb_to_devices(local_skb); 1325 lowpan_give_skb_to_devices(local_skb);
1330 1326