public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] pxe: get ethaddr from the current device instead of env
Date: Mon, 5 Dec 2011 22:50:17 -0500	[thread overview]
Message-ID: <201112052250.23651.vapier@gentoo.org> (raw)
In-Reply-To: <1323129873-8786-1-git-send-email-robherring2@gmail.com>

On Monday 05 December 2011 19:04:33 Rob Herring wrote:
> The env variable "ethaddr" may not be set, so get the address from the
> eth_device struct instead. This also enables pxe for secondary ethernet
> devices.

NAK: this won't work either ;).  the API contract is that the env is the 
canonical storage, and eth_device->enetaddr is there only for the network 
device drivers themselves: they seed it during registration, and then use it 
when starting up as the common layer has taken care of syncing from the env.

what you probably want to do is update net/eth.c's eth_register() to see if 
dev->enetaddr is valid (is_valid_ether_addr), and if the env addr is not set 
for that device, and if not, set the env with it.

then you can assume in cmd_pxe.c that the env is setup.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111205/71a33330/attachment.pgp>

  reply	other threads:[~2011-12-06  3:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06  0:04 [U-Boot] [PATCH] pxe: get ethaddr from the current device instead of env Rob Herring
2011-12-06  3:50 ` Mike Frysinger [this message]
2011-12-06 10:41 ` Wolfgang Denk
2011-12-06 19:24 ` [U-Boot] [PATCH v2] net: allow setting env enetaddr from net device setting Rob Herring
2012-01-13 20:36   ` Wolfgang Denk
2012-02-01 23:27   ` [U-Boot] [PATCH v3] " Rob Herring
2012-03-06 13:37     ` Rob Herring
2012-03-06 19:30     ` Wolfgang Denk
2012-03-06 20:01       ` Rob Herring
2012-03-06 20:33         ` Wolfgang Denk
2012-03-07  3:03     ` [U-Boot] [PATCH v4] " Rob Herring
2012-04-04 15:06       ` Joe Hershberger
2012-04-15  4:06 ` [U-Boot] [PATCH v5] " Rob Herring
2012-07-11 18:30   ` Joe Hershberger

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=201112052250.23651.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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