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
dns.c
dns.h
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
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
rarp.c net: Export auto_load, use it in rarp 2011-10-27 23:53:58 +02:00
rarp.h
sntp.c
sntp.h
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