From 3ea770db73799c82ab98a2413b1c6b39f94e9278 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 28 Jan 2022 19:45:34 +0100 Subject: [PATCH] ath79-generic: swap interfaces on TP-Link WBS210 v2 (#2385) Swap the interfaces so than the PoE input port LAN0 is used for WAN and config mode, and LAN1 becomes LAN. To this end, the code previously used for ar71xx and removed in commit 9fdc57c175b4 ("treewide: drop ar71xx platform specific code") is reintroduced. Fixes #2384 --- package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces index d2814968..6371cc61 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces @@ -50,7 +50,11 @@ end local lan_ifname = iface_exists(lan_interfaces) local wan_ifname = iface_exists(wan_interfaces) -if platform.match('lantiq') then +if platform.match('ath79', 'generic', { + 'tplink,wbs210-v2', +}) then + lan_ifname, wan_ifname = wan_ifname, lan_ifname +elseif platform.match('lantiq') then local switch_data = board_data.switch or {} local switch0_data = switch_data.switch0 or {} local roles_data = switch0_data.roles or {}