]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net/eth: fix a bug in on_ethaddr()
authorGong Qianyu <Qianyu.Gong@freescale.com>
Mon, 31 Aug 2015 03:34:43 +0000 (11:34 +0800)
committerJoe Hershberger <joe.hershberger@ni.com>
Wed, 28 Oct 2015 20:00:15 +0000 (15:00 -0500)
The loop should check all ethenet devices, not only the first device,
to set each specified ethaddr, or it'll cause failure when we use other
devices.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
net/eth.c

index 2e24b55726be8a63846c835b5d3688c7d74bf670..e9b22d823f30d529cc26ed4951ac0152d8cd266b 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -691,6 +691,7 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op,
                                memset(dev->enetaddr, 0, 6);
                        }
                }
+               dev = dev->next;
        } while (dev != eth_devices);
 
        return 0;