On 06/01/2013 06:24 PM, Tomislav Požega wrote:
> vlan0ports=5
> vlan1ports=0 1 2 3 4 5*
> 
> i have zipped nvram, original firmware boot process and complete flash
> image in case you might find it useful

Could you try the attached patch.

Hauke

>     > Index: target/linux/brcm47xx/base-files/etc/init.d/netconfig
>     > ===================================================================
>     > --- target/linux/brcm47xx/base-files/etc/init.d/netconfig    (revision
>     > 35832)
>     > +++ target/linux/brcm47xx/base-files/etc/init.d/netconfig  
>      (working copy)
>     > @@ -225,6 +225,12 @@
>     >              c["vlan1ports"] = ""
>     >              c["vlan2ports"] = ""
>     >          }
>     > +        if (model == "Option GlobeSurfer III") {
>     > +            c["lan_ifname"] = "eth0.1"
>     > +            c["wan_ifname"] = ""
>     > +            c["vlan1ports"] = "0 1 2 3 4 5u"
>     > +            c["vlan2ports"] = ""
>     > +        }
> 
>     I would more like a generic detection of this switch configuration.
>     Could you please post your nvram values for vlan{0,1,2}ports. When these
>     values are containing correct values we could do a generic detection.
> 
>     >          if (c["vlan1ports"] || c["vlan2ports"]) {
>     >              print "#### VLAN configuration "

diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
index b4be21f..98d695b 100755
--- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig
+++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
@@ -119,6 +119,13 @@ start() {
 			c["vlan1ports"] = "0 1 2 3 5t"
 			c["vlan2ports"] = "4 5t"
 		}
+		if (((nvram["vlan0ports"] ~ /^5/ ) && (nvram["vlan1ports"] ~ /^0 1 2 3 4 5/ && (cpuport == "5"))) || \
+		    ((nvram["vlan1ports"] ~ /^5/ ) && (nvram["vlan2ports"] ~ /^0 1 2 3 4 5/ && (cpuport == "5")))) {
+			c["lan_ifname"] = "eth0.1"
+			c["wan_ifname"] = ""
+			c["vlan1ports"] = "0 1 2 3 4 5u"
+			c["vlan2ports"] = ""
+		}
 		if ((model == "ASUS WL-HDD") || (model == "ASUS WL-300g") || (model == "Linksys WAP54G V1")) {
 			c["wan_ifname"] = ""
 			c["lan_ifname"] = "eth1"
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to