diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-09-20 16:41:33 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-09-20 16:41:33 +0000 |
commit | a98df83f5fce9aa4307c04627c10bc14a63fb268 (patch) | |
tree | 72a4e8aef38833aeaaf74e0a5871c0637e9ff2ca /target/linux/ar71xx/files | |
parent | 710314990a45f048fa88380bb9102595e048c138 (diff) | |
download | upstream-a98df83f5fce9aa4307c04627c10bc14a63fb268.tar.gz upstream-a98df83f5fce9aa4307c04627c10bc14a63fb268.tar.bz2 upstream-a98df83f5fce9aa4307c04627c10bc14a63fb268.zip |
ar71xx: dir-825-c1: 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>
SVN-Revision: 38088
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c index c1bd8d6878..3ab16e04c3 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c @@ -167,18 +167,6 @@ static struct mdio_board_info dir825c1_mdio0_info[] = { }, }; -static void dir825c1_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 void __init dir825c1_generic_setup(void) { u8 *mac = (u8 *) KSEG1ADDR(0x1ffe0000); @@ -186,8 +174,8 @@ static void __init dir825c1_generic_setup(void) u8 mac0[ETH_ALEN], mac1[ETH_ALEN]; u8 wmac0[ETH_ALEN], wmac1[ETH_ALEN]; - dir825c1_read_ascii_mac(mac0, mac + DIR825C1_MAC0_OFFSET); - dir825c1_read_ascii_mac(mac1, mac + DIR825C1_MAC1_OFFSET); + ath79_parse_ascii_mac(mac + DIR825C1_MAC0_OFFSET, mac0); + ath79_parse_ascii_mac(mac + DIR825C1_MAC1_OFFSET, mac1); ath79_register_m25p80(NULL); |