]> git.ipfire.org Git - thirdparty/openwrt.git/log
thirdparty/openwrt.git
2 months agokernel: refresh patches for 6.18.20 13333/head 22643/head
John Audia [Sat, 28 Mar 2026 11:22:43 +0000 (07:22 -0400)] 
kernel: refresh patches for 6.18.20

Sole patch automatically rebased.

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/22643
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomicrochipsw: tactical-1000: expand FIP partition size
Robert Marko [Fri, 20 Mar 2026 13:23:16 +0000 (14:23 +0100)] 
microchipsw: tactical-1000: expand FIP partition size

Expand the FIP partition size to future proof and allow custom firmware
to be used as BL31 instead of U-Boot.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2 months agokernel: refresh patches 21078/head
John Audia [Tue, 20 Jan 2026 13:51:20 +0000 (08:51 -0500)] 
kernel: refresh patches

x86 patches automatically rebased

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agox86: make CONFIG_NR_CPUS a tunable (2-512)
John Audia [Sun, 4 Jan 2026 15:31:43 +0000 (10:31 -0500)] 
x86: make CONFIG_NR_CPUS a tunable (2-512)

Add KERNEL_NR_CPUS option in Global build settings → Kernel build
options, allowing users to set maximum CPU count (2-512) for the image.

Defaults:
- x86_64: 512 CPUs (backward compatible)
- x86: 8 CPUs (fix broken single-CPU default)

Per-CPU data structures consume ~100-200KB each.
On a 4-core system configured to NR_CPUS=4, this frees approx 76 MB
of RAM: (512 - 4) × 150 KB = ~76 MB

Note: CONFIG_NR_CPUS_RANGE_{BEGIN,END}= and CONFIG_NR_CPUS_DEFAULT= are
set by the build system and will default to 2/512/64 per arch/x86/Kconfig
These are harmless metadata and don't affect memory allocation.

Note pending https://github.com/openwrt/openwrt/pull/21407

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agox86/64: 6.18: enable recent MITIGATION options
John Audia [Mon, 5 Jan 2026 20:02:37 +0000 (15:02 -0500)] 
x86/64: 6.18: enable recent MITIGATION options

These mitigations are low-overhead, upstream-supported hardening options
that only activate on CPUs affected by their respective vulnerabilities.
Enabling them provides consistent, defense-in-depth coverage across Intel
and AMD systems without impacting unaffected hardware.

Detailed list:
- CONFIG_MITIGATION_SRSO to guard against known a vulnerability found on
  AMD processors (Zen generations 1-4) for sure, maybe others. This is
  tracked under CVE-2023-20569.
- CONFIG_MITIGATION_ITS to guard against a bug in BPU on some Intel CPUs
  that may allow Spectre V2 style attacks. We never enabled this option
  (and its dependencies).
- CONFIG_MITIGATION_SRBDS to guard against Special Register Buffer Data
  Sampling on affected Intel CPUs (CVE-2020-0543), preventing cross-core
  leakage of RDRAND/RDSEED/EGETKEY values.
- CONFIG_MITIGATION_SLS to guard against Spectre-v4 gadgets on x86 by
  inserting speculation barriers around RET/JMP/CALL sites when required
  by CPU/microcode state.
- CONFIG_MITIGATION_CALL_DEPTH_TRACKING to guard against speculative
  call-stack underflow on x86 by enabling hardware-assisted depth
  tracking where supported, reducing exposure to RET-based misprediction
  attacks.
- CONFIG_MITIGATION_UNRET_ENTRY to guard against RET-based speculation
  attacks on x86 by replacing vulnerable function returns in kernel
  entry paths with UNRET sequences when required by CPU/microcode state.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agox86/64: 6.18: enable THP (disabled by default)
John Audia [Sun, 8 Feb 2026 12:58:52 +0000 (07:58 -0500)] 
x86/64: 6.18: enable THP (disabled by default)

Users can opt-in to THP via builtin tunables under:
/sys/kernel/mm/transparent_hugepage/enabled

Useful if using running VMs on the device.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agox86: 6.18: import new options
John Audia [Sat, 13 Dec 2025 21:07:28 +0000 (16:07 -0500)] 
x86: 6.18: import new options

Some options here were identified by running:
make kernel_oldconfig while others were manually added from a list
curated by hand at build time.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agortl8812au-ct: restrict to kernels ≤ 6.18
John Audia [Fri, 2 Jan 2026 16:55:24 +0000 (11:55 -0500)] 
rtl8812au-ct: restrict to kernels ≤ 6.18

The rtl8812au-ct driver is obsolete and replaced by rtw88. It will need
tons of work to compile against 6.18 so for now limit it to 6.12.

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: video: 6.18: update module files
John Audia [Fri, 19 Dec 2025 15:41:57 +0000 (10:41 -0500)] 
kernel: video: 6.18: update module files

Update module files for kernel 6.18

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: sound: 6.18: update module files
John Audia [Sun, 21 Dec 2025 14:00:35 +0000 (09:00 -0500)] 
kernel: sound: 6.18: update module files

This kernel reorganized HDA drivers into sound/hda/ subdirectories and
split codec drivers into modular components. Core modules moved to
sound/hda/{core,common,codecs,controllers}/ with version conditionals
(@ge6.18/@lt6.18) added for backward compatibility.

Codec drivers split into multiple modules:
- Realtek: library + 10 chipset modules (ALC260-ALC882)
- HDMI: base + 6 vendor modules (Intel, ATI, NVIDIA, etc.)
- Cirrus: 3 chipset modules (CS420X, CS421X, CS8409)

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: other: 6.18: update module files
John Audia [Fri, 19 Dec 2025 15:25:25 +0000 (10:25 -0500)] 
kernel: other: 6.18: update module files

Update module files for kernel 6.18

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: modules: 6.18: update module file
John Audia [Thu, 5 Feb 2026 20:13:15 +0000 (15:13 -0500)] 
kernel: modules: 6.18: update module file

Wrap the crc32c dependency in !LINUX_6_18 to allow the package to
build correctly on 6.18-based targets.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agox86: enable testing kernel for x86
John Audia [Sat, 13 Dec 2025 15:49:14 +0000 (10:49 -0500)] 
x86: enable testing kernel for x86

