From 90ec4c87c8328ac27e9882389c24ab12272f9b2b Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 10 Mar 2015 14:46:45 +0100 Subject: [PATCH] ag7240: fix valid mac address detection replace mac[0] != 00 with mac[0] != ff otherwise the mac is wrong --- u-boot/cpu/mips/ar7240/ag7240.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/u-boot/cpu/mips/ar7240/ag7240.c b/u-boot/cpu/mips/ar7240/ag7240.c index c270a06293..df9f306d41 100644 --- a/u-boot/cpu/mips/ar7240/ag7240.c +++ b/u-boot/cpu/mips/ar7240/ag7240.c @@ -483,7 +483,7 @@ static void ag7240_get_ethaddr(struct eth_device *dev) return; } /* Use fixed address if the above address is invalid */ - if (mac[0] != 0x00 || (mac[0] == 0xff && mac[5] == 0xff) || + if ((mac[0] == 0xff) || (mac[1] == 0x00 && mac[2] == 0x00 && mac[3] == 0x00 && mac[4] == 0x00)) { #else