mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: barebox@lists.infradead.org
Subject: [PATCH] eth: fix 'warning: No MAC address set' when using EEPROM MAC
Date: Wed, 15 Dec 2010 10:04:36 +0200	[thread overview]
Message-ID: <ddb18a8573b9f5daac2cc3d8ef53da7ee41dbbc0.1292400209.git.baruch@tkos.co.il> (raw)

When retrieving the MAC address from EEPROM, we must notify the networking core
at eth registration time. Otherwise we get the 'No MAC address set' warning on
the first network access, and the MAC address is set to a random value instead
of the real one.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 net/eth.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/eth.c b/net/eth.c
index 4d58191..dafd392 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -168,8 +168,10 @@ int eth_register(struct eth_device *edev)
 		dev_set_param(dev, "ethaddr", ethaddr_str);
 	}
 
-	if (!eth_current)
+	if (!eth_current) {
 		eth_current = edev;
+		net_update_env();
+	}
 
 	return 0;
 }
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2010-12-15  8:04 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=ddb18a8573b9f5daac2cc3d8ef53da7ee41dbbc0.1292400209.git.baruch@tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=barebox@lists.infradead.org \
    /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