Changeset 9114
- Timestamp:
- 02/25/08 19:36:07 (5 years ago)
- Location:
- src/router
- Files:
-
- 17 edited
-
kromo/dd-wrt/index_pppoe.asp (modified) (2 diffs)
-
services/networking/network.c (modified) (7 diffs)
-
services/sysinit/sysinit-broadcom.c (modified) (5 diffs)
-
services/sysinit/sysinit-ca8.c (modified) (1 diff)
-
services/sysinit/sysinit-dir300.c (modified) (1 diff)
-
services/sysinit/sysinit-fonera.c (modified) (1 diff)
-
services/sysinit/sysinit-gateworx.c (modified) (1 diff)
-
services/sysinit/sysinit-ls5.c (modified) (1 diff)
-
services/sysinit/sysinit-magicbox.c (modified) (1 diff)
-
services/sysinit/sysinit-mr3202a.c (modified) (1 diff)
-
services/sysinit/sysinit-newmedia-dual.c (modified) (1 diff)
-
services/sysinit/sysinit-pb42.c (modified) (1 diff)
-
services/sysinit/sysinit-rb532.c (modified) (1 diff)
-
services/sysinit/sysinit-supergerry.c (modified) (1 diff)
-
services/sysinit/sysinit-whrag108.c (modified) (1 diff)
-
services/sysinit/sysinit-wrt300nv2.c (modified) (1 diff)
-
services/sysinit/sysinit-x86.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/kromo/dd-wrt/index_pppoe.asp
r8111 r9114 17 17 <input class="spaceradio" type="radio" name="ppp_compression" value="0" <% nvram_checked("ppp_compression","0"); %> /><% tran("share.disable"); %> 18 18 </div> 19 <% startswith("wan_ifname","vlan","<!--"); %>20 19 <div class="setting"> 21 20 <div class="label"><% tran("share.vdsl"); %></div> … … 23 22 <input class="spaceradio" type="radio" name="wan_vdsl" value="0" <% nvram_checked("wan_vdsl","0"); %> /><% tran("share.disable"); %> 24 23 </div> 25 <% startswith("wan_ifname","vlan","-->"); %>26 24 <div class="setting"> 27 25 <div class="label"><% tran("service.pptpd_encry"); %></div> -
src/router/services/networking/network.c
r9108 r9114 1262 1262 cprintf ("Write wireless mac successfully\n"); 1263 1263 eval ("wl", "-i", wl_face, "up"); 1264 start_config_macs (wl_face);1264 start_config_macs (wl_face); 1265 1265 #ifdef HAVE_MSSID 1266 1266 set_vifsmac (mac); … … 1388 1388 #ifndef HAVE_MADWIFI 1389 1389 eval ("wl", "-i", name, "up"); 1390 start_config_macs (name);1390 start_config_macs (name); 1391 1391 #endif 1392 1392 } … … 1405 1405 else 1406 1406 cprintf ("Write wireless mac successfully\n"); 1407 start_config_macs(wl_face);1407 start_config_macs (wl_face); 1408 1408 } 1409 1409 #endif … … 1579 1579 else 1580 1580 cprintf ("Write wireless mac successfully\n"); 1581 start_config_macs(wl_face);1581 start_config_macs (wl_face); 1582 1582 } 1583 1583 … … 2136 2136 int s; 2137 2137 struct ifreq ifr; 2138 eval("ifconfig",nvram_safe_get("wan_ifname"),"allmulti","promisc");2138 eval ("ifconfig", nvram_safe_get ("wan_ifname"), "allmulti", "promisc"); 2139 2139 2140 2140 #ifdef HAVE_PPPOE … … 2316 2316 #ifndef HAVE_MADWIFI 2317 2317 if (wlifname && !strcmp (wan_ifname, wlifname)) 2318 {2319 eval ("wl", "-i", wan_ifname, "up");2320 start_config_macs(wan_ifname);2318 { 2319 eval ("wl", "-i", wan_ifname, "up"); 2320 start_config_macs (wan_ifname); 2321 2321 } 2322 2322 #endif … … 2429 2429 fprintf (fp, "\n"); 2430 2430 char vlannic[32]; 2431 sprintf (vlannic, "%s.0007", pppoe_wan_ifname);2432 if (nvram_match ("wan_vdsl", "1")) // Deutsche Telekom VDSL2 Vlan 7 Tag 2433 {2434 if ( !ifexists (vlannic))2431 if (!strncmp (pppoe_wan_ifname, "vlan", 4)) 2432 { 2433 sprintf (vlannic, "eth0.0007", pppoe_wan_ifname); 2434 if (nvram_match ("wan_vdsl", "1")) 2435 2435 { 2436 eval ("vconfig", "set_name_type", "DEV_PLUS_VID"); 2437 eval ("vconfig", "add", pppoe_wan_ifname, "7"); 2438 eval ("ifconfig", vlannic, "up"); 2436 enable_dtag_vlan (1); 2437 if (!ifexists (vlannic)) 2438 { 2439 eval ("vconfig", "set_name_type", "DEV_PLUS_VID"); 2440 eval ("vconfig", "add", "eth0", "7"); 2441 eval ("ifconfig", vlannic, "up"); 2442 } 2443 fprintf (fp, "nic-%s\n", vlannic); 2439 2444 } 2440 fprintf (fp, "nic-%s\n", vlannic); 2445 else 2446 { 2447 enable_dtag_vlan (0); 2448 if (ifexists (vlannic)) 2449 eval ("vconfig", "rem", vlannic); 2450 fprintf (fp, "nic-%s\n", pppoe_wan_ifname); 2451 } 2452 2453 2441 2454 } 2442 2455 else 2443 2456 { 2444 if (ifexists (vlannic)) 2445 eval ("vconfig", "rem", vlannic); 2446 fprintf (fp, "nic-%s\n", pppoe_wan_ifname); 2457 sprintf (vlannic, "%s.0007", pppoe_wan_ifname); 2458 if (nvram_match ("wan_vdsl", "1")) // Deutsche Telekom VDSL2 Vlan 7 Tag 2459 { 2460 if (!ifexists (vlannic)) 2461 { 2462 eval ("vconfig", "set_name_type", "DEV_PLUS_VID"); 2463 eval ("vconfig", "add", pppoe_wan_ifname, "7"); 2464 eval ("ifconfig", vlannic, "up"); 2465 } 2466 fprintf (fp, "nic-%s\n", vlannic); 2467 } 2468 else 2469 { 2470 if (ifexists (vlannic)) 2471 eval ("vconfig", "rem", vlannic); 2472 fprintf (fp, "nic-%s\n", pppoe_wan_ifname); 2473 } 2447 2474 } 2448 2475 -
src/router/services/sysinit/sysinit-broadcom.c
r9080 r9114 136 136 case ROUTER_LINKSYS_WRH54G: 137 137 nvram_set ("wl0gpio0", "135"); 138 break; 138 break; 139 139 case ROUTER_BUFFALO_WZRRSG54: 140 140 nvram_unset ("wl0_abenable"); … … 143 143 nvram_set ("wl0gpio1", "0"); 144 144 nvram_set ("wl0gpio2", "0"); 145 break; 145 break; 146 146 case ROUTER_ASUS_WL500W: 147 147 case ROUTER_WRT54G: … … 419 419 nvram_set ("wan_ifname", "eth1"); 420 420 nvram_set ("wl0_ifname", "eth2"); 421 eval ("gpio", "init", "0"); //AOSS button422 eval ("gpio", "init", "4"); //reset button421 eval ("gpio", "init", "0"); //AOSS button 422 eval ("gpio", "init", "4"); //reset button 423 423 break; 424 424 … … 702 702 { 703 703 case ROUTER_WRT300NV11: 704 case ROUTER_WRT310N: 704 case ROUTER_WRT310N: 705 705 case ROUTER_WRT350N: 706 706 case ROUTER_WRT600N: … … 1154 1154 #endif 1155 1155 } 1156 1157 1158 void 1159 enable_dtag_vlan (int enable) 1160 { 1161 char *vlan1ports = NULL; 1162 char *vlan2ports = NULL; 1163 char *vlan7ports = NULL; 1164 switch (getRouterBrand ()) 1165 { 1166 case ROUTER_MOTOROLA: 1167 case ROUTER_ASUS_WL520G: 1168 case ROUTER_WRT54G_V8: 1169 vlan1ports = "4 5"; 1170 vlan7ports = "4t 5"; 1171 break; 1172 case ROUTER_LINKSYS_WTR54GS: 1173 vlan1ports = "1 5"; 1174 vlan7ports = "1t 5"; 1175 break; 1176 case ROUTER_ASUS_WL550GE: 1177 case ROUTER_LINKSYS_WRH54G: 1178 vlan1ports = "0 5"; 1179 vlan7ports = "0t 5"; 1180 break; 1181 case ROUTER_WRT600N: 1182 vlan2ports = "0 8"; 1183 vlan7ports = "0t 8"; 1184 break; 1185 case ROUTER_WRT350N: 1186 case ROUTER_BUFFALO_WZRG144NH: 1187 vlan1ports = "4 8"; 1188 vlan7ports = "4t 8"; 1189 break; 1190 default: 1191 vlan1ports = "0 5"; 1192 vlan7ports = "0t 5"; 1193 break; 1194 } 1195 system2 ("echo 1 > /proc/switch/eth0/reset"); 1196 system2 ("echo 1 > /proc/switch/eth1/reset"); 1197 char tmp[200]; 1198 if (enable) 1199 { 1200 sprintf (tmp, "echo %s > /proc/switch/eth0/vlan/7/ports", vlan7ports); 1201 system2 (tmp); 1202 sprintf (tmp, "echo %s > /proc/switch/eth1/vlan/7/ports", vlan7ports); 1203 system2 (tmp); 1204 if (vlan1ports) 1205 { 1206 sprintf (tmp, "echo %s > /proc/switch/eth0/vlan/1/ports", 1207 vlan1ports); 1208 system2 (tmp); 1209 sprintf (tmp, "echo %s > /proc/switch/eth1/vlan/1/ports", 1210 vlan1ports); 1211 system2 (tmp); 1212 } 1213 if (vlan2ports) 1214 { 1215 sprintf (tmp, "echo %s > /proc/switch/eth0/vlan/2/ports", 1216 vlan2ports); 1217 system2 (tmp); 1218 sprintf (tmp, "echo %s > /proc/switch/eth1/vlan/2/ports", 1219 vlan2ports); 1220 system2 (tmp); 1221 } 1222 sprintf (tmp, "echo %s > /proc/switch/eth0/vlan/0/ports", 1223 nvram_safe_get ("vlan0ports")); 1224 system2 (tmp); 1225 sprintf (tmp, "echo %s > /proc/switch/eth1/vlan/0/ports", 1226 nvram_safe_get ("vlan0ports")); 1227 system2 (tmp); 1228 } 1229 else 1230 { 1231 int i; 1232 for (i = 0; i < 16; i++) 1233 { 1234 char vlanb[16]; 1235 sprintf (vlanb, "vlan%dports", i); 1236 if (nvram_get (vlanb) == NULL || nvram_match (vlanb, "")) 1237 continue; 1238 sprintf (tmp, "echo %s > /proc/switch/eth0/vlan/%d/ports", 1239 nvram_safe_get (vlanb), i); 1240 system2 (tmp); 1241 sprintf (tmp, "echo %s > /proc/switch/eth1/vlan/%d/ports", 1242 nvram_safe_get (vlanb), i); 1243 system2 (tmp); 1244 } 1245 } 1246 1247 } -
src/router/services/sysinit/sysinit-ca8.c
r9078 r9114 142 142 { 143 143 } 144 145 void enable_dtag_vlan(int enable) 146 { 147 148 } -
src/router/services/sysinit/sysinit-dir300.c
r9082 r9114 166 166 { 167 167 } 168 void enable_dtag_vlan(int enable) 169 { 170 171 } -
src/router/services/sysinit/sysinit-fonera.c
r9078 r9114 147 147 { 148 148 } 149 void enable_dtag_vlan(int enable) 150 { 151 152 } -
src/router/services/sysinit/sysinit-gateworx.c
r9070 r9114 357 357 { 358 358 } 359 void enable_dtag_vlan(int enable) 360 { 361 362 } -
src/router/services/sysinit/sysinit-ls5.c
r9078 r9114 143 143 { 144 144 } 145 void enable_dtag_vlan(int enable) 146 { 147 148 } -
src/router/services/sysinit/sysinit-magicbox.c
r9080 r9114 176 176 { 177 177 } 178 void enable_dtag_vlan(int enable) 179 { 180 181 } -
src/router/services/sysinit/sysinit-mr3202a.c
r9078 r9114 139 139 { 140 140 } 141 void enable_dtag_vlan(int enable) 142 { 143 144 } -
src/router/services/sysinit/sysinit-newmedia-dual.c
r9080 r9114 160 160 { 161 161 } 162 void enable_dtag_vlan(int enable) 163 { 164 165 } -
src/router/services/sysinit/sysinit-pb42.c
r8011 r9114 137 137 { 138 138 } 139 void enable_dtag_vlan(int enable) 140 { 141 142 } -
src/router/services/sysinit/sysinit-rb532.c
r9080 r9114 173 173 { 174 174 } 175 void enable_dtag_vlan(int enable) 176 { 177 178 } -
src/router/services/sysinit/sysinit-supergerry.c
r9080 r9114 150 150 { 151 151 } 152 void enable_dtag_vlan(int enable) 153 { 154 155 } -
src/router/services/sysinit/sysinit-whrag108.c
r9078 r9114 244 244 { 245 245 } 246 void enable_dtag_vlan(int enable) 247 { 248 249 } -
src/router/services/sysinit/sysinit-wrt300nv2.c
r9080 r9114 223 223 { 224 224 } 225 void enable_dtag_vlan(int enable) 226 { 227 228 } -
src/router/services/sysinit/sysinit-x86.c
r9080 r9114 401 401 { 402 402 } 403 void enable_dtag_vlan(int enable) 404 { 405 406 }
Note: See TracChangeset
for help on using the changeset viewer.
