From: Gabor Juhos Date: Mon, 2 Feb 2009 19:37:57 +0000 (+0000) Subject: parse dot-separated MAC address (patch by Jonas ) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8a5c4673234e608f24fc82a420476993eea34a4a;p=openwrt%2Fstaging%2Fneocturne.git parse dot-separated MAC address (patch by Jonas ) SVN-Revision: 14371 --- diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c b/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c index d8ed28a431..6a29fc46a0 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c @@ -595,6 +595,10 @@ void __init ar71xx_parse_mac_addr(char *mac_str) t = sscanf(mac_str, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]); + if (t != ETH_ALEN) + t = sscanf(mac_str, "%02hhx.%02hhx.%02hhx.%02hhx.%02hhx.%02hhx", + &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]); + if (t == ETH_ALEN) ar71xx_set_mac_base(tmp); else