KERNEL_TESTING_PATCHVER:=6.18

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel/x86: restore files for v6.12
John Audia [Sat, 28 Mar 2026 09:38:05 +0000 (05:38 -0400)] 
kernel/x86: restore files for v6.12

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel/x86: create files for v6.18 (from v6.12)
John Audia [Sat, 28 Mar 2026 09:38:05 +0000 (05:38 -0400)] 
kernel/x86: create files for v6.18 (from v6.12)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: usb-dwc3-qcom: package legacy Qualcomm glue driver
Til Kaiser [Wed, 11 Mar 2026 20:36:59 +0000 (21:36 +0100)] 
kernel: usb-dwc3-qcom: package legacy Qualcomm glue driver

Linux 6.18 now builds both dwc3-qcom.ko and dwc3-qcom-legacy.ko
under CONFIG_USB_DWC3_QCOM. [1]

Upstream qcom-ipq4019.dtsi still uses the legacy Qualcomm DWC3 DT
layout, so ipq40xx boards require the legacy glue driver for USB
host bring-up.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b958b03c82d2a1c470225355e43248c679a949a5

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomt76: use hrtimer_setup() in mt76x02u beacon init
Mieczyslaw Nalewaj [Thu, 29 Jan 2026 15:48:20 +0000 (16:48 +0100)] 
mt76: use hrtimer_setup() in mt76x02u beacon init

Replace the two-step hrtimer initialization pattern with a single
consolidated call to hrtimer_setup().
The legacy approach of calling hrtimer_init() followed by manual
assignment to timer.function is deprecated. The new hrtimer_setup()
helper atomically initializes the timer and assigns the callback
function in one operation, eliminating the race-prone intermediate
state where the timer is initialized but lacks a handler.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel.mk: add 6.18 workaround for empty Module.symvers.tmp
Til Kaiser [Mon, 26 Jan 2026 18:48:47 +0000 (19:48 +0100)] 
kernel.mk: add 6.18 workaround for empty Module.symvers.tmp

On Linux 6.18 the path-based symvers filter can
yield an empty tmp file for external modules.

Add a 6.18-only fallback using modules.order
to populate Module.symvers.tmp.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomac80211: ath9k: gpio: adapt to 6.16+ gpio_chip API change
Mieczyslaw Nalewaj [Wed, 24 Dec 2025 22:01:16 +0000 (23:01 +0100)] 
mac80211: ath9k: gpio: adapt to 6.16+ gpio_chip API change

Linux 6.16 changed the return type of gpio_chip.set() from void to int.
Add a version check so the driver builds correctly on both older and
newer kernels[1].

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.16&id=fb52f3226cab41b94f9e6ac92b1108bce324e700

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomac80211: restore pre-6.14 debugfs_fops handling
Mieczyslaw Nalewaj [Wed, 24 Dec 2025 21:24:32 +0000 (22:24 +0100)] 
mac80211: restore pre-6.14 debugfs_fops handling

Reintroduce old-style debugfs file_operations for kernels < 6.14 and
switch the drivers to use debugfs_short_fops + debugfs_create_file_aux
on >= 6.14. This restores compatibility with older kernels while keeping
the new debugfs API working on 6.14+.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomac80211: fix build failure on kernel 6.18
Mieczyslaw Nalewaj [Thu, 25 Dec 2025 17:40:35 +0000 (18:40 +0100)] 
mac80211: fix build failure on kernel 6.18

