diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-09-20 16:41:32 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-09-20 16:41:32 +0000 |
commit | 0097945adfbb44a61a80ce307158cd08c63413de (patch) | |
tree | fd5324077c61826fc123bce0587d30a728992b7d /target/linux/ar71xx/files | |
parent | 40776d159d415709f91dc60136e13e2401f6111b (diff) | |
download | upstream-0097945adfbb44a61a80ce307158cd08c63413de.tar.gz upstream-0097945adfbb44a61a80ce307158cd08c63413de.tar.bz2 upstream-0097945adfbb44a61a80ce307158cd08c63413de.zip |
ar71xx: dir-825-b1: use ath79_parse_ascii_mac helper
Remove the local MAC address parser function and use
the generic one instead.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38087 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c index c958664445..9b82990b13 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c @@ -113,18 +113,6 @@ static struct platform_device dir825b1_rtl8366s_device = { } }; -static void dir825b1_read_ascii_mac(u8 *dest, u8 *src) -{ - int ret; - - ret = sscanf(src, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", - &dest[0], &dest[1], &dest[2], - &dest[3], &dest[4], &dest[5]); - - if (ret != ETH_ALEN) - memset(dest, 0, ETH_ALEN); -} - static bool __init dir825b1_is_caldata_valid(u8 *p) { u16 *magic0, *magic1; @@ -150,8 +138,8 @@ static void __init dir825b1_wlan_init(void) } } - dir825b1_read_ascii_mac(mac0, caldata + DIR825B1_MAC0_OFFSET); - dir825b1_read_ascii_mac(mac1, caldata + DIR825B1_MAC1_OFFSET); + ath79_parse_ascii_mac(caldata + DIR825B1_MAC0_OFFSET, mac0); + ath79_parse_ascii_mac(caldata + DIR825B1_MAC1_OFFSET, mac1); ath79_init_mac(ath79_eth0_data.mac_addr, mac0, 0); ath79_init_mac(ath79_eth1_data.mac_addr, mac1, 0); |