diff options
author | Michael Pratt <mcpratt@pm.me> | 2021-04-20 12:35:47 -0400 |
---|---|---|
committer | Chuanhong Guo <gch981213@gmail.com> | 2021-06-23 14:22:19 +0800 |
commit | 2adeada04558848058105cdad8195848d10d1486 (patch) | |
tree | 3549fdc21714ac1cec8fa1d8d6504d7dbdcc9288 /target/linux/ramips/mt7620/base-files/etc | |
parent | 88a0cebadfecb6ebb9f5f535e74f7f7574f513f3 (diff) | |
download | upstream-2adeada04558848058105cdad8195848d10d1486.tar.gz upstream-2adeada04558848058105cdad8195848d10d1486.tar.bz2 upstream-2adeada04558848058105cdad8195848d10d1486.zip |
ramips: mt7620: disable SOC VLANs for external switches
These boards have AR8327 or QCA8337 external ethernet switch.
The SOC also has it's own internal switch
where VLAN is now enabled by default.
Changes to preinit caused all switches to have VLANs enabled by default
even if they are not configured with a topology in uci_defaults
(see commit f017f617aecbd47debd4d3a734dc0e471342db96)
When both internal and external switches have VLANs,
and the external switch has both LAN and WAN,
the TX traffic from the SOC cannot flow to the tagged port on the external switch
because the VLAN IDs are not matching.
So disable the internal switch VLANs by default on these boards.
Also, add a topology for the internal switch,
so that on LuCI there is not an "unknown topology" warning.
In theory, it may be possible to have LAN ports on both switches
through internal and external PHYs, but there are no known boards that have this.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'target/linux/ramips/mt7620/base-files/etc')
-rw-r--r-- | target/linux/ramips/mt7620/base-files/etc/board.d/02_network | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 71850863c0..eaa8cbf7aa 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -136,6 +136,9 @@ ramips_setup_interfaces() engenius,esr600) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "0@eth0" + ucidef_add_switch "switch1" \ + "5:lan" "6@eth0" + ucidef_add_switch_attr "switch1" "enable" "false" ;; fon,fon2601) ucidef_add_switch "switch0" \ @@ -168,6 +171,9 @@ ramips_setup_interfaces() lava,lr-25g001) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" + ucidef_add_switch "switch1" \ + "5:lan" "6@eth0" + ucidef_add_switch_attr "switch1" "enable" "false" ;; lenovo,newifi-y1|\ xiaomi,miwifi-mini) |