diff mbox

[OpenWrt-Devel,2/2] mvebu: set default WRT1900AC switch config

Message ID 1424568021-2907-2-git-send-email-leitec@staticky.com
State Not Applicable
Headers show

Commit Message

Claudio Leite Feb. 22, 2015, 1:20 a.m. UTC
This sets 'enable_vlan' and thus uses 802.1q
VLANs, but without tagging on either interface.

Signed-off-by: Claudio Leite <leitec@staticky.com>
---
 target/linux/mvebu/base-files/etc/uci-defaults/02_network | 3 +++
 1 file changed, 3 insertions(+)

Comments

Claudio Leite Feb. 22, 2015, 2:09 a.m. UTC | #1
* Claudio Leite (leitec@staticky.com) wrote:
> This sets 'enable_vlan' and thus uses 802.1q
> VLANs, but without tagging on either interface.

Note: this depends on the previous patch, since setting up the switch
when both interfaces have the same MAC address results in a ton of
packet loss. This might be a bug in the switch driver. It may be
related that with the current setup (i.e. without either of these
patches) I see a lot of

[   65.401622] br-lan: received packet on eth0 with own address as
source address

while running NAT routing tests between two PCs, using both LAN and
WAN interfaces. They seem to go away once I change the MAC (patch 1
only) which then also allows the setup from this patch to work. However,
I might be mixed up as to what the cause is, since I haven't looked
into this too deeply yet. Any insight is appreciated.

It's worth noting the original Linksys firmware seems to use the same
MAC on both interfaces.

-Claudio

> 
> Signed-off-by: Claudio Leite <leitec@staticky.com>
> ---
>  target/linux/mvebu/base-files/etc/uci-defaults/02_network | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/02_network b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
> index 8b1ed6a..9464f36 100644
> --- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
> @@ -17,6 +17,9 @@ board=$(mvebu_board_name)
>  case "$board" in
>  armada-xp-mamba)
>  	ucidef_set_interfaces_lan_wan "eth0" "eth1"
> +	ucidef_add_switch "switch0" "1" "1"
> +	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5"
> +	ucidef_add_switch_vlan "switch0" "2" "4 6"
>  	;;
>  
>  *)
> -- 
> 2.1.4
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Imre Kaloz Feb. 23, 2015, 10:36 a.m. UTC | #2
On Sun, 22 Feb 2015 02:20:21 +0100, Claudio Leite <leitec@staticky.com>  
wrote:

> This sets 'enable_vlan' and thus uses 802.1q
> VLANs, but without tagging on either interface.
>
> Signed-off-by: Claudio Leite <leitec@staticky.com>

Committed as 44509.


Thanks,

Imre
diff mbox

Patch

diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/02_network b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
index 8b1ed6a..9464f36 100644
--- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network
+++ b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
@@ -17,6 +17,9 @@  board=$(mvebu_board_name)
 case "$board" in
 armada-xp-mamba)
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"
+	ucidef_add_switch "switch0" "1" "1"
+	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5"
+	ucidef_add_switch_vlan "switch0" "2" "4 6"
 	;;
 
 *)