Ignore:
Timestamp:
2010-08-18T18:00:28+02:00 (6 years ago)
Author:
juhosg
Message:

ar71xx: change mac address initialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c

    r21075 r22700  
    132132{ 
    133133        u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); 
    134         u8 mac[6]; 
    135         int i; 
    136  
    137         memcpy(mac, art + WRT400N_MAC_ADDR_OFFSET, 6); 
    138         for (i = 5; i >= 3; i--) 
    139                 if (++mac[i] != 0x00) break; 
    140  
    141         ar71xx_set_mac_base(mac); 
     134        u8 *mac = art + WRT400N_MAC_ADDR_OFFSET; 
    142135 
    143136        ar71xx_add_device_mdio(0x0); 
    144137 
     138        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 1); 
    145139        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; 
    146140        ar71xx_eth0_data.speed = SPEED_100; 
    147141        ar71xx_eth0_data.duplex = DUPLEX_FULL; 
    148142 
     143        ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 2); 
    149144        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; 
    150145        ar71xx_eth1_data.phy_mask = 0x10; 
Note: See TracChangeset for help on using the changeset viewer.