diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-02-02 19:37:57 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-02-02 19:37:57 +0000 |
commit | 8a5c4673234e608f24fc82a420476993eea34a4a (patch) | |
tree | ae48c617674057c9d18c42d827823ab1674cbce8 /target | |
parent | 7d250fbc8dd8ef044be2859b0b57e163d79b4bd3 (diff) | |
download | mtk-20170518-8a5c4673234e608f24fc82a420476993eea34a4a.zip mtk-20170518-8a5c4673234e608f24fc82a420476993eea34a4a.tar.gz mtk-20170518-8a5c4673234e608f24fc82a420476993eea34a4a.tar.bz2 |
parse dot-separated MAC address (patch by Jonas <jmajau@ubnt.com>)
SVN-Revision: 14371
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/platform.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c b/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c index d8ed28a..6a29fc4 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 |