提交 a5fd22eb 编写于 作者: O Olof Johansson 提交者: Jeff Garzik

pasemi_mac: Use local-mac-address instead of mac-address if available

Use local-mac-address in the device tree instead. Fall back to mac-address
for older firmware.
Signed-off-by: NOlof Johansson <olof@lixom.net>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 bb6e9590
......@@ -94,7 +94,12 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac)
return -ENOENT;
}
maddr = get_property(dn, "mac-address", NULL);
maddr = get_property(dn, "local-mac-address", NULL);
/* Fall back to mac-address for older firmware */
if (maddr == NULL)
maddr = get_property(dn, "mac-address", NULL);
if (maddr == NULL) {
dev_warn(&pdev->dev,
"no mac address in device tree, not configuring\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册