diff options
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10_sriov.c')
| -rw-r--r-- | drivers/net/ethernet/sfc/ef10_sriov.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c index 019cef1d3cf7..3d76fd1504c2 100644 --- a/drivers/net/ethernet/sfc/ef10_sriov.c +++ b/drivers/net/ethernet/sfc/ef10_sriov.c | |||
| @@ -199,7 +199,7 @@ static int efx_ef10_sriov_alloc_vf_vswitching(struct efx_nic *efx) | |||
| 199 | return -ENOMEM; | 199 | return -ENOMEM; |
| 200 | 200 | ||
| 201 | for (i = 0; i < efx->vf_count; i++) { | 201 | for (i = 0; i < efx->vf_count; i++) { |
| 202 | random_ether_addr(nic_data->vf[i].mac); | 202 | eth_random_addr(nic_data->vf[i].mac); |
| 203 | nic_data->vf[i].efx = NULL; | 203 | nic_data->vf[i].efx = NULL; |
| 204 | nic_data->vf[i].vlan = EFX_EF10_NO_VLAN; | 204 | nic_data->vf[i].vlan = EFX_EF10_NO_VLAN; |
| 205 | 205 | ||
| @@ -564,7 +564,7 @@ int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i, u16 vlan, | |||
| 564 | { | 564 | { |
| 565 | struct efx_ef10_nic_data *nic_data = efx->nic_data; | 565 | struct efx_ef10_nic_data *nic_data = efx->nic_data; |
| 566 | struct ef10_vf *vf; | 566 | struct ef10_vf *vf; |
| 567 | u16 old_vlan, new_vlan; | 567 | u16 new_vlan; |
| 568 | int rc = 0, rc2 = 0; | 568 | int rc = 0, rc2 = 0; |
| 569 | 569 | ||
| 570 | if (vf_i >= efx->vf_count) | 570 | if (vf_i >= efx->vf_count) |
| @@ -619,7 +619,6 @@ int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i, u16 vlan, | |||
| 619 | } | 619 | } |
| 620 | 620 | ||
| 621 | /* Do the actual vlan change */ | 621 | /* Do the actual vlan change */ |
| 622 | old_vlan = vf->vlan; | ||
| 623 | vf->vlan = new_vlan; | 622 | vf->vlan = new_vlan; |
| 624 | 623 | ||
| 625 | /* Restore everything in reverse order */ | 624 | /* Restore everything in reverse order */ |
