projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ar71xx: add kernel support for the OpenMesh OM5P-ACv2 board
[openwrt.git]
/
target
/
linux
/
ar71xx
/
files
/
arch
/
mips
/
ath79
/
nvram.c
diff --git
a/target/linux/ar71xx/files/arch/mips/ath79/nvram.c
b/target/linux/ar71xx/files/arch/mips/ath79/nvram.c
index
43911b8
..
e55af5a
100644
(file)
--- a/
target/linux/ar71xx/files/arch/mips/ath79/nvram.c
+++ b/
target/linux/ar71xx/files/arch/mips/ath79/nvram.c
@@
-59,6
+59,11
@@
int ath79_nvram_parse_mac_addr(const char *nvram, unsigned nvram_len,
goto free;
}
+ if (strlen(mac_str) == 19 && mac_str[0] == '"' && mac_str[18] == '"') {
+ mac_str[18] = 0;
+ mac_str++;
+ }
+
t = sscanf(mac_str, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
&mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]);