From d929ec250f78f6541ed5f010351957b87d92611c Mon Sep 17 00:00:00 2001 From: Li Yang Date: Thu, 8 Feb 2007 17:35:54 +0800 Subject: [PATCH] --- yaml --- r: 46928 b: refs/heads/master c: 9b4c7a4ec988d9b8bbe847f3c983938220e3a38b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/ucc_geth.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 8eab3a570695..a4fef4a5d328 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a1862a53df1a57387aeee059276ba4233e12b4db +refs/heads/master: 9b4c7a4ec988d9b8bbe847f3c983938220e3a38b diff --git a/trunk/drivers/net/ucc_geth.c b/trunk/drivers/net/ucc_geth.c index db0370affb6b..31c97a6591a4 100644 --- a/trunk/drivers/net/ucc_geth.c +++ b/trunk/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; }