parse dot-separated MAC address (patch by Jonas <jmajau@ubnt.com>)
SVN-Revision: 14371
This commit is contained in:
parent
7d250fbc8d
commit
8a5c467323
1 changed files with 4 additions and 0 deletions
|
@ -595,6 +595,10 @@ void __init ar71xx_parse_mac_addr(char *mac_str)
|
||||||
t = sscanf(mac_str, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
|
t = sscanf(mac_str, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
|
||||||
&tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]);
|
&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)
|
if (t == ETH_ALEN)
|
||||||
ar71xx_set_mac_base(tmp);
|
ar71xx_set_mac_base(tmp);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue