[POWERPC] Convert to mac-address for ethernet MAC address data.
Also accept "local-mac-address". However the old "address" is now obsolete, but accepted for backwards compatibility. It should be removed after all device trees have been converted to use "mac-address". Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
committed by
Paul Mackerras
parent
9a936a2e05
commit
f583165f6a
@ -169,8 +169,16 @@ static int __init gfar_of_init(void)
|
||||
goto err;
|
||||
}
|
||||
|
||||
mac_addr = get_property(np, "address", NULL);
|
||||
memcpy(gfar_data.mac_addr, mac_addr, 6);
|
||||
mac_addr = get_property(np, "local-mac-address", NULL);
|
||||
if (mac_addr == NULL)
|
||||
mac_addr = get_property(np, "mac-address", NULL);
|
||||
if (mac_addr == NULL) {
|
||||
/* Obsolete */
|
||||
mac_addr = get_property(np, "address", NULL);
|
||||
}
|
||||
|
||||
if (mac_addr)
|
||||
memcpy(gfar_data.mac_addr, mac_addr, 6);
|
||||
|
||||
if (model && !strcasecmp(model, "TSEC"))
|
||||
gfar_data.device_flags =
|
||||
|
Reference in New Issue
Block a user