diff options
author | Li Yang <leoli@freescale.com> | 2007-02-08 12:35:54 +0300 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-09 04:13:15 +0300 |
commit | 9b4c7a4ec988d9b8bbe847f3c983938220e3a38b (patch) | |
tree | 625d1ebf148cc011068c9721b39c40af2f8468c0 /drivers/net/ucc_geth.c | |
parent | a1862a53df1a57387aeee059276ba4233e12b4db (diff) | |
download | linux-9b4c7a4ec988d9b8bbe847f3c983938220e3a38b.tar.xz |
ucc_geth: Add support to local-mac-address property
IEEE-1275 defines “local-mac-address” to be a standard
property name to specify preassigned network address.
This patch adds support for it.
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r-- | drivers/net/ucc_geth.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index db0370affb6b..31c97a6591a4 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -4072,6 +4072,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma static int mii_mng_configured = 0; const phandle *ph; const unsigned int *prop; + const void *mac_addr; ugeth_vdbg("%s: IN", __FUNCTION__); @@ -4197,7 +4198,12 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ugeth->ug_info = ug_info; ugeth->dev = dev; - memcpy(dev->dev_addr, get_property(np, "mac-address", NULL), 6); + + mac_addr = get_property(np, "mac-address", NULL); + if (mac_addr == NULL) + mac_addr = get_property(np, "local-mac-address", NULL); + if (mac_addr) + memcpy(dev->dev_addr, mac_addr, 6); return 0; } |