Thread (3 messages) flat view 3 messages, 3 authors, 2018-06-25

Re: [PATCH] igb: allow optionally getting mac address from device tree

From: David Miller <davem@davemloft.net>
Date: 2018-06-25 08:05:57
Also in: intel-wired-lan, lkml

From: Marcel Ziswiler <redacted>
Date: Mon, 25 Jun 2018 10:00:42 +0200
quoted hunk ↗ jump to hunk
@@ -3122,7 +3124,11 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		break;
 	}
 
-	if (eth_platform_get_mac_address(&pdev->dev, hw->mac.addr)) {
+	/* try to get the MAC address from device tree data */
+	iap = of_get_mac_address(pdev->dev.of_node);
+	if (iap)
+		memcpy(hw->mac.addr, iap, ETH_ALEN);
This is exactly what eth_platform_get_mac_address() shoule be doing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help