mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-30 18:14:04 +02:00
fix ar2312/2313 mac detection
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6316 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
0624bfd74f
commit
68bffe977f
@ -255,8 +255,9 @@ int __init ar5312_init_devices(void)
|
|||||||
ar5312_eth1_data.board_config = board_config;
|
ar5312_eth1_data.board_config = board_config;
|
||||||
ar5312_devs[dev++] = &ar5312_physmap_flash;
|
ar5312_devs[dev++] = &ar5312_physmap_flash;
|
||||||
|
|
||||||
ar5312_eth0_data.macaddr = bcfg->enet0Mac;
|
if (!memcmp(bcfg->enet0Mac, "\xff\xff\xff\xff\xff\xff", 6))
|
||||||
ar5312_eth1_data.macaddr = bcfg->enet1Mac;
|
memcpy(bcfg->enet0Mac, bcfg->enet1Mac, 6);
|
||||||
|
|
||||||
if (memcmp(bcfg->enet0Mac, bcfg->enet1Mac, 6) == 0) {
|
if (memcmp(bcfg->enet0Mac, bcfg->enet1Mac, 6) == 0) {
|
||||||
/* ENET0 and ENET1 have the same mac.
|
/* ENET0 and ENET1 have the same mac.
|
||||||
* Increment the one from ENET1 */
|
* Increment the one from ENET1 */
|
||||||
@ -267,11 +268,14 @@ int __init ar5312_init_devices(void)
|
|||||||
|
|
||||||
switch(mips_machtype) {
|
switch(mips_machtype) {
|
||||||
case MACH_ATHEROS_AR5312:
|
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[0];
|
||||||
ar5312_devs[dev++] = &ar5312_eth[1];
|
ar5312_devs[dev++] = &ar5312_eth[1];
|
||||||
break;
|
break;
|
||||||
case MACH_ATHEROS_AR2312:
|
case MACH_ATHEROS_AR2312:
|
||||||
case MACH_ATHEROS_AR2313:
|
case MACH_ATHEROS_AR2313:
|
||||||
|
ar231x_eth0_data.macaddr = bcfg->enet0Mac;
|
||||||
ar5312_devs[dev++] = &ar231x_eth0;
|
ar5312_devs[dev++] = &ar231x_eth0;
|
||||||
ar5312_flash_data.width = 1;
|
ar5312_flash_data.width = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user