Commit Graph

69027 Commits

Author SHA1 Message Date
Hauke Mehrtens ffc0a6bc38 libubox: update to Git HEAD (2026-05-23)
19e88cc41288 json_script: use size_t for calloc_a() length argument
9afc71053481 udebug-remote: pass size_t to calloc_a()
73a21977c52a treewide: use size_t for length variables to avoid implicit narrowing
1fe93d2fefb2 blob, udebug-remote: silence -Wconversion warnings in trivial cases

Link: https://github.com/openwrt/openwrt/pull/23485
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-23 19:33:16 +02:00
Hauke Mehrtens 9d8f165c20 ubus: update to Git HEAD (2026-05-23)
4b274055ede3 libubus: fix NULL dereference on OOM in ubus_queue_msg
8b5be570f13e libubus-acl: fix dangling pointers on blob_memdup failure in acl_recv_cb
9105ea2a349a ubusd_acl: fix NULL dereference on OOM in ubusd_acl_alloc_obj
07d7f34ac278 ubusd_acl: handle allocation failures in ubusd_acl_init_client
497321a5ea90 ubusd_acl: fix NULL dereference on OOM in ubusd_acl_init
f66d52ba983f ubusd_event: fix OOM handling in ubusd_send_event_msg
11ea1b3bdbea ubusd_main: fix async-signal-unsafe SIGHUP handler
0c095592ccb7 ubusd_proto: fix resource leaks and ID tree corruption in ubusd_proto_new_client
f61695e6e12a ubusd_proto: fix NULL dereference for user/group in ubusd_handle_add_watch
7ecacfadd9bc ubusd_proto: fix NULL dereference on OOM in ubusd_proto_init_retmsg
3ab9d7759545 lua: fix inverted argument check in ubus_lua_add
43051ca73aec lua: fix unchecked calloc and memory leak in ubus_lua_load_object
4ca0b141e9a7 ubusd_id: use getrandom(2) unconditionally on Linux
7e4356da8abe ubusd_monitor: fix NULL dereference on OOM in ubusd_monitor_message
5849870f2251 libubus-req: fix file descriptor leaks in ubus_process_req_msg
f29767f90af1 libubus: fix file descriptor leaks in ubus_process_msg
b099d050b59d libubus: make ubus_shutdown idempotent
a564b8dcb395 ubusd_main: check strdup return value in mkdir_sockdir
239edcbaaac8 ubusd_id: fix continue in do-while skipping random ID retry
09d2df45bf38 ubusd: fix NULL dereference on OOM in ubus_msg_enqueue
bcc45ca981fd libubus: actually set FD_CLOEXEC on the ubus socket
8188f5ce8564 libubus-io: close recv_fd captured before get_next_msg failure
7a068bac5a9b libubus-io: byte-swap peer in HELLO when storing as local_id
747013f6ea05 libubus-io: reset sock.fd to -1 after close on ubus_reconnect error path
020a64b9b169 ubusd_acl: use size_t for strlen result in ubusd_acl_alloc_obj
f92ffd289dcc ubusd: use size_t for string and blob length variables
795b32bb96b6 ubusd: use fixed-width types for sequence counters

Link: https://github.com/openwrt/openwrt/pull/23487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-23 19:32:01 +02:00
Andrew LaMarche 185bbf1168 octeon: drop v6.12 and default to v6.18
Switch the Octeon target to kernel v6.18 and drop v6.12.

Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23144
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 19:13:22 +02:00
Dee HY 9336332964 kernel: add kmod-hwmon-corsair-cpro
This module adds support for the Corsair Commander Pro and Corsair
Commander Pro (1000D) fan and temperature monitoring controllers.

Signed-off-by: Dee HY <dongfengweixiao@hotmail.com>
Link: https://github.com/openwrt/openwrt/pull/23465
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-23 18:45:20 +02:00
Lech Perczak b9cbc0846a ath79: meraki-mr18: fix MAC address offset after NVMEM switch
The following commit: 27a673916c ("ath79: mr18: use nvmem for MACs")
switched MR18 to use NVMEM subsystem for setting MAC addresses, however
it missed the offset in use. Previously 102 (decimal) was used, but in
device tree 0x102 was used, but the correct value is 0x66.

This was found while reviewing code for Z1 port, which shares the MAC
address source.
Replace the offset with the correct one of 0x66.

