Commit c62326ab authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 34b2cff4
...@@ -520,8 +520,8 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len) ...@@ -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); skb->protocol = eth->h_proto = htons(ETH_P_IP);
} }
memcpy(eth->h_source, np->dev->dev_addr, ETH_ALEN); ether_addr_copy(eth->h_source, np->dev->dev_addr);
memcpy(eth->h_dest, np->remote_mac, ETH_ALEN); ether_addr_copy(eth->h_dest, np->remote_mac);
skb->dev = np->dev; skb->dev = np->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment