Changeset 38088


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

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

File:
1 edited

Legend:

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

    r37963 r38088  
    168168}; 
    169169 
    170 static void dir825c1_read_ascii_mac(u8 *dest, u8 *src) 
    171 { 
    172         int ret; 
    173  
    174         ret = sscanf(src, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", 
    175                      &dest[0], &dest[1], &dest[2], 
    176                      &dest[3], &dest[4], &dest[5]); 
    177  
    178         if (ret != ETH_ALEN) 
    179                 memset(dest, 0, ETH_ALEN); 
    180 } 
    181  
    182170static void __init dir825c1_generic_setup(void) 
    183171{ 
     
    187175        u8 wmac0[ETH_ALEN], wmac1[ETH_ALEN]; 
    188176 
    189         dir825c1_read_ascii_mac(mac0, mac + DIR825C1_MAC0_OFFSET); 
    190         dir825c1_read_ascii_mac(mac1, mac + DIR825C1_MAC1_OFFSET); 
     177        ath79_parse_ascii_mac(mac + DIR825C1_MAC0_OFFSET, mac0); 
     178        ath79_parse_ascii_mac(mac + DIR825C1_MAC1_OFFSET, mac1); 
    191179 
    192180        ath79_register_m25p80(NULL); 
Note: See TracChangeset for help on using the changeset viewer.