]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse
authorAndy Duan <fugang.duan@nxp.com>
Mon, 10 Apr 2017 11:44:34 +0000 (19:44 +0800)
committerStefano Babic <sbabic@denx.de>
Tue, 18 Apr 2017 13:59:45 +0000 (15:59 +0200)
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>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Stefano Babic <sbabic@denx.de>
drivers/net/fec_mxc.c

index ac7afb5b35e7c137c28ad01f921e824137c45825..d67a69b87945dd95bde5f6604ad02a1b9e2c29b5 100644 (file)
@@ -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);