X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/d8483443393eb72472d132307bbaeac976ac191c..4ef493dcf36bcd2deade934fa4932f6013c0f82b:/target/linux/ixp4xx/patches-2.6.35/520-tw2662_support.patch diff --git a/target/linux/ixp4xx/patches-2.6.35/520-tw2662_support.patch b/target/linux/ixp4xx/patches-2.6.35/520-tw2662_support.patch index cc796c504..7bef1d408 100644 --- a/target/linux/ixp4xx/patches-2.6.35/520-tw2662_support.patch +++ b/target/linux/ixp4xx/patches-2.6.35/520-tw2662_support.patch @@ -118,7 +118,7 @@ +subsys_initcall(tw2662_pci_init); --- /dev/null +++ b/arch/arm/mach-ixp4xx/tw2662-setup.c -@@ -0,0 +1,208 @@ +@@ -0,0 +1,212 @@ +/* + * arch/arm/mach-ixp4xx/tw2662-setup.c + * @@ -308,9 +308,13 @@ + IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; + + platform_add_devices(tw2662_devices, ARRAY_SIZE(tw2662_devices)); -+ /* hack MACs as most of these boards have a broken eeprom */ -+ random_ether_addr(tw2662_plat_eth[0].hwaddr); -+ random_ether_addr(tw2662_plat_eth[1].hwaddr); ++ ++ if (!(is_valid_ether_addr(tw2662_plat_eth[0].hwaddr))) ++ random_ether_addr(tw2662_plat_eth[0].hwaddr); ++ if (!(is_valid_ether_addr(tw2662_plat_eth[1].hwaddr))) { ++ memcpy(tw2662_plat_eth[1].hwaddr, tw2662_plat_eth[0].hwaddr, ETH_ALEN); ++ tw2662_plat_eth[1].hwaddr[5] = (tw2662_plat_eth[0].hwaddr[5] + 1); ++ } + +} +