u-boot/net
Eric Miao 6937664426 net/eth.c: fix eth_write_hwaddr() to use dev->enetaddr as fall back
Ignore the return value of eth_getenv_enetaddr_by_index(), and if it
fails, fall back to use dev->enetaddr, which could be filled up by
the ethernet device driver:

With the current code, introduced with below commit, eth_write_hwaddr()
will fail immediately if there is no eth<n>addr in the environment variables.

However, e.g. for an overo based product that uses the SMSC911x ethernet
chip (with the MAC address set via EEPROM connected to the SMSC911x chip),
the MAC address is still OK.

On mx28 boards that are depending on the OCOTP bits to set the MAC address
(like the Denx m28 board), the OCOTP bits should be used instead of
failing on the environment variables.

Actually, this was the original behavior, and was later changed by
commit 7616e78508.

Signed-off-by: Eric Miao <eric.miao@linaro.org>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
CC: Stefan Roese <sr@denx.de>
CC: Eric Miao <eric.miao@linaro.org>
CC: Wolfgang Denk <wd@denx.de>
CC: Philip Balister <philip@balister.org>
CC: Zach Sadecki <zach@itwatchdogs.com>
2012-04-03 19:25:45 -05:00
..
bootp.c bootstage: Plumb in bootstage calls for basic operations 2012-03-18 21:42:56 +01:00
bootp.h net: express the first argument to NetSetTimeout() in milliseconds 2008-10-18 21:54:00 +02:00
dns.c net/dns.c: Fix endian conversion for big-endian in dns command 2011-10-23 23:34:19 +02:00
dns.h Add DNS support 2009-07-22 22:53:44 -07:00
eth.c net/eth.c: fix eth_write_hwaddr() to use dev->enetaddr as fall back 2012-04-03 19:25:45 -05:00
Makefile Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
net.c bootstage: Plumb in bootstage calls for basic operations 2012-03-18 21:42:56 +01:00
nfs.c net: Make sure IPaddr_t is 32 bits in size 2011-12-06 22:15:32 +01:00
nfs.h nfs: accept CONFIG_NFS_READ_SIZE from config file 2009-08-25 13:35:54 -07:00
rarp.c net: Export auto_load, use it in rarp 2011-10-27 23:53:58 +02:00
rarp.h Initial revision 2002-07-20 20:14:13 +00:00
sntp.c NET: pass source IP address to packet handlers 2011-05-12 19:38:19 +02:00
sntp.h * Patch by Masami Komiya, 30 Mar 2005: 2005-04-01 00:25:43 +00:00
tftp.c net: Make sure IPaddr_t is 32 bits in size 2011-12-06 22:15:32 +01:00
tftp.h net: tftpput: Support selecting get/put for tftp 2011-10-26 21:34:44 +02:00