[LEDE-DEV] [RFC] mvebu: simplify etc/board.d/02_network
Yousong Zhou
yszhou4tech at gmail.com
Mon Oct 31 05:19:01 PDT 2016
On 29 October 2016 at 02:22, <p.wassi at gmx.at> wrote:
> From: Paul Wassi <p.wassi at gmx.at>
>
> Unify switch configuration on Linksys WRTxx00AC series.
> LAN = eth0, WAN = eth1
>
> Signed-off-by: Paul Wassi <p.wassi at gmx.at>
> ---
> In the OpenWrt wiki, it can be seen that the Linksys WRTxx00AC series
> has a device dependent switch configuration:
> https://wiki.openwrt.org/toh/linksys/wrt_ac_series#switch_layout
> All devices have eth0 and eth1, however some devices set eth0 as LAN, eth1 as WAN,
> while others do it the other way 'round: eth0 = WAN, eth1 = LAN.
> As I don't see a technical requirement to have these differences, couldn't we
> make life (and code) easier by unifying switch configuration among these devices.
> I.e. the WRTxx00AC series would then have eth0 = LAN, eth1 = WAN and therefore share
> the same lines of code (for network configuration).
years back a patch was posted to switch registration order of
eth0/eth1 for TL-WR720N-v3 to allow failsafe on port labeled LAN.
That patch was posted because it may cause trouble existing users
doing sysupgrade preserving existing configs [1]. I think the same
consideration still applies here.
[1] ar71xx: make failsafe for TL-WR720N-v3 work on port labelled as
LAN. https://lists.openwrt.org/pipermail/openwrt-devel/2013-September/021276.html
yousong
>
> linux/mvebu/base-files/etc/board.d/02_network | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/target/linux/mvebu/base-files/etc/board.d/02_network b/target/linux/mvebu/base-files/etc/board.d/02_network
> --- a/target/linux/mvebu/base-files/etc/board.d/02_network
> +++ b/target/linux/mvebu/base-files/etc/board.d/02_network
> @@ -15,11 +15,7 @@ case "$board" in
> armada-385-linksys-caiman|\
> armada-385-linksys-cobra|\
> armada-385-linksys-rango|\
> -armada-385-linksys-shelby)
> - ucidef_set_interfaces_lan_wan "eth1" "eth0"
> - ucidef_add_switch "switch0" \
> - "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "6 at eth1" "4:wan" "5 at eth0"
> - ;;
> +armada-385-linksys-shelby|\
> armada-xp-linksys-mamba)
> ucidef_set_interfaces_lan_wan "eth0" "eth1"
> ucidef_add_switch "switch0" \
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
More information about the Lede-dev
mailing list