Commit 9b4c7a4e authored by Li Yang's avatar Li Yang Committed by Jeff Garzik

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: default avatarLi Yang <leoli@freescale.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent a1862a53
...@@ -4072,6 +4072,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ...@@ -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; static int mii_mng_configured = 0;
const phandle *ph; const phandle *ph;
const unsigned int *prop; const unsigned int *prop;
const void *mac_addr;
ugeth_vdbg("%s: IN", __FUNCTION__); ugeth_vdbg("%s: IN", __FUNCTION__);
...@@ -4197,7 +4198,12 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ...@@ -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->ug_info = ug_info;
ugeth->dev = dev; 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment