diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-02-17 22:22:14 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-02-17 22:22:14 +0000 |
commit | 73fc1141c007cc89f820c24a882c665c56b95252 (patch) | |
tree | 798e756e11805ccf48d59f25c2cf101af600ec2c /target/linux | |
parent | 144ebddd610f5d9fa8bc8b162537ce438641422d (diff) | |
download | mtk-20170518-73fc1141c007cc89f820c24a882c665c56b95252.zip mtk-20170518-73fc1141c007cc89f820c24a882c665c56b95252.tar.gz mtk-20170518-73fc1141c007cc89f820c24a882c665c56b95252.tar.bz2 |
fix ar2312/2313 mac detection
SVN-Revision: 6316
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c b/target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c index d337098..11f21fe 100644 --- a/target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c +++ b/target/linux/atheros-2.6/files/arch/mips/atheros/ar5312.c @@ -255,8 +255,9 @@ int __init ar5312_init_devices(void) ar5312_eth1_data.board_config = board_config; ar5312_devs[dev++] = &ar5312_physmap_flash; - ar5312_eth0_data.macaddr = bcfg->enet0Mac; - ar5312_eth1_data.macaddr = bcfg->enet1Mac; + if (!memcmp(bcfg->enet0Mac, "\xff\xff\xff\xff\xff\xff", 6)) + memcpy(bcfg->enet0Mac, bcfg->enet1Mac, 6); + if (memcmp(bcfg->enet0Mac, bcfg->enet1Mac, 6) == 0) { /* ENET0 and ENET1 have the same mac. * Increment the one from ENET1 */ @@ -267,11 +268,14 @@ int __init ar5312_init_devices(void) switch(mips_machtype) { case MACH_ATHEROS_AR5312: + ar5312_eth0_data.macaddr = bcfg->enet0Mac; + ar5312_eth1_data.macaddr = bcfg->enet1Mac; ar5312_devs[dev++] = &ar5312_eth[0]; ar5312_devs[dev++] = &ar5312_eth[1]; break; case MACH_ATHEROS_AR2312: case MACH_ATHEROS_AR2313: + ar231x_eth0_data.macaddr = bcfg->enet0Mac; ar5312_devs[dev++] = &ar231x_eth0; ar5312_flash_data.width = 1; break; |