Kernel since version 6.16 defines `SOCKWQ_ASYNC_NOSPACE` and
SOCKWQ_ASYNC_WAITDATA` in the socket_flags enum, which causes redefinition
errors when compiling the backport package[1].
Since kernel 6.12 also has them defined, the test and definition of these
constants have been completely abandoned. Thanks to this, there are
no compilation errors on either kernel 6.12 or 6.18.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.16&id=0e81cfd971dc4833c699dcd8924e54a5021bc4e8

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoplatform/mikrotik: adjust hc_wlan read-callback for 6.18
Mieczyslaw Nalewaj [Fri, 9 Jan 2026 16:07:56 +0000 (17:07 +0100)] 
platform/mikrotik: adjust hc_wlan read-callback for 6.18

Include <linux/version.h> and use preprocessor checks to select the appropriate
prototype and definition for hc_wlan_data_bin_read. The third parameter of bin_attribute
read callbacks was changed to 'const struct bin_attribute *' in Linux 6.18; this
change prevents compilation errors on newer kernels while preserving compatibility
with older ones

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: silence unused-variable warnings
Mieczyslaw Nalewaj [Wed, 7 Jan 2026 00:38:03 +0000 (01:38 +0100)] 
generic: 6.18: silence unused-variable warnings

This patch silences compiler warnings about unused variables by explicitly
casting them to void where appropriate.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokbuild: extract modules.builtin.modinfo from vmlinux.o
Mieczyslaw Nalewaj [Tue, 16 Dec 2025 19:18:18 +0000 (20:18 +0100)] 
kbuild: extract modules.builtin.modinfo from vmlinux.o

Partially reverse https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=39cfd5b12160be4f57df1c3ba60139741c827616
to prevent generation of empty modules.builtin.modinfo and modules.builtin
files that cause modules compilation errors.
If an out-of-tree package or any kernel-install rule ran modprobe xyz while
the build was still in progress, and xyz had been configured =y, a clean tree
would already have xyz listed in modules.builtin; with the empty file produced
by the buggy rule it was missing, so modprobe emitted "module xyz not found"
even though the code was sitting inside the freshly built vmlinux.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agopackages: 6.18: update modules files
Mieczyslaw Nalewaj [Sat, 20 Dec 2025 12:21:06 +0000 (13:21 +0100)] 
packages: 6.18: update modules files

Update modules files for kernel 6.18.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoserial: 8250: 6.18: add UPIO_AU case to set_io_from_upio()
Mieczyslaw Nalewaj [Sun, 18 Jan 2026 14:24:46 +0000 (15:24 +0100)] 
serial: 8250: 6.18: add UPIO_AU case to set_io_from_upio()

This patch fixes the "Unsupported UART type 4" error by adding support
for the UPIO_AU I/O type in set_io_from_upio() (used by Au1x00 and
RT288x). It assigns the correct serial input/output functions
(io_serial_in, io_serial_out) for proper operation when UPIO_AU is
configured.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: 6.18: backport eip93 driver fixes
Aleksander Jan Bajkowski [Fri, 5 Dec 2025 21:11:05 +0000 (22:11 +0100)] 
kernel: 6.18: backport eip93 driver fixes

Backport minor fixes for the eip93 driver from upstream.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agocrypto: eip93: use in-tree driver for kernel 6.18
Mieczyslaw Nalewaj [Thu, 15 Jan 2026 08:08:05 +0000 (09:08 +0100)] 
crypto: eip93: use in-tree driver for kernel 6.18

This patch set introduces support for using the in-tree (mainline)
EIP93 crypto driver for kernel 6.18 and later, along with additional
improvements and fixes:
 - Conditional Kconfig/Makefile handling for crypto-hw-eip93 to enable use of the mainline driver with kernel 6.18+.
 - Patch 926: Use software AES fallback for small requests in the EIP93 driver.
 - Patch 927: Add `mediatek,mtk-eip93` compatible string for upstream kernel device trees.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agopackages: sctp: 6.18: add missing symbol
Mieczyslaw Nalewaj [Sat, 13 Dec 2025 12:31:33 +0000 (13:31 +0100)] 
packages: sctp: 6.18: add missing symbol

Add missing CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA256 for kernel 6.18

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: kmod-fs-nfs-v4: add option for kernel-6.18
John Audia [Sun, 7 Dec 2025 21:53:23 +0000 (16:53 -0500)] 
kernel: kmod-fs-nfs-v4: add option for kernel-6.18

Add a config option for the 6.18 series of kernels

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agopackage: gpio-button-hotplug: adapt to kernel 6.18
Mieczyslaw Nalewaj [Sun, 14 Dec 2025 00:53:22 +0000 (01:53 +0100)] 
package: gpio-button-hotplug: adapt to kernel 6.18

 Change GPIOF_ACTIVE_LOW to gpiod_toggle_active_low

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: net: phy: adapt to kernel 6.18
Mieczyslaw Nalewaj [Sat, 13 Dec 2025 21:05:48 +0000 (22:05 +0100)] 
generic: net: phy: adapt to kernel 6.18

 - change phy_driver_register and phy_driver_unregister function calls
   to phy_drivers_register and phy_drivers_unregister for compatibility
   with kernel 6.18
 - replace PHY_ANY_ID with "MATCH ANY PHY"

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: update kernel symbols
Mieczyslaw Nalewaj [Sat, 13 Dec 2025 16:03:47 +0000 (17:03 +0100)] 
generic: 6.18: update kernel symbols

Remove symbols no longer present in version 6.18,
add new 6.18 kernel symbols.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: refresh hack patches
Mieczyslaw Nalewaj [Wed, 3 Dec 2025 16:07:08 +0000 (17:07 +0100)] 
generic: 6.18: refresh hack patches

Refreshed patches for generic/hack-6.18 by running
make target/linux/refresh

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: manually rebuild hack patches
Mieczyslaw Nalewaj [Thu, 25 Dec 2025 15:47:26 +0000 (16:47 +0100)] 
generic: 6.18: manually rebuild hack patches

Manually rebuild hack patches:
 - 200-tools_portability.patch
 - 204-module_strip.patch
 - 230-openwrt_lzma_options.patch
 - 251-kconfig.patch
 - 259-regmap_dynamic.patch
 - 301-01-mm-permit-to-declare-custom-execmem-alloc-free-funct.patch
 - 301-02-mips-replace-mlong-calls-with-mno-long-calls-if-poss.patch
 - 430-mtk-bmt-support.patch
 - 721-net-add-packet-mangeling.patch
 - 722-net-phy-aquantia-enable-AQR112-and-AQR412.patch
 - 725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch
 - 750-net-pcs-mtk-lynxi-workaround-2500BaseX-no-an.patch
 - 800-GPIO-add-named-gpio-exports.patch
 - 902-debloat_proc.patch
 - 904-debloat_dma_buf.patch

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: refresh pending patches
Mieczyslaw Nalewaj [Tue, 2 Dec 2025 21:18:18 +0000 (22:18 +0100)] 
generic: 6.18: refresh pending patches

Refreshed patches for generic/pending-6.18 by running
make target/linux/refresh

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: manually rebuild pending patches
Mieczyslaw Nalewaj [Sat, 27 Dec 2025 13:27:14 +0000 (14:27 +0100)] 
generic: 6.18: manually rebuild pending patches

Manually rebuild pending patches:
 - 203-kallsyms_uncompressed.patch
 - 417-mtd-spi-nand-macronix-disable-continuous-read-for-MX.patch
 - 487-mtd-spinand-Add-support-for-Etron-EM73D044VCx.patch
 - 530-jffs2_make_lzma_available.patch
 - 681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch
 - 701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
 - 710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
 - 732-03-net-ethernet-mtk_eth_soc-optimize-dma-ring-address-i.patch
 - 737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
 - 739-03-net-pcs-pcs-mtk-lynxi-add-platform-driver-for-MT7988.patch
 - 739-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch
 - 802-OPP-Provide-old-opp-to-config_clks-on-_set_opp.patch
 - 812-PCI-sysfs-enforce-single-creation-of-sysfs-entry-for.patch
 - 850-0023-PCI-aardvark-Make-main-irq_chip-structure-a-static-d.patch

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: remove obsolete pending patches
Mieczyslaw Nalewaj [Fri, 27 Mar 2026 16:48:10 +0000 (17:48 +0100)] 
generic: 6.18: remove obsolete pending patches

Remove obsolete pending patches already included in kernel 6.18.
 - 620-net-sfp-improve-Huawei-MA5671a-fixup.patch[1]
 - 704-net-phy-register-phy-led_triggers-during-probe-to-av.patch[2]

[1] https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=ecb4ed7a723f02c81a0111a13ceeabb26f50f899
[2] https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=2764dcb3c35de4410f642afc62cf979727470575

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: refresh backport patches
Mieczyslaw Nalewaj [Tue, 2 Dec 2025 21:18:09 +0000 (22:18 +0100)] 
generic: 6.18: refresh backport patches

Refreshed patches for generic/backport-6.18 by running
make target/linux/refresh

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: manually rebuild backport patches
Mieczyslaw Nalewaj [Wed, 7 Jan 2026 13:27:14 +0000 (14:27 +0100)] 
generic: 6.18: manually rebuild backport patches

Manually rebuild backport patches:
 - 700-01-v7.0-net-sched-Export-mq-functions-for-reuse.patch
 - 700-02-v7.0-net-sched-sch_cake-Factor-out-config-variables-into-.patch
 - 750-v7.0-net-phy-move-mmd_phy_read-and-mmd_phy_write-to-phyli.patch
 - 761-v6.19-net-phy-mxl-gpy-add-support-for-mxl86252-and-mxl86282.patch

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agogeneric: 6.18: remove obsolete backport patches
Mieczyslaw Nalewaj [Fri, 27 Mar 2026 16:48:03 +0000 (17:48 +0100)] 
generic: 6.18: remove obsolete backport patches

Remove obsolete backport patches already included in kernel 6.18.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel/generic: restore files for v6.12
Mieczyslaw Nalewaj [Fri, 27 Mar 2026 16:47:48 +0000 (17:47 +0100)] 
kernel/generic: restore files for v6.12

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel/generic: create files for v6.18 (from v6.12)
Mieczyslaw Nalewaj [Fri, 27 Mar 2026 16:47:40 +0000 (17:47 +0100)] 
kernel/generic: create files for v6.18 (from v6.12)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: add define for kernel 6.18
Mieczyslaw Nalewaj [Sun, 30 Nov 2025 22:40:24 +0000 (23:40 +0100)] 
kernel: add define for kernel 6.18

Add define for kernel 6.18.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agokernel: qca8k: fix host FDB on multi-CPU 21317/head
Kevin Staley [Mon, 29 Dec 2025 13:53:20 +0000 (07:53 -0600)] 
kernel: qca8k: fix host FDB on multi-CPU

On qca8k multi-CPU-port setups (e.g. qca8337 with ports 0+6 as CPU),
bridging switch user ports that use different conduits can make the host
reachable only from the ports tied to the last-programmed CPU port.

Add a pending kernel patch which makes qca8k merge CPU/DSA-port FDB
programming, so host FDB entries end up on all relevant CPU ports.

Fixes: openwrt/openwrt#17891
Signed-off-by: Kevin Staley <glaciertablet@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21317
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agowolfssl: update to 5.9.0 22595/head
Ignat Loskutov [Tue, 24 Mar 2026 21:50:04 +0000 (22:50 +0100)] 
wolfssl: update to 5.9.0

Release Notes:
https://www.wolfssl.com/wolfssl-5-9-0-released/

Fixes CVEs:
- CVE-2026-3548
- CVE-2026-3549
- CVE-2026-3547
- CVE-2026-2646
- CVE-2026-3849
- CVE-2026-0819
- CVE-2026-1005
- CVE-2026-2645
- CVE-2026-3230
- CVE-2026-3229
- CVE-2026-3579
- CVE-2026-3580
- CVE-2026-3503
- CVE-2026-4159
- CVE-2026-4395

Signed-off-by: Ignat Loskutov <ignat.loskutov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22595
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 months agorealtek: mdio: provide individual bus probing function 22604/head
Markus Stockhausen [Wed, 25 Mar 2026 15:04:59 +0000 (16:04 +0100)] 
realtek: mdio: provide individual bus probing function

rtmdio_probe() is a do-it-all setup function. It creates one
control structure and one bus. In the future multiple busses
will be created. As a preparation carve out the bus specific
part into an individual probing function.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: mdio: pull bus/ctrl dependency apart
Markus Stockhausen [Wed, 25 Mar 2026 13:48:43 +0000 (14:48 +0100)] 
realtek: mdio: pull bus/ctrl dependency apart

Until now the central control structure is allocated via a call to
devm_mdiobus_alloc_size(). This will not be possible any longer when
multiple busses will be implemented in a future commit.

Relax that as follows:

- Define a new private "channel" structure for a mdio bus
- Allocate the central control structure with a dedicated alloc()
- Allocate only the channel structure during bus setup
- Link the channel to the central structure via chan->ctrl

Reorganize the probing function so that it becomes clearer that
the control structure is setup first and afterwards the bus is
registered.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: mdio: add helper to derive ctrl from bus
Markus Stockhausen [Wed, 25 Mar 2026 13:09:49 +0000 (14:09 +0100)] 
realtek: mdio: add helper to derive ctrl from bus

Add a new helper macro rtmdio_ctrl_from_bus that encapuslates
the current ctrl=bus->priv lookup. This is a preparation for
the future multi-channel driver architecture. With an upcoming
commit the structures will be changed as follows:

- ctrl: contains the generic data structurs
- chan: contains the channel specific structure

This will involve changing the pointers between them

old lookup chain: ctrl = bus->ctrl
new lookup chain: ctrl = bus->chan->ctrl

The helper macro allows to easily switch the lookup in one
central location. While we are here fix a whitespace issue.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: mdio: setup topology from control structure
Markus Stockhausen [Wed, 25 Mar 2026 11:22:13 +0000 (12:22 +0100)] 
realtek: mdio: setup topology from control structure

The topology setup is bus independent and can be derived completely
from the control structure. Adapt the call parameters accordingly.

The call location is quite confusing at the moment. Being no longer
dependent from the bus call it where it makes most sense. This is
directly after the mapping setup in rtmdio_map_ports(). Doing other
bus dependent setup between these two functions is not needed
any longer.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: mdio: create new bus structure
Markus Stockhausen [Wed, 25 Mar 2026 10:35:13 +0000 (11:35 +0100)] 
realtek: mdio: create new bus structure

The port specific attributes of the central control structure
have been moved over to a separate port structure. Do the same
for the (up to 4) busses. Establish a separate bus structure
that will hold data about each bus and use it in the control
structure. As a first usage type move the is_c45 attribute over.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: mdio: move phy_node attribute into port structure
Markus Stockhausen [Wed, 25 Mar 2026 10:31:18 +0000 (11:31 +0100)] 
realtek: mdio: move phy_node attribute into port structure

The phy_node attribute is defined per port. Move it into the new
port structure. Now it is clear that it belongs to the port.

While we are here rename it to dn (aka device_node) to align with
upstream style. As all usage locations must be adapted it makes
no sense to make two commits (relocate/rename) to change the
code twice.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: mdio: move smi_addr attribute into port structure
Markus Stockhausen [Wed, 25 Mar 2026 10:26:57 +0000 (11:26 +0100)] 
realtek: mdio: move smi_addr attribute into port structure

The smi_addr attribute is defined per port. Move it into the new
port structure. As the devices have a maximum of 56 addresses
save some space and convert it to type u8.

While we are here harden the mapping routine that reads these
addresses from the DTS. For this check the value that is read into
smi_addr. This is usually the MDIO standard 0..31. Sadly RTL839x
devices are an exception from that and allow addresses 0..51.
To avoid device specific if/then/else cases for now implement
a "light" consistency check.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: mdio: move smi_bus attribute into port structure
Markus Stockhausen [Wed, 25 Mar 2026 10:06:36 +0000 (11:06 +0100)] 
realtek: mdio: move smi_bus attribute into port structure

The smi_bus attribute is defined per port. Move it into the new
port structure. As the devices have a maximum of 4 busses save
some space and convert it to type u8.

While we are here fix a whitespace issue and rename the helper
variable in rtmdio_map_ports() to smi_bus to align with the
structure attribute.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: mdio: move raw attribute into port structure
Markus Stockhausen [Wed, 25 Mar 2026 10:01:47 +0000 (11:01 +0100)] 
realtek: mdio: move raw attribute into port structure

The raw attribute is defined per port. Move it into the new
port structure.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: mdio: create new port structure
Markus Stockhausen [Wed, 25 Mar 2026 09:54:11 +0000 (10:54 +0100)] 
realtek: mdio: create new port structure

The central control structure of the mdio bus holds several
attributes. These target two different objects. Some of them
are for the (up to 56) controller ports, some of them are for
the (up to 4) controller busses.

Establish a separate port structure that will hold data about
each port and use it in the control structure. As a first
usage type move the page attribute over.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22604
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agonetifd: use procd_add_reload_data_trigger
Felix Fietkau [Fri, 27 Mar 2026 19:02:26 +0000 (19:02 +0000)] 
netifd: use procd_add_reload_data_trigger

Reload config if any network or wifi interfaces/devices were changed
via procd data.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agoprocd: add support for multiple arguments to procd_add_reload_data_trigger
Felix Fietkau [Fri, 27 Mar 2026 19:02:00 +0000 (19:02 +0000)] 
procd: add support for multiple arguments to procd_add_reload_data_trigger

This allows triggering on multiple types of procd data changes for
config reload.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agowifi-scripts: add support for passing uuid to hostapd
Felix Fietkau [Tue, 24 Mar 2026 16:56:42 +0000 (16:56 +0000)] 
wifi-scripts: add support for passing uuid to hostapd

This is needed to maintain a shared WPS device UUID across radios.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 months agokernel: add DSA driver for MaxLinear MxL862xx switches 22612/head
Daniel Golle [Thu, 26 Mar 2026 04:00:28 +0000 (04:00 +0000)] 
kernel: add DSA driver for MaxLinear MxL862xx switches

Backport upstream driver and apply pending downstream patches to
support using the MaxLinear MxL86252 and MxL86282 switches.

The driver supports a native proprietary 8-byte DSA special tag format
(mxl862xx) as well as using an 802.1Q-based DSA tag (mxl862xx-8021q).

All basic bridge, VLAN and LAG operations are supported. A single port
can be used as mirror port. Hardware counters are made available as
ethtool stats or directly serve as interface counters (bytes,
packets).

The switch runs a complex ZephyrOS-based firmware on an integrated
ARC microcontroller, the driver uses the firmware management API over
MDIO to interact with the switch hardware.

Note that the firmware needs to be rather recent (WSP 1.0.78 or later)
to work well with this driver. It can be updated at runtime using devlink.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 months agoqualcommax: ipq807x: add CMN PLL clock controller support
John Crispin [Thu, 5 Mar 2026 11:57:29 +0000 (12:57 +0100)] 
qualcommax: ipq807x: add CMN PLL clock controller support

Add IPQ8074 support to the upstream CMN PLL driver. The CMN PLL block
is identical to IPQ6018 with the same output clocks (bias_pll_cc_clk
at 300 MHz and bias_pll_nss_noc_clk at 416.5 MHz).

Signed-off-by: John Crispin <john@phrozen.org>
2 months agoqualcommax: ipq60xx: add CMN PLL clock controller support
John Crispin [Thu, 5 Mar 2026 11:57:22 +0000 (12:57 +0100)] 
qualcommax: ipq60xx: add CMN PLL clock controller support

Add IPQ6018 support to the upstream CMN PLL driver. The CMN PLL at
0x9b000 generates the 12 GHz base clock feeding the networking
subsystem. Its output clocks (bias_pll_cc_clk at 300 MHz and
bias_pll_nss_noc_clk at 416.5 MHz) replace the previous fixed-clock
stubs and are found by GCC via global clock name lookup.

Signed-off-by: John Crispin <john@phrozen.org>
2 months agoqualcommax: ipq60xx: mark gcc_xo_clk_src as CLK_IS_CRITICAL
John Crispin [Thu, 5 Mar 2026 13:24:30 +0000 (14:24 +0100)] 
qualcommax: ipq60xx: mark gcc_xo_clk_src as CLK_IS_CRITICAL

The XO clock source is always-on in hardware and cannot be gated.
Without CLK_IS_CRITICAL, the CMN PLL runtime PM suspend cascades a
disable up to gcc_xo_clk_src, causing a branch status timeout warning.
The IPQ8074 GCC driver already marks this clock as critical.

Signed-off-by: John Crispin <john@phrozen.org>
2 months agomediatek: add cudy wr3000h-v1 ubootmod 21943/head
Dmitry Mostovoy [Mon, 9 Feb 2026 16:43:41 +0000 (11:43 -0500)] 
mediatek: add cudy wr3000h-v1 ubootmod

This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdata" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1

3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
  ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
  ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
  ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21943
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomediatek: add cudy wr3000e-v1 ubootmod
Dmitry Mostovoy [Mon, 9 Feb 2026 09:52:38 +0000 (04:52 -0500)] 
mediatek: add cudy wr3000e-v1 ubootmod

This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdata" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1

3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
  ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
  ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
  ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21943
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomediatek: add cudy wr3000s-v1 ubootmod
Dmitry Mostovoy [Mon, 9 Feb 2026 09:52:03 +0000 (04:52 -0500)] 
mediatek: add cudy wr3000s-v1 ubootmod

This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdata" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1

3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_wr3000s-v1-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_wr3000s-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_wr3000s-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
  ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
  ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
  ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21943
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomediatek: add cudy wr3000p-v1 ubootmod
Dmitry Mostovoy [Mon, 9 Feb 2026 09:51:31 +0000 (04:51 -0500)] 
mediatek: add cudy wr3000p-v1 ubootmod

This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdata" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1

3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_wr3000p-v1-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_wr3000p-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_wr3000p-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
  ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
  ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
  ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21943
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoarm-trusted-firmware-mediatek: add Cudy DDR4 target
Dmitry Mostovoy [Mon, 9 Feb 2026 09:51:15 +0000 (04:51 -0500)] 
arm-trusted-firmware-mediatek: add Cudy DDR4 target

Since there are some similar devices from Cudy (only WR3000P now)
this will allow to create OpenWrt U-Boot layout for all of them
using same DDR4 target.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21943
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: eth: convert probe/remove to new prefix 22610/head
Markus Stockhausen [Wed, 25 Mar 2026 20:28:33 +0000 (21:28 +0100)] 
realtek: eth: convert probe/remove to new prefix

Use the common driver prefix for these two functions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22610
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorealtek: eth: remove false security in rteth_remove()
Markus Stockhausen [Wed, 25 Mar 2026 20:23:35 +0000 (21:23 +0100)] 
realtek: eth: remove false security in rteth_remove()

Check for dev in driver remove gives no additional security. The
remove() function is only called if probe() succeeded. Probing
will always call platform_set_drvdata() in the good case. So
remove() will always find dev data via platform_get_drvdata().

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22610
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorealtek: eth: drop redundant DTS check
Markus Stockhausen [Wed, 25 Mar 2026 20:18:24 +0000 (21:18 +0100)] 
realtek: eth: drop redundant DTS check

The ethernet driver is only loaded via devicetree and makes use
of of_match_table. In this case the probing function is only
called if a matching compatible is set. So pdev->dev.of_node
can never be NULL.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22610
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorealtek: eth: rename driver and matchtable
Markus Stockhausen [Wed, 25 Mar 2026 20:13:44 +0000 (21:13 +0100)] 
realtek: eth: rename driver and matchtable

Align the driver and matchtable naming convention to the new
rteth prefix. While we are here autogenerate the module name
by using KBUILD_MODNAME. This is common upstream practice.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22610
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorealtek: dts: drop trailing semicolons after macro use 22614/head
Jonas Jelonek [Thu, 26 Mar 2026 13:34:38 +0000 (13:34 +0000)] 
realtek: dts: drop trailing semicolons after macro use

Commit d52f7a4ca5 ("realtek: dts: new SWITCH_PORT_LED() macro") introduced
a new macro to simplify switch port definitions and introduces usage of
it for Zyxel XGS1X10-12 devices. However, this change added a DTS syntax
issue because:

> SWITCH_PORT_LED(...);

produces

> port@XX { ... };;

because the macro already includes a trailing semicolon. The DT compiler
doesn't like this so it fails with syntax error. Fix this by dropping the
trailing semicolons after macro usages.

Fixes: d52f7a4ca5 ("realtek: dts: new SWITCH_PORT_LED() macro")
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22614
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agomvebu: WT61P803: use flex array 22484/head
Rosen Penev [Sun, 15 Mar 2026 00:02:28 +0000 (17:02 -0700)] 
mvebu: WT61P803: use flex array

Simplifies allocation and allows extra runtime analysis.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22484
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: filogic: kn-1812: enable xsphy node 22575/head
Maxim Anisimov [Mon, 23 Mar 2026 07:40:55 +0000 (10:40 +0300)] 
mediatek: filogic: kn-1812: enable xsphy node

The XS-PHY controller supports physical layer functionality
for USB3.1 GEN2 controller on MediaTek SoCs.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: filogic: kn-1812: drop phy-connection-type prop
Maxim Anisimov [Mon, 23 Mar 2026 07:38:15 +0000 (10:38 +0300)] 
mediatek: filogic: kn-1812: drop phy-connection-type prop

The 'phy-connection-type' property is unnecessary and can be removed.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: filogic: kn-1812: fix partition node name
Maxim Anisimov [Mon, 23 Mar 2026 07:26:07 +0000 (10:26 +0300)] 
mediatek: filogic: kn-1812: fix partition node name

partition@400000 label referenced address 0x600000, fix node name
to match.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: filogic: kn-1812: set mdio drive strength to 10mA
Maxim Anisimov [Mon, 23 Mar 2026 06:44:43 +0000 (09:44 +0300)] 
mediatek: filogic: kn-1812: set mdio drive strength to 10mA

According to the original DTS from the Keenetic SDK, this value should be set to 10 mA.

See:
https://github.com/keenetic/keenetic-sdk/blob/4.03/target/linux/mt7988/dts/KN-1812.dts#L228C22-L228C36

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: filogic: kn-1812: change dts node name to mt7992
Maxim Anisimov [Mon, 23 Mar 2026 06:41:22 +0000 (09:41 +0300)] 
mediatek: filogic: kn-1812: change dts node name to mt7992

This is a cosmetic change. The device uses the MT7992AV chip.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: filogic: kn-1812: add interrupt support for phy
Maxim Anisimov [Mon, 23 Mar 2026 06:28:30 +0000 (09:28 +0300)] 
mediatek: filogic: kn-1812: add interrupt support for phy

In the latest vendor firmware, changes have been identified in the DTS.
Support for interrupts for the Realtek RTL8261BE has been added.

Decompiled DTS fragment:

phy-gmac3 {
        compatible = "ethernet-phy-ieee802.3-c45";
        interrupt-parent = <0x1a>;
        interrupts = <0x02 0x08>;
        #address-cells = <0x01>;
        #size-cells = <0x00>;
        reg = <0x1b>;
        phy-mode = "usxgmii";
        linux,phandle = <0x30>;
        phandle = <0x30>;
};

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: filogic: kn-1812: fix phy reset deassert
Maxim Anisimov [Mon, 23 Mar 2026 06:19:30 +0000 (09:19 +0300)] 
mediatek: filogic: kn-1812: fix phy reset deassert

The RTL8261BE 10GbE PHY's `reset-deassert-us` was set to 100ms (100000us),
but the **RTL8261N datasheet (Table 108, parameter t7)** specifies a
minimum **SMI-ready time of 150ms** after nRESET release before the MDIO
(SMI) bus can be used.

Note: Essentially, the RTL8261N and RTL8261BE are architecturally identical
chips, so their initialization parameters should be consistent.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomediatek: filogic: kap-630/kn-(3811/3911): fix node name 22576/head
Maxim Anisimov [Mon, 23 Mar 2026 12:19:55 +0000 (15:19 +0300)] 
mediatek: filogic: kap-630/kn-(3811/3911): fix node name

partition@400000 label referenced address 0x600000, fix node name
to match.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22576
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorealtek: pcs: rtl930x: improve error propagation 22582/head
Jonas Jelonek [Wed, 25 Mar 2026 12:51:09 +0000 (13:51 +0100)] 
realtek: pcs: rtl930x: improve error propagation

Previous changes refactored the hardware mode configuration for RTL930x
a lot. Now that this is in a better shape, one issue persists: missing
error propagation. Only parts of this function really propagate an
error, others are silently dropped. While this is a known driver-wide
issue, at least make it good here. Propagate the errors from functions
which apply configuration sequences to the caller.

Single writes are still left out on purpose, they need and will be
addressed later.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: decommission temporary helper
Jonas Jelonek [Mon, 23 Mar 2026 20:48:50 +0000 (21:48 +0100)] 
realtek: pcs: rtl930x: decommission temporary helper

Decommission a helper for applying config/patch sequences for even/odd
SerDes. Most of these sequences were squashed due to marginal
difference, sharing a lot of common parts. For the marginal differences,
testing showed that the different values were already present on
even/odd. Since those are no reset/trigger bits but just configuration
values, writing them for both should do no harm.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: squash config sequences even more
Jonas Jelonek [Mon, 23 Mar 2026 20:44:10 +0000 (21:44 +0100)] 
realtek: pcs: rtl930x: squash config sequences even more

Config/patch sequences have been reduced and merged by previous changes.
Now that we have a clearer view on them, we can see that there are still
several similarities between the even and odd variants. Some different
writes for even and odd SerDes remain but one can find out they don't
need to be separate. For example, a write to [0x29, 0x09] is missing for
odd SerDes but testing and a SerDes dump from a running configuration
show that the registers still hold the same value and changes do not
affect functionality. Thus, merge them too to get rid of a lot of
even/odd stuff.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: combine USXGMII/XSGMII config
Jonas Jelonek [Wed, 18 Mar 2026 15:03:07 +0000 (15:03 +0000)] 
realtek: pcs: rtl930x: combine USXGMII/XSGMII config

Right now, the config sequences for XSGMII and USXGMII have been
stripped down to their essential parts. Still, they have redundancies.
The XSGMII sequences are 99% equal to the generic ANA_10G sequences
(except for a single write which is DFE/LEQ-related and changed during
calibration later anyway), thus we can drop them completely.

The USXGMII sequences contain the same sequences so they can be removed
there too, all being covered by applying the ANA_10G sequence for those
modes too. One different write (register [0x2e, 0x01]) is integrated into
the ANA_10G sequence since testing has shown that the value is either the
default for that register anyway, or set during SDK setup too for 10GR.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: move writes to config
Jonas Jelonek [Wed, 18 Mar 2026 22:58:56 +0000 (23:58 +0100)] 
realtek: pcs: rtl930x: move writes to config

Move a few register writes from the ANA_10G patch sequences to the
configuration function. Those write are targeted at digital pages and do
not fully apply for *SGMII modes. To make the ANA_10G sequence really
just deal with analog pages and make it usable for *SGMII modes too,
move out the digital page writes.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: break up fiber config sequences
Jonas Jelonek [Tue, 17 Mar 2026 22:23:08 +0000 (22:23 +0000)] 
realtek: pcs: rtl930x: break up fiber config sequences

The patch/config sequences we took over from the SDK are partially
redundant, i.e. they share common parts which can be separated per
speed. For example, the config for 10GR contains the one for 2500Base-X
but we have a dedicated one for 2500Base-X. This is a first step to
modularize and reverse-engineer those sequences, and decrease the size
they claim.

The sequences are nearly exclusive ordered by ascending pages. This
suggests that those register/writes do not have a hidden function of
performing inline resets but rather are just configuration values.
Likely, they may be applied in rather arbitrary order. Splitting up the
sequences here assumes this is true and does some minor order changes.
Testing shows no behavioral change. Looking at [1] there are no relevant
reset or trigger bits affected by that. Suspiciously ordered writes have
mostly been kept though.

USXGMII setup needs to be adjusted too due to shared sequence parts.

[1] https://github.com/plappermaul/realtek-doc/blob/82af3a36b7f65dbe2158fef3a9b71e7aab94315e/sources/rtk-dms1250/include/hal/phy/rtl8295_reg_def.h

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: move EEE to USXGMII configuration
Jonas Jelonek [Wed, 18 Mar 2026 21:02:55 +0000 (22:02 +0100)] 
realtek: pcs: rtl930x: move EEE to USXGMII configuration

The patch/config sequences for USXGMII modes contain a register write
which is explicitly labelled as "enable eee". To clean the sequences and
reduce duplication, move this specific write to the USXGMII
configuration function.

While at it, demystify this register write. From [1] we can see that
only a single bit needs to be set for controlling EEE instead of the
whole register. From testing it was seen that the register has a default
value of 0x445C after reset. Thus, there is no other operation hidden in
this write and we're safe to reduce it to setting just the EEE enable
bit.

[1] https://github.com/plappermaul/realtek-doc/blob/82af3a36b7f65dbe2158fef3a9b71e7aab94315e/sources/rtk-dms1250/include/hal/phy/rtl8295_reg_def.h

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: improve USXGMII configuration
Jonas Jelonek [Wed, 18 Mar 2026 20:40:46 +0000 (21:40 +0100)] 
realtek: pcs: rtl930x: improve USXGMII configuration

USXGMII configuration is currently only performed via the patching
sequences although there's a dedicated function which configures several
parameters and assigns meaningful names to some register fields. It was
introduced in dca20f91ea12 ("realtek: add serdes patch for 10G_QXGMII")
but somewhat abandoned later due to a partial revert.

To improve the situation, prioritize usage of the function for USXGMII
variants and remove some parts from the patch sequences which seem to be
exclusive for USXGMII and thus can be covered by this function. Writes
to registers [0x6, 0xE], [0x6, 0x13] and [0x6, 0x14] can be dropped
completely because they are redundant. The bits really affected by
these writes (compared to the default register values aquired from a
dump) are overwritten below again. Testing on real hardware and USXGMII
supports this.

While at it, improve the style a bit and add comments explaining some of
the fields a bit more. Additionally, fix the call situation which
currently is dead code due to early exit. Provide two calls to the
mentioned functions but comment one of them to remain current
functionality. Names and meaning of fields is inferred from [1].

[1] https://github.com/plappermaul/realtek-doc/blob/82af3a36b7f65dbe2158fef3a9b71e7aab94315e/sources/rtk-dms1250/include/hal/phy/rtl8295_reg_def.h

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: carve out common writes
Jonas Jelonek [Wed, 18 Mar 2026 20:20:31 +0000 (21:20 +0100)] 
realtek: pcs: rtl930x: carve out common writes

Start deconstructing the patch/config sequences by carving out two
specific writes which are common for non-USXGMII and are special because
they are not in analog SerDes pages.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: handle QSGMII config early
Jonas Jelonek [Sat, 21 Mar 2026 23:52:09 +0000 (00:52 +0100)] 
realtek: pcs: rtl930x: handle QSGMII config early

Handle QSGMII config earlier within the configuration function as a
preparation for subsequent patches in this area. Those will target
splitting up the config sequences and 5G-QSGMII is special there.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: rename patching function
Jonas Jelonek [Tue, 17 Mar 2026 21:29:15 +0000 (21:29 +0000)] 
realtek: pcs: rtl930x: rename patching function

Rename the function that currently "applies patches" so that it covers
everything it does (and will do). It doesn't only apply patches but in
general performs configuration of a SerDes for a particular hardware
mode.

While at it, remove a print above that call because it is both placed
wrong and redundant due to what the generic pcs_config prints.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: pcs: rtl930x: adjust patch application facilities
Jonas Jelonek [Tue, 17 Mar 2026 21:21:59 +0000 (21:21 +0000)] 
realtek: pcs: rtl930x: adjust patch application facilities

Change how patches are applied to reduce redundancy and make the code
more readable. Define a generic function that applies any patch. Within
the RTL930x patch application, define a local macro that helps to get
rid of repeated even/odd checks. While making the code cleaner, it is
also a preparation for further refactoring here.

This adds a local helper macro intended to be only temporary but keeps
the style of the code clean by avoiding a lot of if-else clauses.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: dts: new SWITCH_PORT_LED() macro 22591/head
Markus Stockhausen [Tue, 24 Mar 2026 19:02:03 +0000 (20:02 +0100)] 
realtek: dts: new SWITCH_PORT_LED() macro

Several devices (including the upcoming DGS-1250) need a fully
featured port definition that includes:

- port number
- label
- led-set
- pcs-handle
- phy-handle
- phy-mode

Provide a new macro for that and make the Zyxel XGS-1210 series
the first consumer of it.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22591
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agoipq40xx: fix art partition name WHW03 V1
Anthony Sepa [Wed, 25 Mar 2026 20:13:43 +0000 (21:13 +0100)] 
ipq40xx: fix art partition name WHW03 V1

In the blamed commit, the wrong partition name for ART was used.

It was later discovered that the partition table uses "0:ART" instead of
"art" for the ART partition name thus breaking caldata extraction.

So, fix the partition name.

Fixes: ee5999cf78d8 ("treewide: linksys: use nvmem MAC for hw_mac_addr")
Signed-off-by: Anthony Sepa <protectivedad@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: hwmon: add LM75 alert pin polarity swap patch 22589/head
Markus Stockhausen [Tue, 24 Mar 2026 14:24:21 +0000 (15:24 +0100)] 
realtek: hwmon: add LM75 alert pin polarity swap patch

Allow to configure the LM75 alert pin to active-high instead
of its default active-low. This patch is needed for the D-Link
DGS-1250 series where the alert pin steers the fan speed
between low and high.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22589
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorealtek: dsa: rtl93xx: avoid LAG transmission on down link 22382/head
Sven Eckelmann [Wed, 11 Mar 2026 17:49:44 +0000 (18:49 +0100)] 
realtek: dsa: rtl93xx: avoid LAG transmission on down link

When the link goes down on the other end of a bond, it was noticed that the
switch was still trying to send data over this link.

Problem here is that net_lag_port_dev_txable() uses
bond_is_active_slave_dev() to look the state up. But this is actually
showing if a link is a NOT a backup - not if the link should be really be
TX enabled or not.

As a DSA driver, it is important to consume the DSA information.
dp->lag_tx_enabled must therefore be used for DSA .port_lag_change events.
This variable contains two information from the
struct netdev_lag_lower_state_info:

    tx_enabled = linfo->link_up && linfo->tx_enabled;

Fixes: 89322b4d69a7 ("rtl93xx: dsa: Handle lag_change properly")
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/22382
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agorealtek: phy: backport pair/polarity order support 22608/head
Damien Dejean [Tue, 24 Mar 2026 20:43:06 +0000 (21:43 +0100)] 
realtek: phy: backport pair/polarity order support

Backport four patches merged in netdev-next/main to add pair order [1,2]
and pair polarity [3,4] configuration support for the RTL8224. The
configuration is required when the bootloader doesn't set it up.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=c1887257a81bf62f48178d3b9d31e23520d67b2c
[2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=330296ea9e158758aa65631f5ec64aa74806b7e2
[3] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=58ffb5910f32e5b387d4af31ee21851c40eb31b5
[4] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=beed9c0e9b53c98bc66d28d46fbe38c347e9aa74

Signed-off-by: Damien Dejean <dam.dejean@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22608
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 months agorealtek: stc8: use flexible array member 22506/head
Rosen Penev [Wed, 18 Mar 2026 23:39:49 +0000 (16:39 -0700)] 
realtek: stc8: use flexible array member

Simplifies allocation. Also addeed __counted_by for extra runtime
analysis.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22506
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>