Fixes: 27a673916c ("ath79: mr18: use nvmem for MACs")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23486
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-23 18:42:22 +02:00
Robert Marko 417df7debf fstools: update to Git HEAD (2026-05-23)
7df188543e26 libfstools: enable f2fs overlay compression formatting
16718b6e3c0f libfstools: mount f2fs overlay with zstd compression

Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-23 18:25:00 +02:00
Jan-Henrik Bruhn 7a5eefe108 kernel: hwmon lm63: make pwm1 frequency and LUT temp hysteresis writeable
This adds a patch that makes the pwm1 frequency and LUT temperature
hysteresis of lm63 fan controllers writeable, to be able to replicate
vendor cooling behaviour for fans that need a lower PWM frequency
than the default.

Signed-off-by: Jan-Henrik Bruhn <git@jhbruhn.de>
Link: https://github.com/openwrt/openwrt/pull/23473
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 17:38:38 +02:00
Jan Hoffmann b20068672b kernel: realtek: replace RTL8226 MDI swap patch by upstream version
A version of this patch has been accepted upstream, so use it here.

Link: https://lore.kernel.org/netdev/177932162564.3801238.2549776951847746974.git-patchwork-notify@kernel.org/
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/23493
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 17:25:59 +02:00
Keno Fischer 9a143bf7ff x86: onie-installer: wire up sysupgrade via ONIE install mode
This adds support for sysupgrade on ONIE-installed systems.
The install is chained through ONIE (using the ONIE installer image),
rather than attempting to manually upgrade the partition.
The idea is to allow future OpenWRT installs flexibility to use
a different partition table. By putting the installer in charge
of setting up the file system partition, the upgrade process needs
to have no knowledge of the internals of the image.

