Changeset 38089


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-tew-673gru.c

    r33539 r38089  
    120120}; 
    121121 
    122 static void tew673gru_read_ascii_mac(u8 *dest, u8 *src) 
    123 { 
    124         int ret; 
    125  
    126         ret = sscanf(src, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", 
    127                      &dest[0], &dest[1], &dest[2], 
    128                      &dest[3], &dest[4], &dest[5]); 
    129  
    130         if (ret != ETH_ALEN) 
    131                 memset(dest, 0, ETH_ALEN); 
    132 } 
    133  
    134122static bool __init tew673gru_is_caldata_valid(u8 *p) 
    135123{ 
     
    156144        } 
    157145 
    158         tew673gru_read_ascii_mac(mac1, caldata + TEW673GRU_MAC0_OFFSET); 
    159         tew673gru_read_ascii_mac(mac2, caldata + TEW673GRU_MAC1_OFFSET); 
     146        ath79_parse_ascii_mac(caldata + TEW673GRU_MAC0_OFFSET, mac1); 
     147        ath79_parse_ascii_mac(caldata + TEW673GRU_MAC1_OFFSET, mac2); 
    160148 
    161149        ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 2); 
Note: See TracChangeset for help on using the changeset viewer.