aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-09-20 16:41:34 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-09-20 16:41:34 +0000
commit9738028ba7b1bf3bdca0f536baf678d0608c9853 (patch)
tree3cc2324d9cb0602755f0e7c0ee684272246db515 /target/linux
parent6ff15e23d59cb5d2f737924220ee23184e35b3c6 (diff)
downloadupstream-9738028ba7b1bf3bdca0f536baf678d0608c9853.tar.gz
upstream-9738028ba7b1bf3bdca0f536baf678d0608c9853.tar.bz2
upstream-9738028ba7b1bf3bdca0f536baf678d0608c9853.zip
ar71xx: tew-673gru: 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@38089 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tew-673gru.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tew-673gru.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tew-673gru.c
index 207384f995..80a5443c70 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tew-673gru.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tew-673gru.c
@@ -119,18 +119,6 @@ static struct platform_device tew673gru_spi_device = {
},
};
-static void tew673gru_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 tew673gru_is_caldata_valid(u8 *p)
{
u16 *magic0, *magic1;
@@ -155,8 +143,8 @@ static void __init tew673gru_wlan_init(void)
}
}
- tew673gru_read_ascii_mac(mac1, caldata + TEW673GRU_MAC0_OFFSET);
- tew673gru_read_ascii_mac(mac2, caldata + TEW673GRU_MAC1_OFFSET);
+ ath79_parse_ascii_mac(caldata + TEW673GRU_MAC0_OFFSET, mac1);
+ ath79_parse_ascii_mac(caldata + TEW673GRU_MAC1_OFFSET, mac2);
ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 2);
ath79_init_mac(ath79_eth1_data.mac_addr, mac1, 3);