From b8dea2ed3412f8d50253051f520177df35f49f85 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Mon, 2 Oct 2023 18:59:23 +0100 Subject: [PATCH] rt3200: add DSA this creates a bunch of network interfaces {lan[1234],wan}@eth0 --- devices/belkin-rt3200/default.nix | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/devices/belkin-rt3200/default.nix b/devices/belkin-rt3200/default.nix index d293222..4057982 100644 --- a/devices/belkin-rt3200/default.nix +++ b/devices/belkin-rt3200/default.nix @@ -40,7 +40,6 @@ ARCH_MEDIATEK = "y"; # ARM_MEDIATEK_CPUFREQ = "y"; - # needed for "Cannot find regmap for /infracfg@10000000" MFD_SYSCON = "y"; MTK_INFRACFG = "y"; @@ -85,6 +84,12 @@ MMC_CQHCI = "y"; MMC_MTK = "y"; + # Distributed Switch Architecture is needed + # to make the ethernet ports visible + NET_DSA="y"; + NET_DSA_MT7530="y"; + NET_DSA_TAG_MTK="y"; + PSTORE = "y"; PSTORE_RAM = "y"; PSTORE_CONSOLE = "y"; @@ -129,12 +134,18 @@ flash.eraseBlockSize = "65536"; # c.f. pkgs/mips-vm/mips-vm.sh networkInterfaces = - let inherit (config.system.service.network) link; - in { - wan = link.build { ifname = "eth0"; }; - lan = link.build { ifname = "eth1"; }; + let + inherit (config.system.service.network) link; + inherit (config.system.service) bridge; + in rec { + wan = link.build { ifname = "wan"; }; + lan1 = link.build { ifname = "lan1"; }; + lan2 = link.build { ifname = "lan2"; }; + lan3 = link.build { ifname = "lan3"; }; + lan4 = link.build { ifname = "lan4"; }; + lan = lan3; - wlan_24 = link.build { + wlan = link.build { ifname = "wlan0"; dependencies = [ mac80211 ]; };