aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/fragmentation.c
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@meshcoding.com>2014-01-21 18:42:11 -0500
committerAntonio Quartulli <antonio@meshcoding.com>2014-03-22 03:50:26 -0400
commit8fdd01530cda849ba531e7e9d8674fbc81ab5782 (patch)
treed2a19df1128530d694d7dce1c04d6f24515beb26 /net/batman-adv/fragmentation.c
parente88b617d84b53170f0781cc0756019c5b1855890 (diff)
batman-adv: prefer ether_addr_copy to memcpy
On some architectures ether_addr_copy() is slightly faster than memcpy() therefore use the former when possible. Signed-off-by: Antonio Quartulli <antonio@meshcoding.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/fragmentation.c')
-rw-r--r--net/batman-adv/fragmentation.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index 88df9b1d552d..bcc4bea632fa 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -449,8 +449,8 @@ bool batadv_frag_send_packet(struct sk_buff *skb,
449 frag_header.reserved = 0; 449 frag_header.reserved = 0;
450 frag_header.no = 0; 450 frag_header.no = 0;
451 frag_header.total_size = htons(skb->len); 451 frag_header.total_size = htons(skb->len);
452 memcpy(frag_header.orig, primary_if->net_dev->dev_addr, ETH_ALEN); 452 ether_addr_copy(frag_header.orig, primary_if->net_dev->dev_addr);
453 memcpy(frag_header.dest, orig_node->orig, ETH_ALEN); 453 ether_addr_copy(frag_header.dest, orig_node->orig);
454 454
455 /* Eat and send fragments from the tail of skb */ 455 /* Eat and send fragments from the tail of skb */
456 while (skb->len > max_fragment_size) { 456 while (skb->len > max_fragment_size) {