ag7240: fix valid mac address detection

replace mac[0] != 00 with mac[0] != ff otherwise the mac is wrong
This commit is contained in:
Alexander Couzens 2015-03-10 14:46:45 +01:00
parent 292f453210
commit 90ec4c87c8
1 changed files with 1 additions and 1 deletions

View File

@ -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