From: Stefan Assmann Date: Mon, 26 Jul 2010 23:24:50 +0000 (+0000) Subject: igbvf, ixgbevf: use dev_hw_addr_random X-Git-Tag: 2.1b_release~7593^2~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c6952dfdda2f266f2f501792b8d6413caf25f7a;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git igbvf, ixgbevf: use dev_hw_addr_random 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 5e2b2a8..048595b 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c @@ -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) { diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index af49135..4867440 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c @@ -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) {