]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
km/common: fix bug in IVM mac address access
authorHolger Brunck <holger.brunck@keymile.com>
Tue, 20 Sep 2011 05:05:55 +0000 (05:05 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 21 Sep 2011 21:38:41 +0000 (23:38 +0200)
The MAC address stored in the inventory eeprom begins at offset 1.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Wolfgang Denk <wd@denx.de>

board/keymile/common/ivm.c

index d0cb0d227f198e1873f84e833dc31cda9905d783..bcf3aed97e32c95ed3193cae2ca3be383f305b9d 100644 (file)
@@ -206,8 +206,8 @@ static int ivm_analyze_block2(unsigned char *buf, int len)
        unsigned char   valbuf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN];
        unsigned long   count;
 
-       /* IVM_MacAddress */
-       sprintf((char *)valbuf, "%pM", buf);
+       /* IVM_MAC Adress begins at offset 1 */
+       sprintf((char *)valbuf, "%pM", buf + 1);
        ivm_set_value("IVM_MacAddress", (char *)valbuf);
        /* if an offset is defined, add it */
 #if defined(CONFIG_PIGGY_MAC_ADRESS_OFFSET)