Changeset 23876


Ignore:
Timestamp:
2010-11-04T19:46:07+01:00 (7 years ago)
Author:
nbd
Message:

ar71xx: Set eth1 MAC address from EEPROM for WNDR3700

The WNDR3700's art/caldata partition contains three MAC addresses at
offsets 0, 6, and 12, used for eth0/wlan0 (shared), eth1, and wlan1,
respectively. The existing code configures eth1's MAC address by adding
1 to eth0's instead of using the value stored in the EEPROM. This patch
causes the stored value to be used directly. (On my WNDR3700s, the three
stored addresses are all sequential anyway.)

Signed-off-by: Mark Mentovai <mark@…>

File:
1 edited

Legend:

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

    r22700 r23876  
    4141#define WNDR3700_BUTTONS_POLL_INTERVAL    20 
    4242 
     43#define WNDR3700_ETH0_MAC_OFFSET        0 
     44#define WNDR3700_ETH1_MAC_OFFSET        0x6 
     45 
    4346#define WNDR3700_WMAC0_MAC_OFFSET       0 
    4447#define WNDR3700_WMAC1_MAC_OFFSET       0xc 
     
    169172        u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); 
    170173 
    171         ar71xx_init_mac(ar71xx_eth0_data.mac_addr, art, 0); 
     174        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, 
     175                        art + WNDR3700_ETH0_MAC_OFFSET, 0); 
    172176        ar71xx_eth0_pll_data.pll_1000 = 0x11110000; 
    173177        ar71xx_eth0_data.mii_bus_dev = &wndr3700_rtl8366s_device.dev; 
     
    176180        ar71xx_eth0_data.duplex = DUPLEX_FULL; 
    177181 
    178         ar71xx_init_mac(ar71xx_eth1_data.mac_addr, art, 1); 
     182        ar71xx_init_mac(ar71xx_eth1_data.mac_addr, 
     183                        art + WNDR3700_ETH1_MAC_OFFSET, 0); 
    179184        ar71xx_eth1_pll_data.pll_1000 = 0x11110000; 
    180185        ar71xx_eth1_data.mii_bus_dev = &wndr3700_rtl8366s_device.dev; 
Note: See TracChangeset for help on using the changeset viewer.