From 7f874e2b85a1bbc0a98c538135ad8c658b1856e1 Mon Sep 17 00:00:00 2001 From: Andy Duan Date: Mon, 10 Apr 2017 19:44:34 +0800 Subject: [PATCH] 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 Signed-off-by: Peng Fan Cc: Joe Hershberger Acked-by: Stefano Babic --- drivers/net/fec_mxc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index ac7afb5b35..d67a69b879 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1086,8 +1086,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr, #endif eth_register(edev); - if (fec_get_hwaddr(dev_id, ethaddr) == 0) { - debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr); + if (fec_get_hwaddr(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); -- 2.39.5