Changeset 9356 for src/router/services/sysinit/sysinit-ca8.c
- Timestamp:
- 03/29/08 20:26:25 (5 years ago)
- File:
-
- 1 edited
-
src/router/services/sysinit/sysinit-ca8.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/router/services/sysinit/sysinit-ca8.c
r9146 r9356 52 52 #include <linux/sockios.h> 53 53 #include <linux/mii.h> 54 55 #include <bcmnvram.h> 56 #include <shutils.h> 57 #include <utils.h> 58 #include <cymac.h> 54 59 55 60 //highly experimental … … 110 115 /* network drivers */ 111 116 eval ("insmod", "ar2313"); 117 if (getRouterBrand () == ROUTER_BOARD_CA8PRO) 118 { 119 eval ("ifconfig", "eth0", "up"); // required for vlan config 120 eval ("/sbin/vconfig", "set_name_type", "VLAN_PLUS_VID_NO_PAD"); 121 eval ("/sbin/vconfig", "add", "eth0", "0"); 122 eval ("/sbin/vconfig", "add", "eth0", "1"); 123 struct ifreq ifr; 124 int s; 125 if ((s = socket (AF_INET, SOCK_RAW, IPPROTO_RAW))) 126 { 127 char eabuf[32]; 128 strncpy (ifr.ifr_name, "eth0", IFNAMSIZ); 129 ioctl (s, SIOCGIFHWADDR, &ifr); 130 char macaddr[32]; 131 strcpy (macaddr, 132 ether_etoa ((unsigned char *) ifr.ifr_hwaddr.sa_data, 133 eabuf)); 134 nvram_set ("et0macaddr", macaddr); 135 MAC_ADD (macaddr); 136 ether_atoe (macaddr, (unsigned char *) ifr.ifr_hwaddr.sa_data); 137 strncpy (ifr.ifr_name, "vlan1", IFNAMSIZ); 138 ioctl (s, SIOCSIFHWADDR, &ifr); 139 close (s); 140 } 141 } 112 142 113 143 eval ("insmod", "ath_hal");
Note: See TracChangeset
for help on using the changeset viewer.
