Skip to content

Commit

Permalink
igbvf: reset netdevice addr_assign_type if changed
Browse files Browse the repository at this point in the history
Reset the state of addr_assign_type to NET_ADDR_PERM as soon as
the MAC get changed via .ndo_set_mac_address.

v2: use bitops to reset addr_assign_type

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Danny Kukawka authored and David S. Miller committed Feb 17, 2012
1 parent 5a5e7c3 commit 067fb4c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/igbvf/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,7 @@ static int igbvf_set_mac(struct net_device *netdev, void *p)
return -EADDRNOTAVAIL;

memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
netdev->addr_assign_type &= ~NET_ADDR_RANDOM;

return 0;
}
Expand Down

0 comments on commit 067fb4c

Please sign in to comment.