igbvf, ixgbevf: use dev_hw_addr_random
Subsystems (2)
PATCH 1/1 igbvf, ixgbevf: use dev_hw_addr_random
From: Stefan Assmann <[email protected]>
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 <[email protected]>
--- drivers/net/igbvf/netdev.c | 2 +- drivers/net/ixgbevf/ixgbevf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/igbvf/netdev.c +1 -1
@@ -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) {
drivers/net/ixgbevf/ixgbevf_main.c +1 -1
@@ -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) {
Signature · 1 line
1.6.5.2
From: Stefan Assmann <[email protected]>
Date: Tue, 27 Jul 2010 11:24:50 +0200
Quoted 7 lines
From: Stefan Assmann <[email protected]>
Both igbvf and ixgbevf should set
addr_assign_typetoNET_ADDR_RANDOMso udev creates persistent net rules by matching the device path. Do this by using thedev_hw_addr_randomhelper function.Signed-off-by Stefan Assmann <[email protected]>
Applied.