From 370f0f638b64875e639e7dc4f429baf178036f90 Mon Sep 17 00:00:00 2001 From: juhosg Date: Mon, 2 Feb 2009 19:37:57 +0000 Subject: [ar71xx] parse dot-separated MAC address (patch by Jonas ) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14371 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ar71xx/files/arch/mips/ar71xx/platform.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3