提交 6478021f 编写于 作者: H Holger Brunck 提交者: Wolfgang Denk

km/common: fix bug in IVM mac address access

The MAC address stored in the inventory eeprom begins at offset 1.
Signed-off-by: NHolger Brunck <holger.brunck@keymile.com>
Signed-off-by: NValentin Longchamp <valentin.longchamp@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
上级 3f96ee33
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册