netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] ucc_geth: Add support to local-mac-address property
@ 2007-02-08  9:35 Li Yang
  0 siblings, 0 replies; only message in thread
From: Li Yang @ 2007-02-08  9:35 UTC (permalink / raw)
  To: jeff; +Cc: netdev

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> 
---
 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 ce0eab9..cf93383 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -4070,6 +4070,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__);
 
@@ -4195,7 +4196,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;
 }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-08  9:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-08  9:35 [PATCH 3/3] ucc_geth: Add support to local-mac-address property Li Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).