dsa: 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>
This commit is contained in:
Joe Perches 2014-01-20 09:52:20 -08:00 committed by David S. Miller
parent 9ea08b1299
commit d08f161a10
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ static int dsa_slave_set_mac_address(struct net_device *dev, void *a)
dev_uc_del(master, dev->dev_addr);
out:
memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
ether_addr_copy(dev->dev_addr, addr->sa_data);
return 0;
}