diff options
author | Joe Perches <joe@perches.com> | 2014-02-18 09:42:45 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-19 15:37:51 -0500 |
commit | 2a7c183bc7ae798915c4bc58d3bf413fe466705b (patch) | |
tree | 216ea76f1cbcfb55ba52819fa4360702bcb381f2 /drivers/net/bonding/bond_main.c | |
parent | 4cc5c475797ae9152738d8ea53131576083e4d5b (diff) | |
download | lwn-2a7c183bc7ae798915c4bc58d3bf413fe466705b.tar.gz lwn-2a7c183bc7ae798915c4bc58d3bf413fe466705b.zip |
bonding: More use of ether_addr_copy
It's smaller and faster for some architectures.
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index afae7cab5cf6..71edf03544aa 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -674,8 +674,8 @@ static void bond_do_fail_over_mac(struct bonding *bond, if (old_active) { ether_addr_copy(tmp_mac, new_active->dev->dev_addr); - memcpy(saddr.sa_data, old_active->dev->dev_addr, - ETH_ALEN); + ether_addr_copy(saddr.sa_data, + old_active->dev->dev_addr); saddr.sa_family = new_active->dev->type; } else { ether_addr_copy(saddr.sa_data, bond->dev->dev_addr); @@ -1139,7 +1139,7 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) kfree_skb(skb); return RX_HANDLER_CONSUMED; } - memcpy(eth_hdr(skb)->h_dest, bond->dev->dev_addr, ETH_ALEN); + ether_addr_copy(eth_hdr(skb)->h_dest, bond->dev->dev_addr); } return ret; |