diff options
author | Joe Perches <joe@perches.com> | 2014-01-20 12:52:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-21 21:13:05 -0500 |
commit | c62326abac8f40b904c8daebd7c1a6c624ebddd6 (patch) | |
tree | 7097a77be202fd824797f9c373f4c320d22824f8 /net/core/netpoll.c | |
parent | 34b2cff4eeaa694bf629dfe140eec8cebb60cb9a (diff) |
netpoll: Use ether_addr_copy
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>
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 19fe9c717ced..c03f3dec4763 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -520,8 +520,8 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len) | |||
520 | skb->protocol = eth->h_proto = htons(ETH_P_IP); | 520 | skb->protocol = eth->h_proto = htons(ETH_P_IP); |
521 | } | 521 | } |
522 | 522 | ||
523 | memcpy(eth->h_source, np->dev->dev_addr, ETH_ALEN); | 523 | ether_addr_copy(eth->h_source, np->dev->dev_addr); |
524 | memcpy(eth->h_dest, np->remote_mac, ETH_ALEN); | 524 | ether_addr_copy(eth->h_dest, np->remote_mac); |
525 | 525 | ||
526 | skb->dev = np->dev; | 526 | skb->dev = np->dev; |
527 | 527 | ||