Config preservation is accomplished by appending the sysupgrade .tar.gz
to the ONIE installer image. Of course this also works for a clean
install using a sysupgrade.tar.gz created via `sysupgrade -b`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Keno Fischer <keno@juliahub.com>
Link: https://github.com/openwrt/openwrt/pull/23062
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 17:23:54 +02:00
Keno Fischer c7e8cffcb2 x86: add onie-installer image type
The current documentation for using OpenWRT on Mellanox Spectrum
switches (https://openwrt.org/toh/mellanox/spectrum) suggests
reflashing the entire harddrive from the recovery USB. This is not
the most friendly way to install a new OS on these switches. From
factory, they come with ONIE (Open Network Install Environment),
which is a linux-based preboot environment for fetching an OS
image from the network and installing it on disk. The installer
is a self-executing bash script that executes inside the ONIE
environment. The installer is expected to preserve the ONIE partition
for use as recovery environement. To be a better citizen on
these platforms, it would be preferrable to provide OpenWRT as
an ONIE-compatible installer.

This PR adds an ONIE_INSTALLER_IMAGES build option that produces
an ONIE compatible .bin. The generated .bin follows the ONIE demo
installer pattern [1]: it creates a new GPT partition
labelled OPENWRT-ROOT on the ONIE install device, formats ext4, extracts
the OpenWrt rootfs and kernel into it, installs GRUB into the existing
UEFI ESP under bootloader-id "OpenWrt", and adds a NVRAM boot entry via
efibootmgr.  ONIE-BOOT is preserved so ONIE rescue remains available.

Tested with the config at [2] on a Mellanox Spectrum SN3800 to produce
a booting OpenWRT install.

[1] https://github.com/opencomputeproject/onie/demo/installer/grub-arch/install.sh
[2] https://gist.github.com/Keno/abc8c5b72645e73fadd1ff0d9616b23d

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Keno Fischer <keno@juliahub.com>
Link: https://github.com/openwrt/openwrt/pull/23062
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 17:23:53 +02:00
Jonas Jelonek 15593de376 realtek: pcs: derive SerDes link count from DT at probe time
Previously, sds->num_of_links was incremented from rtpcs_create() as
each DSA port bound its phylink_pcs. The count therefore relied on a
temporal contract (DSA must finish enumerating before pcs_config runs)
and on rtpcs_create() being the single chokepoint for all consumers.

Replace this with a probe-time scan of pcs-handle references in the
live OF tree: for every available consumer node carrying a pcs-handle
property pointing at one of our SerDes subnodes, bump that SerDes'
num_of_links. After the scan, the count is final regardless of when
or whether DSA later calls in.

To allow of_parse_phandle_with_args() to walk the property correctly,
add #pcs-cells = <0> to every serdes@N node in the 838x/839x/930x/931x
.dtsi files. A future cell-bearing form remains possible without
touching the scan.

Over-references (DT pointing more consumers at one SerDes than the
hardware can carry) are clamped at RTPCS_MAX_LINKS_PER_SDS and warned
about, but do not fail probe — the correctly-wired ports on that
SerDes still come up, and only the surplus reference is dropped.

The bounds check and the bare ++ in rtpcs_create() become redundant
under the scan-driven count and are removed.

This decouples num_of_links from DSA call ordering and is a prereq
for migrating to fwnode_pcs providers, where rtpcs_create() goes away
as the centralised counter.

Link: https://github.com/openwrt/openwrt/pull/23484
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 11:02:15 +02:00
Hauke Mehrtens a7bd3b147e uhttpd: update to Git HEAD (2026-05-21)
1b624f8f814e auth: classify $p$ lookups by account state

Link: https://github.com/openwrt/openwrt/pull/23476
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-23 01:52:39 +02:00
Daniel Golle f2aa412733 rtl826x-firmware: depend on kmod-phy-realtek
Follow the established pattern and let the firmware package select
the driver which uses it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-22 20:53:04 +01:00
Felix Fietkau 74da669505 umdns: update to Git HEAD (2026-05-22)
bd7599d02157 fix calloc_a size argument type

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:56:09 +02:00
Felix Fietkau 4136443864 unetd: update to Git HEAD (2026-05-22)
090abf9a5521 host: fix type mismatch on calloc_a calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:54:34 +02:00
Felix Fietkau e7530a287a build: fix apk_package_files wildcard for packages without ABI version
The wildcard combined an apk_package_files pattern of $(pkg)-*.apk with a
gen_package_wildcard that ends in [^a-z]*, so the full glob required two
dashes. Files for packages without an ABI version (e.g. ubbf-0~....apk)
only contain one dash and never matched, so ipkg-remove was never called
on them and stale .apk files accumulated in the bin directory.

Drop the explicit dash from apk_package_files. The [^a-z] in
gen_package_wildcard already serves as the dash matcher, and
scripts/ipkg-remove filters precisely by reading apk metadata.

Fixes: 642d568b0f ("build: fix ipkg-remove: add support for removing apk files")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:54:34 +02:00
John Crispin 0c2fb39c5a wifi-scripts: iwinfo scan() must not abort the interpreter on failure
Replace exit(1) on every failure path with return null so callers that
iterate over multiple radios can collect results from the radios that
did succeed instead of aborting on the first one that refuses an
off-channel scan.

Route diagnostics to stderr via warn() so stdout stays clean for
callers parsing JSON output, and include the device name in each
message to disambiguate per-radio failures.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:54:34 +02:00
John Crispin cb7414055c wifi-scripts: iwinfo: guard assoclist against unknown device
Signed-off-by: John Crispin <john@phrozen.org>
2026-05-22 14:54:34 +02:00
Robert Marko 920a382cb6 fstools: update to Git HEAD (2026-03-17)
1bf2d490484e libfstools: make get_var_from_file() reusable
0b6022439cad mount_root: add kernel parameter to specify the overlay storage name
e600d842ce81 mount_root: add kernel parameter to specify the overlay fileystem type

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-05-22 13:10:42 +02:00
Christian Marangi 5b25d4235d airoha: backport GDM2 loopback fixup for Ethernet driver
Backport GDM2 loopback fixup for Ethernet driver. This should be the last
patch before introduction of Multi-Serdes support series.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-05-22 12:43:00 +02:00
Shiji Yang de769c6d66 uboot-mediatek: fix malformed patch
The chunk length is not correct.

Fixes: d2fabb974c ("mediatek: add support for Wavlink WL-WNT100X3 ubootmod")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
2026-05-22 01:47:47 +01:00
Daniel Golle 539f09ade0 rtl8261n-firmware: set PKGARCH:=all
The generated firmware patches for RealTek's PHYs are host architecture
agnostic. Express this with PKGARCH:=all.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-21 23:45:07 +01:00
Eric Fahlgren f1e4aaf7b4 imagebuilder: suppress rootfs image when filesystem specified
When using imagebuilder to create images, ROOTFS_FILESYSTEM may be
defined to create just the desired images, but the '*-rootfs.tar.gz'
and '*-rootfs.cpio.gz' images are being created unconditionally
for many targets.

By making generation of these images conditional on the state of
ROOTFS_FILESYSTEM, we can save significant space (measured 3-7 MB
depending on length of package list) and time.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
2026-05-21 18:29:28 +02:00
Daniel Golle 8c264cf222 generic: 6.18: drop downstream RTL8261N driver
Now that the upstream RealTek PHY driver is patched to support also
the new 5G and 10G PHYs we can start to phase-out the messy downstream
driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-21 17:04:55 +01:00
Balázs Triszka 6369c9e5c7 generic: net: phy: realtek: add 5G and 10G PHY support
The functionality/support for 5G and 10G PHYs was extracted from the
realtek-phy driver and ported to the upstream Linux realtek PHY driver.
These PHY chips need a sequence of register writes (and similar operations)
for initialization. These sequences are provided as firmware files which
are interpreted/applied by a new register patch engine.

By switching to the upstream driver, it should be possible to get rid of a
large chunk of (from OpenWrt perspective) unmaintained code from Realtek.
The actual Linux phy-core infrastructure from Linux can be mostly used and
only the Realtek specific quirks need to be handled.

The files which need to be provided are depending on the PHY:

* rtl8261n.bin (package "rtl8261n-firmware" or "rtl8261n-lp-firmware")
  - RTL8251L 5Gbps PHY
  - RTL8261BE 10Gbps PHY
  - RTL8261N 10Gbps PHY
* rtl8264b.bin (package "rtl8264b-firmware")
  - RTL8254B 5Gbps PHY
  - RTL8264 10Gbps PHY
  - RTL8264B 10Gbps PHY

Files which are affected by this change (DEVICE_PACKAGES dependencies,
hwmon paths, default kernel configurations, refresh of patches, ...) are
updated at the same times.

Signed-off-by: Balázs Triszka <info@balika011.hu>
Co-authored-by: Semih Baskan <strst.gs@gmail.com>
Co-authored-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Co-authored-by: Gilly1970 <gilroyscott@hotmail.com>
Co-authored-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Co-authored-by: Carlo Szelinsky <github@szelinsky.de>
[sven: rebase, integrate suggestions from PR, add device packages, split]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[daniel: stripped to Linux 6.18 only, dropped unrelated changes]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-21 17:04:55 +01:00
Balázs Triszka a3395c60ba firmware: add Realtek RTL826X firmware package
This is required by the realtek PHY driver for:

* rtl8261n.bin (package "rtl8261n-firmware" or "rtl8261n-lp-firmware")
  - RTL8251L 5Gbps PHY
  - RTL8261BE 10Gbps PHY
  - RTL8261N 10Gbps PHY
* rtl8264b.bin (package "rtl8264b-firmware")
  - RTL8254B 5Gbps PHY
  - RTL8264 10Gbps PHY
  - RTL8264B 10Gbps PHY

These PHY chips need a sequence of register writes for initialization.
These are provided as firmware files which are interpreted/applied by a
new register patch engine.

For the moment, the patch instructions in rtl8261-firmware and
rtl8264b-firmware are the same as from the rtl8261n driver. This should
make it possible to first evaluate the patch engine and driver development
for switching over in adjusting the patch instructions.

Signed-off-by: Balázs Triszka <info@balika011.hu>
[sven: rebase, split, fix package version/release, use conf from rtl8261n
driver]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[daniel: define VERSION matching source date for the resulting packages]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-21 17:04:55 +01:00
Paul Spooren a7b5926bba scripts: add --user-network to qemustart
qemustart is a handy script to quickly test OpenWrt firmware using
qemu.  Bringing up networking currently requires a bridge-helper
setup with privileged IP and bridge assignment.  To simplify
testing scenarios like the package manager, which need both shell
access and outbound internet, add a user-mode networking option
backed by SLIRP that requires no privileges.

To stay backward compatible, the defaults don't change.  The new
flag --user-network attaches two NICs (LAN + WAN) and forwards
three host ports to the guest LAN interface (192.168.1.1):
2222 -> 22 (ssh), 8080 -> 80 (http) and 8443 -> 443 (https).  The
host-side ports can be overridden with --ssh-port, --http-port
and --https-port.

Link: https://github.com/openwrt/openwrt/pull/23424
Signed-off-by: Paul Spooren <mail@aparcar.org>
2026-05-21 16:06:25 +02:00
Paul Spooren b8a67fa8d5 scripts: fix lan/wan order of malta in qemustart
OpenWrt's 99-default_network assigns eth0 to lan and eth1 to wan
when no target-specific 02_network is present, which is the case
for malta.  The qemustart bridge block however placed the wan
-device before the lan -device, so the guest's eth0 (lan) ended
up attached to $BR_WAN and eth1 (wan) to $BR_LAN.

Swap the order to match the guest's actual role assignment.

Link: https://github.com/openwrt/openwrt/pull/23424
Signed-off-by: Paul Spooren <mail@aparcar.org>
2026-05-21 16:06:25 +02:00
Markus Stockhausen c27f9b3ba0 realtek: eth: rename netdev/ndev variables to dev
Right now the driver uses variable names netdev/ndev/dev to access
a net_device structure. Align this with most of the other upstream
drivers and convert everything to dev.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23420
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:19:47 +02:00
Markus Stockhausen d3577dfbf3 realtek: eth: get rid of struct device
In the network context there might be confusion between "struct netdev"
and "struct device". The driver should avoid variables of type device
and name "dev" where possible. Remove all variables that point to the
device and use pdev->dev instead. This is like other network drivers
do it.

While we are here modernize logging during probing. Remove messages
from helpers and log errors during probing with dev_err_probe().

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23420
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:19:47 +02:00
Markus Stockhausen 04433b4e75 realtek: eth: better error handling in init_mac()
The function init_mac() can produce errors for the RTL931x devices.
When this happens it throws a message but continues. That can
leave the hardware in a wrong state.

Cleanup the error handling. Remove all messages from the function
and simply return an error value. In the probe() consumer evaluate
this error and abort probing if needed. As there were no reported
issues in the past it is ok to drop the detailed messages and
aggregate them in a single one.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23420
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:19:47 +02:00
Markus Stockhausen a1a4b09076 realtek: eth: reorganize control structure setup
Early assign pdev and netdev to the control structure during probing.
This way it can be used at any time later.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23420
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:19:47 +02:00
Markus Stockhausen 76e47b4421 realtek: mdio: convert to scoped_guard()
Upstream netdev does not like big guards. Especially
around debugging functions. Convert to scoped_guard()
and only lock the really needed code parts. This way
all debugging can run outside of the lock.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23411
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:10:27 +02:00
Markus Stockhausen b8fc512a05 realtek: mdio: convert to consistent a_to_b() helpers
Majority of kernel uses a_to_b(a) instead of b_from_a(a).
Convert to that to be consistent with all helpers in the
driver. Additionally drop inline function definitions.
Let the compiler decide what is best.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23411
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:10:27 +02:00
Markus Stockhausen 57dbfa0a9c realtek: mdio: checkpatch & documentation cleanup
checkpatch is complaining. Fix that. Additionally adapt the
documentation and move it up to the beginning of the driver.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23411
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:10:27 +02:00
Jonas Jelonek c166c20cf6 realtek: add hog for PHY reset for XS1930-10 and -12HP
Add a GPIO hog for those two switches to avoid having a dangling GPIO
which might be pulled accidentally breaking all PHYs, and to have that
GPIO documented.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek 8d9103a420 realtek: improve DTS readability for XS1930 switches
Improve the readability of the DTS files for XS1930 switches by mostly
making nodes with only a single property a one-liner. This wastes less
visual space and makes it more fluent to read.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek ce7a5037f3 realtek: make LED set config for XS1930 more generic
The led_set node was previously duplicated in the per-device DTS for
-10/-12HP and -12F, even though all three share the same Base-T LED
encoding. Move the shared led_set with the Base-T mapping into the
common DTSI as set 0, and have XS1930-12F append its SFP-port mapping
as led_set1 via a property override. Swap the led-set index on the
-12F ports accordingly so SFP ports use set 1 and the two Base-T
ports use set 0.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek 50185c8708 realtek: add additional LED for XS1930-12HP
The -12HP variant has a dedicated red LED on GPIO 3 that lights up
when the PoE budget is exhausted. Add it as led_poe_max with
function = "poe-usage" so userspace can drive it from the PoE stack.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek 9114f49446 realtek: fix LED function for XS1930 switches
The cloud and locator LEDs were declared with no function (cloud) or
with the generic LED_FUNCTION_INDICATOR (locator), which doesn't
match what the hardware actually exposes. Use the descriptive
function strings "cloud" and "locator" instead so the LEDs end up
with sensible names in sysfs.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek 15ff65e522 realtek: fix SYS LED for XS1930-12HP
The XS1930-12HP model from Zyxel doesn't actually use the same GPIOs for
the SYS LED. This was assumed first but proved wrong now. Instead, the
green part of the SYS LED is on another GPIO and the red part of the SYS
LED is on GPIO 0 instead of the green part. Adjust that accordingly in
the device tree.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Jonas Jelonek d750f5f454 realtek: free restore button of XS1930 switches
The support addition for those switches defined the restore button as a
button to trigger a restart. However, those switches also have a reset
button which is wired to the SoC's reset line, causing a reset upon
pressing. Thus, using the restore button for basically the same purpose
doesn't make sense. Change the 'linux,code' property to 'BTN_0' to
assign no real function to that button, allowing it to be used for
different purposes.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Jonas Jelonek 161a871edd realtek: wire up GPIO fan for Zyxel XS1930 switches
The switches from Zyxels XS1930 have one or two fans in the case. They
might be controlled in a limited fashion. There's a single GPIO which -
depending on the state - drives the fan in slow or fast mode. Wire that
up as a device tree node to be able to control that in userspace.

XS1930-10 and XS1930-12HP use the same GPIO while XS1930-12F moves that
to one of its GPIO expanders. Also add 'kmod-hwmon-gpiofan' for all
three devices to be selected by default.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Jonas Jelonek 0c50884201 realtek: reorganize DTS for Zyxel XS1930
XS1930-10 and XS1930-12HP share most of their layout: the same
8-port AQR813 Base-T block, the same SFP+ GPIO mux, identical I2C
master config and serdes polarity. Carve those shared pieces out
into a new intermediate rtl9313_zyxel_xs1930-aqr813.dtsi and have both
device DTS files include it, leaving only their device-specific
differences (LED-set masks, extra PoE bits on -12HP, extra AQR113C
PHYs on -12HP) in the per-device files. XS1930-12F continues to
include the common DTSI directly since its layout differs too much
to share usefully.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Jonas Jelonek d349945f82 realtek: move XS1930 LED definitions to common DTSI
The power, cloud and locator LEDs exist on all three XS1930 variants
with the same colors and roles, only the GPIOs differ. Declare them
once in the common DTSI with the -10/-12HP pinout and let -12F
override the gpios properties via phandle references. This removes
three near-identical led-node blocks from the device DTS files.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Markus Stockhausen 3c4a547eb2 realtek: thermal: separate initialization/operation
The driver uses lazy initialization - during first temperature
get. Checking enabled status over and over again does not make
sense. Provide separate setup functions for this. With this split
the error handling will be improved. If initialization fails, the
sensor will not be registered at all.

While we are here fix some minor typos.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23405
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:07:57 +02:00
Andy Chiang 6eead121ee uhttpd: update to Git HEAD (2026-05-20)
6ab9abb56bcb cgi, file: fix crash due to field_len type mismatch with libubox

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-20 23:37:23 +02:00
Lorenzo Bianconi 9e512f7f0b airoha: Do not allow to disable LRO if the QDMA is shared
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/23439
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-05-20 19:45:11 +02:00
David Bauer cb4e665da0 uqmi: use configured profile-id if available
Use a user-supplied profile-id when configuring the APN and PDP type.
Fall back to id "1" in case no profile-id is set by the user.

Link: https://github.com/openwrt/openwrt/issues/21617
Suggested-by: S. Hoot <spoot_hoot@protonmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
2026-05-20 17:04:18 +02:00
Jonas Jelonek 98cadde477 generic: backport pse-pd error check fix
Backport a patch fixing the error return check when loading PSE PIs from
the DT tree in case the pairset property isn't specified.

This patch might be backported upstream in stable.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23449
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-20 10:38:35 +02:00