Index: src/router/services/sysinit/sysinit-ca8.c
===================================================================
--- src/router/services/sysinit/sysinit-ca8.c	(revision 9146)
+++ src/router/services/sysinit/sysinit-ca8.c	(revision 9356)
@@ -52,4 +52,9 @@
 #include <linux/sockios.h>
 #include <linux/mii.h>
+
+#include <bcmnvram.h>
+#include <shutils.h>
+#include <utils.h>
+#include <cymac.h>
 
 //highly experimental
@@ -110,4 +115,29 @@
 /* network drivers */
   eval ("insmod", "ar2313");
+  if (getRouterBrand () == ROUTER_BOARD_CA8PRO)
+    {
+      eval ("ifconfig", "eth0", "up");	// required for vlan config
+      eval ("/sbin/vconfig", "set_name_type", "VLAN_PLUS_VID_NO_PAD");
+      eval ("/sbin/vconfig", "add", "eth0", "0");
+      eval ("/sbin/vconfig", "add", "eth0", "1");
+      struct ifreq ifr;
+      int s;
+      if ((s = socket (AF_INET, SOCK_RAW, IPPROTO_RAW)))
+	{
+	  char eabuf[32];
+	  strncpy (ifr.ifr_name, "eth0", IFNAMSIZ);
+	  ioctl (s, SIOCGIFHWADDR, &ifr);
+	  char macaddr[32];
+	  strcpy (macaddr,
+		  ether_etoa ((unsigned char *) ifr.ifr_hwaddr.sa_data,
+			      eabuf));
+	  nvram_set ("et0macaddr", macaddr);
+	  MAC_ADD (macaddr);
+	  ether_atoe (macaddr, (unsigned char *) ifr.ifr_hwaddr.sa_data);
+	  strncpy (ifr.ifr_name, "vlan1", IFNAMSIZ);
+	  ioctl (s, SIOCSIFHWADDR, &ifr);
+	  close (s);
+	}
+    }
 
   eval ("insmod", "ath_hal");
