Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bd1be45 authored by Samuel Liao's avatar Samuel Liao Committed by Jeff Kirsher
Browse files

igbvf: fix the bug when initializing the igbvf



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.

Signed-off-by: default avatarSamuel Liao <samuelliao@tencent.com>
Signed-off-by: default avatarShan Wei <davidshan@tencent.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 1cebce36
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2731,14 +2731,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);