Changeset 24643


Ignore:
Timestamp:
2010-12-17T18:10:01+01:00 (5 years ago)
Author:
juhosg
Message:

ar71xx: UBNT Secondary MAC address duplicate fix

There is Secondary MAC address duplicate problem with some UBNT
RouterStation and RouterStation Pro HW batches as Primary MAC addresses
are not increased by 2 per device in board data. Fix is to use 'Locally
Administrated bit' for Secondary MAC address instead of increasing
Primary MAC addresses by 1 which could overlap with other device
Primary MAC address.

Signed-off-by: Kestutis Barkauskas<keba@…>

File:
1 edited

Legend:

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

    r24611 r24643  
    134134} 
    135135 
     136/* 
     137 * There is Secondary MAC address duplicate problem with some UBNT HW batches. 
     138 * Do not increase Secondary MAC address by 1 but do workaround 
     139 * with 'Locally Administrated' bit. 
     140 */ 
     141static void ubnt_init_secondary_mac(unsigned char *mac_base) 
     142{ 
     143        ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac_base, 0); 
     144        ar71xx_eth1_data.mac_addr[0] |= 0x02; 
     145} 
     146 
    136147#define UBNT_RS_WAN_PHYMASK     (1 << 20) 
    137148#define UBNT_RS_LAN_PHYMASK     ((1 << 16) | (1 << 17) | (1 << 18) | (1 << 19)) 
     
    147158        ar71xx_eth0_data.phy_mask = UBNT_RS_WAN_PHYMASK; 
    148159 
    149         ar71xx_init_mac(ar71xx_eth1_data.mac_addr, ar71xx_mac_base, 1); 
     160        ubnt_init_secondary_mac(ar71xx_mac_base); 
    150161        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; 
    151162        ar71xx_eth1_data.speed = SPEED_100; 
     
    178189        ar71xx_eth0_data.phy_mask = UBNT_RSPRO_WAN_PHYMASK; 
    179190 
    180         ar71xx_init_mac(ar71xx_eth1_data.mac_addr, ar71xx_mac_base, 1); 
     191        ubnt_init_secondary_mac(ar71xx_mac_base); 
    181192        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; 
    182193        ar71xx_eth1_data.phy_mask = UBNT_RSPRO_LAN_PHYMASK; 
Note: See TracChangeset for help on using the changeset viewer.