openwrt-pf/target/linux/ramips
Mieczyslaw Nalewaj 224a967ba1
ramips: mt7530: compile swconfig code conditionally
Wrap all swconfig-specific code in mt7530.c with #if IS_ENABLED(CONFIG_SWCONFIG),
including struct switch_dev, the vlan/port mapping tables and all
switch_dev_ops callbacks. Register access helpers (mt7530_r32/w32), the
PSC/HWTRAP definitions, and the small set of swconfig-only register
macros and MIB tables further up the file remain unconditional - the
latter two are unused-but-harmless when swconfig is disabled and are
left alone to keep the diff focused.

When swconfig is not compiled in, the driver performs only minimal
hardware init (disables MAC learning on all ports, applies the HWTRAP
fixup) and skips switch registration, mirroring the existing behaviour
of the "mediatek,no-swconfig" device tree property. This removes the
need for that property when building DSA-only images. The property is
still honoured whenever CONFIG_SWCONFIG is enabled (built-in or as a module).

A distinct log message is used for the compile-time case, to
distinguish it from the runtime "mediatek,no-swconfig" case in dmesg.
Also switch the existing runtime "swconfig disabled" message from
pr_info() to dev_info(), changing its dmesg prefix from "mt7620: " /
"mt7530: " to the device's own prefix.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/24574
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-08-07 09:16:10 +02:00
..
base-files/etc
dts ramips: mt76x8: fix MT7663 EEPROM cell for MERCUSYS MB130-4G v1 2026-07-21 08:55:33 +02:00
files ramips: mt7530: compile swconfig code conditionally 2026-08-07 09:16:10 +02:00
image ramips: add support for Comfast CF-EW84 2026-07-19 13:09:05 +02:00
mt76x8 ramips: mt76x8: add support for Cudy LT500 Outdoor v1 2026-07-11 19:57:05 +02:00
mt7620 ramips: drop 6.12 support 2026-04-28 09:44:04 +02:00
mt7621 ramips: add support for Comfast CF-EW84 2026-07-19 13:09:05 +02:00
patches-6.18 kernel: bump 6.18 to 6.18.40 2026-08-01 23:43:05 +02:00
rt288x ramips: drop 6.12 support 2026-04-28 09:44:04 +02:00
rt305x ramips: drop 6.12 support 2026-04-28 09:44:04 +02:00
rt3883 ramips: drop 6.12 support 2026-04-28 09:44:04 +02:00
Makefile ramips: use kernel 6.18 by default 2026-04-28 09:44:03 +02:00
modules.mk