[U-Boot] [PATCH] pxe: get ethaddr from the current device instead of env
Mike Frysinger
vapier at gentoo.org
Tue Dec 6 04:50:17 CET 2011
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>
More information about the U-Boot
mailing list