netpoll: Use ether_addr_copy
authorJoe Perches <joe@perches.com>
Mon, 20 Jan 2014 17:52:18 +0000 (09:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jan 2014 02:13:05 +0000 (18:13 -0800)
Use ether_addr_copy instead of memcpy(a, b, ETH_ALEN) to
save some cycles on arm and powerpc.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/netpoll.c

index 19fe9c717cedb56051ff6cb5effca0274fd946d8..c03f3dec4763fc507edc56167cd8e88a209fb197 100644 (file)
@@ -520,8 +520,8 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
                skb->protocol = eth->h_proto = htons(ETH_P_IP);
        }
 
-       memcpy(eth->h_source, np->dev->dev_addr, ETH_ALEN);
-       memcpy(eth->h_dest, np->remote_mac, ETH_ALEN);
+       ether_addr_copy(eth->h_source, np->dev->dev_addr);
+       ether_addr_copy(eth->h_dest, np->remote_mac);
 
        skb->dev = np->dev;