Changeset 38087


Ignore:
Timestamp:
2013-09-20T18:41:32+02:00 (4 years ago)
Author:
juhosg
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c

    r35730 r38087  
    114114}; 
    115115 
    116 static void dir825b1_read_ascii_mac(u8 *dest, u8 *src) 
    117 { 
    118         int ret; 
    119  
    120         ret = sscanf(src, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", 
    121                      &dest[0], &dest[1], &dest[2], 
    122                      &dest[3], &dest[4], &dest[5]); 
    123  
    124         if (ret != ETH_ALEN) 
    125                 memset(dest, 0, ETH_ALEN); 
    126 } 
    127  
    128116static bool __init dir825b1_is_caldata_valid(u8 *p) 
    129117{ 
     
    151139        } 
    152140 
    153         dir825b1_read_ascii_mac(mac0, caldata + DIR825B1_MAC0_OFFSET); 
    154         dir825b1_read_ascii_mac(mac1, caldata + DIR825B1_MAC1_OFFSET); 
     141        ath79_parse_ascii_mac(caldata + DIR825B1_MAC0_OFFSET, mac0); 
     142        ath79_parse_ascii_mac(caldata + DIR825B1_MAC1_OFFSET, mac1); 
    155143 
    156144        ath79_init_mac(ath79_eth0_data.mac_addr, mac0, 0); 
Note: See TracChangeset for help on using the changeset viewer.