From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2 v2] net, kirkwood_egiga: only setup the device enetaddr with random value, if ethaddr is not setup
Date: Tue, 30 Mar 2010 19:46:31 +0200 [thread overview]
Message-ID: <4BB238F7.8080306@denx.de> (raw)
if ethaddr is not setup in the environment, fill the device
enetaddr with a random value. Don;t touch the ethaddr
settings, only dev->enetaddr.
Tested on the suen3 board.
Signed-off-by: Heiko Schocher <hs@denx.de>
---
- changes since v1 posted here:
http://lists.denx.de/pipermail/u-boot/2010-March/069193.html
- split in two patches as Wolfgang suggested
drivers/net/kirkwood_egiga.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c
index 2ad7fea..f8e421c 100644
--- a/drivers/net/kirkwood_egiga.c
+++ b/drivers/net/kirkwood_egiga.c
@@ -678,7 +678,7 @@ int kirkwood_egiga_initialize(bd_t * bis)
return -1;
}
- while (!eth_getenv_enetaddr(s, dev->enetaddr)) {
+ if (!eth_getenv_enetaddr(s, dev->enetaddr)) {
/* Generate Random Private MAC addr if not set */
dev->enetaddr[0] = 0x02;
dev->enetaddr[1] = 0x50;
@@ -686,7 +686,6 @@ int kirkwood_egiga_initialize(bd_t * bis)
dev->enetaddr[3] = get_random_hex();
dev->enetaddr[4] = get_random_hex();
dev->enetaddr[5] = get_random_hex();
- eth_setenv_enetaddr(s, dev->enetaddr);
}
dev->init = (void *)kwgbe_init;
--
1.6.2.5
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
reply other threads:[~2010-03-30 17:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BB238F7.8080306@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox