igbvf, ixgbevf: use dev_hw_addr_random
authorStefan Assmann <sassmann@redhat.com>
Mon, 26 Jul 2010 23:24:50 +0000 (23:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jul 2010 20:18:14 +0000 (13:18 -0700)
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>
drivers/net/igbvf/netdev.c
drivers/net/ixgbevf/ixgbevf_main.c

index 5e2b2a8c56c6f81ade223d30f9e3bf0705ed3f6e..048595bc79ad393b18f7352a6da40551be00c494 100644 (file)
@@ -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) {
index af491352b5e00eb2de151ff63bb73b519897b679..4867440ecfa8fd72ba2f0c9b9671e65774bf99ff 100644 (file)
@@ -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) {