summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/gateway_client.c
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@meshcoding.com>2014-01-22 00:42:11 +0100
committerAntonio Quartulli <antonio@meshcoding.com>2014-03-22 08:50:26 +0100
commit8fdd01530cda849ba531e7e9d8674fbc81ab5782 (patch)
treed2a19df1128530d694d7dce1c04d6f24515beb26 /net/batman-adv/gateway_client.c
parente88b617d84b53170f0781cc0756019c5b1855890 (diff)
downloadtalos-obmc-linux-8fdd01530cda849ba531e7e9d8674fbc81ab5782.tar.gz
talos-obmc-linux-8fdd01530cda849ba531e7e9d8674fbc81ab5782.zip
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/gateway_client.c')
-rw-r--r--net/batman-adv/gateway_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index 07c7f2177648..c835e137423b 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -763,7 +763,7 @@ batadv_gw_dhcp_recipient_get(struct sk_buff *skb, unsigned int *header_len,
if (*p != ETH_ALEN)
return BATADV_DHCP_NO;
- memcpy(chaddr, skb->data + chaddr_offset, ETH_ALEN);
+ ether_addr_copy(chaddr, skb->data + chaddr_offset);
}
return ret;
OpenPOWER on IntegriCloud