Skip to content

Commit

Permalink
igbvf, ixgbevf: use dev_hw_addr_random
Browse files Browse the repository at this point in the history
Both igbvf and ixgbevf should set addr_assign_type to NET_ADDR_RANDOM
so udev creates persistent net rules by matching the device path.
Do this by using the dev_hw_addr_random helper function.

Signed-off-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stefan Assmann authored and David S. Miller committed Jul 27, 2010
1 parent 56075a9 commit 2c6952d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/igbvf/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2751,7 +2751,7 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
dev_info(&pdev->dev,
"PF still in reset state, assigning new address."
" Is the PF interface up?\n");
random_ether_addr(hw->mac.addr);
dev_hw_addr_random(adapter->netdev, hw->mac.addr);
} else {
err = hw->mac.ops.read_mac_addr(hw);
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ixgbevf/ixgbevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2229,7 +2229,7 @@ static int __devinit ixgbevf_sw_init(struct ixgbevf_adapter *adapter)
if (err) {
dev_info(&pdev->dev,
"PF still in reset state, assigning new address\n");
random_ether_addr(hw->mac.addr);
dev_hw_addr_random(adapter->netdev, hw->mac.addr);
} else {
err = hw->mac.ops.init_hw(hw);
if (err) {
Expand Down

0 comments on commit 2c6952d

Please sign in to comment.