aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-02-02 19:37:57 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-02-02 19:37:57 +0000
commit2755258397d1981379fa91f338700aad1c809c1f (patch)
treed99ee120ef89ea3312e198fad944933152b34c08 /target/linux/ar71xx/files
parent982542d3cd60660f6d0082a36c3cd7b38c47c81c (diff)
downloadupstream-2755258397d1981379fa91f338700aad1c809c1f.tar.gz
upstream-2755258397d1981379fa91f338700aad1c809c1f.tar.bz2
upstream-2755258397d1981379fa91f338700aad1c809c1f.zip
[ar71xx] parse dot-separated MAC address (patch by Jonas <jmajau@ubnt.com>)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14371 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/platform.c4
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 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