[OpenWrt-Devel] [PATCH] ramips: set default vid of each vlan, so it won't need be set explicitly.
Signed-off-by: Xiongfei Guo xf...@credosemi.com --- ...8-NET-MIPS-add-ralink-SoC-ethernet-driver.patch | 24 ++ 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/target/linux/ramips/patches-3.10/0118-NET-MIPS-add-ralink-SoC-ethernet-driver.patch b/target/linux/ramips/patches-3.10/0118-NET-MIPS-add-ralink-SoC-ethernet-driver.patch index c5d6623..6eb624f 100644 --- a/target/linux/ramips/patches-3.10/0118-NET-MIPS-add-ralink-SoC-ethernet-driver.patch +++ b/target/linux/ramips/patches-3.10/0118-NET-MIPS-add-ralink-SoC-ethernet-driver.patch @@ -2814,7 +2814,7 @@ Signed-off-by: John Crispin blo...@openwrt.org +#endif --- /dev/null +++ b/drivers/net/ethernet/ralink/mt7530.c -@@ -0,0 +1,571 @@ +@@ -0,0 +1,579 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License @@ -2912,15 +2912,15 @@ Signed-off-by: John Crispin blo...@openwrt.org + { + .name = w, + .pvids = { 1, 1, 1, 1, 2, 1, 1 }, -+ .members = { 0x6f, 0x50 }, -+ .etags = { 0x40, 0x40 }, -+ .vids = { 1, 2 }, ++ .members = { 0, 0x6f, 0x50 }, ++ .etags = { 0, 0x40, 0x40 }, ++ .vids = { 0, 1, 2 }, + }, { + .name = w, + .pvids = { 2, 1, 1, 1, 1, 1, 1 }, -+ .members = { 0x7e, 0x41 }, -+ .etags = { 0x40, 0x40 }, -+ .vids = { 1, 2 }, ++ .members = { 0, 0x7e, 0x41 }, ++ .etags = { 0, 0x40, 0x40 }, ++ .vids = { 0, 1, 2 }, + }, +}; + @@ -2961,10 +2961,18 @@ Signed-off-by: John Crispin blo...@openwrt.org +mt7530_reset_switch(struct switch_dev *dev) +{ + struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); ++ int i; + + memset(priv-port_entries, 0, sizeof(priv-port_entries)); + memset(priv-vlan_entries, 0, sizeof(priv-vlan_entries)); + ++ /* set default vid of each vlan to the same number of vlan, so the vid ++ * won't need be set explicitly. ++ */ ++ for (i = 0; i MT7530_NUM_VLANS; i++) { ++ priv-vlan_entries[i].vid = i; ++ } ++ + return 0; +} + @@ -3158,7 +3166,7 @@ Signed-off-by: John Crispin blo...@openwrt.org + vid = (u16)val-value.i; + + if (vlan 0 || vlan = MT7530_NUM_VLANS) -+ return -EINVAL; ++ return -EINVAL; + + if (vid MT7530_MIN_VID || vid MT7530_MAX_VID) + return -EINVAL; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: set default vid of each vlan, so it won't need be set explicitly.
Great, Roman can you test / confirm that this fixes the problem on rt-n14 ? i don't have that unit myself so i cannot test. John On 01/07/2014 12:54, xf...@credosemi.com wrote: Signed-off-by: Xiongfei Guo xf...@credosemi.com --- ...8-NET-MIPS-add-ralink-SoC-ethernet-driver.patch | 24 ++ 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/target/linux/ramips/patches-3.10/0118-NET-MIPS-add-ralink-SoC-ethernet-driver.patch b/target/linux/ramips/patches-3.10/0118-NET-MIPS-add-ralink-SoC-ethernet-driver.patch index c5d6623..6eb624f 100644 --- a/target/linux/ramips/patches-3.10/0118-NET-MIPS-add-ralink-SoC-ethernet-driver.patch +++ b/target/linux/ramips/patches-3.10/0118-NET-MIPS-add-ralink-SoC-ethernet-driver.patch @@ -2814,7 +2814,7 @@ Signed-off-by: John Crispin blo...@openwrt.org +#endif --- /dev/null +++ b/drivers/net/ethernet/ralink/mt7530.c -@@ -0,0 +1,571 @@ +@@ -0,0 +1,579 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License @@ -2912,15 +2912,15 @@ Signed-off-by: John Crispin blo...@openwrt.org +{ + .name = w, + .pvids = { 1, 1, 1, 1, 2, 1, 1 }, -+ .members = { 0x6f, 0x50 }, -+ .etags = { 0x40, 0x40 }, -+.vids = { 1, 2 }, ++.members = { 0, 0x6f, 0x50 }, ++.etags = { 0, 0x40, 0x40 }, ++ .vids = { 0, 1, 2 }, + }, { +.name = w, + .pvids = { 2, 1, 1, 1, 1, 1, 1 }, -+ .members = { 0x7e, 0x41 }, -+ .etags = { 0x40, 0x40 }, -+ .vids = { 1, 2 }, ++ .members = { 0, 0x7e, 0x41 }, ++.etags = { 0, 0x40, 0x40 }, ++.vids = { 0, 1, 2 }, + }, +}; + @@ -2961,10 +2961,18 @@ Signed-off-by: John Crispin blo...@openwrt.org +mt7530_reset_switch(struct switch_dev *dev) +{ + struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); ++int i; + + memset(priv-port_entries, 0, sizeof(priv-port_entries)); +memset(priv-vlan_entries, 0, sizeof(priv-vlan_entries)); + ++ /* set default vid of each vlan to the same number of vlan, so the vid ++ * won't need be set explicitly. ++ */ ++ for (i = 0; i MT7530_NUM_VLANS; i++) { ++ priv-vlan_entries[i].vid = i; ++ } ++ + return 0; +} + @@ -3158,7 +3166,7 @@ Signed-off-by: John Crispin blo...@openwrt.org + vid = (u16)val-value.i; + +if (vlan 0 || vlan = MT7530_NUM_VLANS) -+ return -EINVAL; ++return -EINVAL; + + if (vid MT7530_MIN_VID || vid MT7530_MAX_VID) + return -EINVAL; ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: set default vid of each vlan, so it won't need be set explicitly.
On 1 July 2014 13:57, John Crispin j...@phrozen.org wrote: Great, Roman can you test / confirm that this fixes the problem on rt-n14 ? i don't have that unit myself so i cannot test. Yes, it fixes the default configuration. But I still don't understand why I cannot change neither vid not member ports: root@OpenWrt:/# swconfig dev switch0 vlan 1 show VLAN 1: vid: 1 ports: 1 2 3 4 6t root@OpenWrt:/# swconfig dev switch0 vlan 1 set ports '3 4 6t' root@OpenWrt:/# swconfig dev switch0 vlan 1 show VLAN 1: vid: 1 ports: 1 2 3 4 6t So is it broken or what? Although I didn't check earlier versions it seems broken to me... Regards, Roman ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: set default vid of each vlan, so it won't need be set explicitly.
On 01/07/2014 16:11, Roman Yeryomin wrote: On 1 July 2014 13:57, John Crispin j...@phrozen.org wrote: Great, Roman can you test / confirm that this fixes the problem on rt-n14 ? i don't have that unit myself so i cannot test. Yes, it fixes the default configuration. But I still don't understand why I cannot change neither vid not member ports: root@OpenWrt:/# swconfig dev switch0 vlan 1 show VLAN 1: vid: 1 ports: 1 2 3 4 6t root@OpenWrt:/# swconfig dev switch0 vlan 1 set ports '3 4 6t' root@OpenWrt:/# swconfig dev switch0 vlan 1 show VLAN 1: vid: 1 ports: 1 2 3 4 6t So is it broken or what? Although I didn't check earlier versions it seems broken to me... sounds broken, added to my todo list ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: set default vid of each vlan, so it won't need be set explicitly.
On 1 July 2014 17:13, John Crispin j...@phrozen.org wrote: On 01/07/2014 16:11, Roman Yeryomin wrote: On 1 July 2014 13:57, John Crispin j...@phrozen.org wrote: Great, Roman can you test / confirm that this fixes the problem on rt-n14 ? i don't have that unit myself so i cannot test. Yes, it fixes the default configuration. But I still don't understand why I cannot change neither vid not member ports: root@OpenWrt:/# swconfig dev switch0 vlan 1 show VLAN 1: vid: 1 ports: 1 2 3 4 6t root@OpenWrt:/# swconfig dev switch0 vlan 1 set ports '3 4 6t' root@OpenWrt:/# swconfig dev switch0 vlan 1 show VLAN 1: vid: 1 ports: 1 2 3 4 6t So is it broken or what? Although I didn't check earlier versions it seems broken to me... sounds broken, added to my todo list Figured it out: swconfig dev switch0 set apply Completely in-obvious way, seems the help messages should be improved :) Regards, Roman ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: set default vid of each vlan, so it won't need be set explicitly.
01.07.2014, 21:11, "Roman Yeryomin" leroi.li...@gmail.com:On 1 July 2014 13:57, John Crispin j...@phrozen.org wrote: Great, Roman can you test / confirm that this fixes the problem on rt-n14 ? i don't have that unit myself so i cannot test.Yes, it fixes the default configuration.But I still don't understand why I cannot change neither vid not member ports:root@OpenWrt:/# swconfig dev switch0 vlan 1 showVLAN 1:vid: 1ports: 1 2 3 4 6troot@OpenWrt:/# swconfig dev switch0 vlan 1 set ports '3 4 6t'root@OpenWrt:/# swconfig dev switch0 vlan 1 showVLAN 1:vid: 1ports: 1 2 3 4 6tSo is it broken or what?Although I didn't check earlier versions it seems broken to me...Possibly you miss commandswconfig dev switch0 set apply???On my board vid is changed. ---serge ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: set default vid of each vlan, so it won't need be set explicitly.
On 1 July 2014 19:12, Сергей Василюгин vasilu...@yandex.ru wrote: 01.07.2014, 21:11, Roman Yeryomin leroi.li...@gmail.com: On 1 July 2014 13:57, John Crispin j...@phrozen.org wrote: Great, Roman can you test / confirm that this fixes the problem on rt-n14 ? i don't have that unit myself so i cannot test. Yes, it fixes the default configuration. But I still don't understand why I cannot change neither vid not member ports: root@OpenWrt:/# swconfig dev switch0 vlan 1 show VLAN 1: vid: 1 ports: 1 2 3 4 6t root@OpenWrt:/# swconfig dev switch0 vlan 1 set ports '3 4 6t' root@OpenWrt:/# swconfig dev switch0 vlan 1 show VLAN 1: vid: 1 ports: 1 2 3 4 6t So is it broken or what? Although I didn't check earlier versions it seems broken to me... Possibly you miss command swconfig dev switch0 set apply ??? On my board vid is changed. Apparently you didn't read my following post... Regards, Roman ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel