summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Duan <fugang.duan@nxp.com>2017-01-18 16:04:10 +0800
committerAndy Duan <fugang.duan@nxp.com>2017-01-19 14:21:18 +0800
commit7e4a55b068311d46d16e86e697d36f34a59bf47a (patch)
treedf632fde4500d3accade2251df95610e91e04d57
parente8447d649a631ec98120d84fab124ca29fbe39f0 (diff)
downloadu-boot-imx-7e4a55b068311d46d16e86e697d36f34a59bf47a.zip
u-boot-imx-7e4a55b068311d46d16e86e697d36f34a59bf47a.tar.gz
u-boot-imx-7e4a55b068311d46d16e86e697d36f34a59bf47a.tar.bz2
MLK-13777 net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse
Avoid transfer parameter dev_id value with "-1" to .fec_get_hwaddr(), it should transfer fec->dev_id to get mac address from fuse. Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
-rw-r--r--drivers/net/fec_mxc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 2d12c0b..8ea81f9 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1043,8 +1043,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
#endif
eth_register(edev);
- if (fec_get_hwaddr(edev, dev_id, ethaddr) == 0) {
- debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr);
+ if (fec_get_hwaddr(edev, fec->dev_id, ethaddr) == 0) {
+ debug("got MAC%d address from fuse: %pM\n", fec->dev_id, ethaddr);
memcpy(edev->enetaddr, ethaddr, 6);
if (!getenv("ethaddr"))
eth_setenv_enetaddr("ethaddr", ethaddr);