]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
igbvf: fix the bug when initializing the igbvf
authorSamuel Liao <samuelliao@tencent.com>
Fri, 27 Apr 2012 17:09:27 +0000 (17:09 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 13:36:46 +0000 (21:36 +0800)
Maybe it's a typo, but it cause that igbvf can't be initialized successfully.
Set perm_addr value using valid dev_addr, although which is equal to hw.mac.addr.

(cherry picked from commit 9bd1be457d2b9568c3c8f8f6b8e450a501bff402)
Signed-off-by: Samuel Liao <samuelliao@tencent.com>
Signed-off-by: Shan Wei <davidshan@tencent.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/igbvf/netdev.c

index 143f53f49af00d484a3c1bf2c59007488d9fc731..6a1d7179c44177ff7cc39b579bc17e581db0ef0d 100644 (file)
@@ -2721,14 +2721,14 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
                        netdev->addr_len);
        }
 
-       if (!is_valid_ether_addr(netdev->perm_addr)) {
+       if (!is_valid_ether_addr(netdev->dev_addr)) {
                dev_err(&pdev->dev, "Invalid MAC Address: %pM\n",
                        netdev->dev_addr);
                err = -EIO;
                goto err_hw_init;
        }
 
-       memcpy(netdev->perm_addr, adapter->hw.mac.addr, netdev->addr_len);
+       memcpy(netdev->perm_addr, netdev->dev_addr, netdev->addr_len);
 
        setup_timer(&adapter->watchdog_timer, &igbvf_watchdog,
                    (unsigned long) adapter);