diff options
Diffstat (limited to 'drivers/net/ethernet/sfc/siena_sriov.c')
-rw-r--r-- | drivers/net/ethernet/sfc/siena_sriov.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c index 0c38f926871e..9a9205e77896 100644 --- a/drivers/net/ethernet/sfc/siena_sriov.c +++ b/drivers/net/ethernet/sfc/siena_sriov.c | |||
@@ -1095,7 +1095,7 @@ static void efx_sriov_peer_work(struct work_struct *data) | |||
1095 | 1095 | ||
1096 | /* Fill the remaining addresses */ | 1096 | /* Fill the remaining addresses */ |
1097 | list_for_each_entry(local_addr, &efx->local_addr_list, link) { | 1097 | list_for_each_entry(local_addr, &efx->local_addr_list, link) { |
1098 | memcpy(peer->mac_addr, local_addr->addr, ETH_ALEN); | 1098 | ether_addr_copy(peer->mac_addr, local_addr->addr); |
1099 | peer->tci = 0; | 1099 | peer->tci = 0; |
1100 | ++peer; | 1100 | ++peer; |
1101 | ++peer_count; | 1101 | ++peer_count; |
@@ -1303,8 +1303,7 @@ int efx_sriov_init(struct efx_nic *efx) | |||
1303 | goto fail_vfs; | 1303 | goto fail_vfs; |
1304 | 1304 | ||
1305 | rtnl_lock(); | 1305 | rtnl_lock(); |
1306 | memcpy(vfdi_status->peers[0].mac_addr, | 1306 | ether_addr_copy(vfdi_status->peers[0].mac_addr, net_dev->dev_addr); |
1307 | net_dev->dev_addr, ETH_ALEN); | ||
1308 | efx->vf_init_count = efx->vf_count; | 1307 | efx->vf_init_count = efx->vf_count; |
1309 | rtnl_unlock(); | 1308 | rtnl_unlock(); |
1310 | 1309 | ||
@@ -1452,8 +1451,8 @@ void efx_sriov_mac_address_changed(struct efx_nic *efx) | |||
1452 | 1451 | ||
1453 | if (!efx->vf_init_count) | 1452 | if (!efx->vf_init_count) |
1454 | return; | 1453 | return; |
1455 | memcpy(vfdi_status->peers[0].mac_addr, | 1454 | ether_addr_copy(vfdi_status->peers[0].mac_addr, |
1456 | efx->net_dev->dev_addr, ETH_ALEN); | 1455 | efx->net_dev->dev_addr); |
1457 | queue_work(vfdi_workqueue, &efx->peer_work); | 1456 | queue_work(vfdi_workqueue, &efx->peer_work); |
1458 | } | 1457 | } |
1459 | 1458 | ||
@@ -1570,7 +1569,7 @@ int efx_sriov_set_vf_mac(struct net_device *net_dev, int vf_i, u8 *mac) | |||
1570 | vf = efx->vf + vf_i; | 1569 | vf = efx->vf + vf_i; |
1571 | 1570 | ||
1572 | mutex_lock(&vf->status_lock); | 1571 | mutex_lock(&vf->status_lock); |
1573 | memcpy(vf->addr.mac_addr, mac, ETH_ALEN); | 1572 | ether_addr_copy(vf->addr.mac_addr, mac); |
1574 | __efx_sriov_update_vf_addr(vf); | 1573 | __efx_sriov_update_vf_addr(vf); |
1575 | mutex_unlock(&vf->status_lock); | 1574 | mutex_unlock(&vf->status_lock); |
1576 | 1575 | ||
@@ -1633,7 +1632,7 @@ int efx_sriov_get_vf_config(struct net_device *net_dev, int vf_i, | |||
1633 | vf = efx->vf + vf_i; | 1632 | vf = efx->vf + vf_i; |
1634 | 1633 | ||
1635 | ivi->vf = vf_i; | 1634 | ivi->vf = vf_i; |
1636 | memcpy(ivi->mac, vf->addr.mac_addr, ETH_ALEN); | 1635 | ether_addr_copy(ivi->mac, vf->addr.mac_addr); |
1637 | ivi->tx_rate = 0; | 1636 | ivi->tx_rate = 0; |
1638 | tci = ntohs(vf->addr.tci); | 1637 | tci = ntohs(vf->addr.tci); |
1639 | ivi->vlan = tci & VLAN_VID_MASK; | 1638 | ivi->vlan = tci & VLAN_VID_MASK; |