]> git.sur5r.net Git - u-boot/commitdiff
fec_mxc.c: Fix MX27 FEC MAC validity check
authorEric Jarrige <eric.jarrige@armadeus.org>
Thu, 15 Apr 2010 22:03:19 +0000 (00:03 +0200)
committerBen Warren <biggerbadderben@gmail.com>
Mon, 3 May 2010 21:52:49 +0000 (14:52 -0700)
Fix MX27 FEC logic to check validity of the MAC address in fuse.
Only null (empty fuse) or invalid MAC address was retrieved from mx27 fuses before this change.

Signed-off-by: Eric Jarrige <jorasse@armadeus.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/fec_mxc.c

index fdc288c63a70ad4903d0e248f09efa5048fe459c..68be74775c6e9df82b7ac7c17f3adec694e9a9e3 100644 (file)
@@ -325,7 +325,7 @@ static int fec_get_hwaddr(struct eth_device *dev, unsigned char *mac)
        for (i = 0; i < 6; i++)
                mac[6-1-i] = readl(&iim->iim_bank_area0[IIM0_MAC + i]);
 
-       return is_valid_ether_addr(mac);
+       return !is_valid_ether_addr(mac);
 #endif
 }