]> git.ipfire.org Git - thirdparty/openwrt.git/log
thirdparty/openwrt.git
19 hours agokernel: use fwnode for GPIO export driver 24176/head
Rosen Penev [Fri, 10 Jul 2026 22:52:56 +0000 (15:52 -0700)] 
kernel: use fwnode for GPIO export driver

Upstream prefers more generic fwnode/device handlers as opposed to OF
ones.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24176
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
19 hours agorealtek: watchdog: backport upstream regmap patch 24169/head
Rustam Adilov [Fri, 10 Jul 2026 13:09:46 +0000 (18:09 +0500)] 
realtek: watchdog: backport upstream regmap patch

The patch to replace mmio access in the realtek watchdog
driver with regmap API has been accepted upstream [1].

Backport them here as this is one of the steps required
for a working system with SWAP_IO_SPACE config enabled.

[1] https://lore.kernel.org/linux-watchdog/20260710074316.46643-1-adilov@disroot.org/

Signed-off-by: Rustam Adilov <adilov@tutamail.com>
Link: https://github.com/openwrt/openwrt/pull/24169
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
19 hours agorealtek: watchdog: backport watchdog fix patches
Rustam Adilov [Fri, 10 Jul 2026 13:02:25 +0000 (18:02 +0500)] 
realtek: watchdog: backport watchdog fix patches

Some issues were noticed with watchdog driver while the work
on bringing regmap API was being done.
The patches have been long accepted and are already in v7.2
of linux kernel.

As a prerequisite to the regmap patch, backport them to OpenWrt.

Signed-off-by: Rustam Adilov <adilov@tutamail.com>
Link: https://github.com/openwrt/openwrt/pull/24169
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
20 hours agowifi-scripts: support multiple device paths per board.json wlan entry
Felix Fietkau [Wed, 22 Jul 2026 07:20:48 +0000 (09:20 +0200)] 
wifi-scripts: support multiple device paths per board.json wlan entry

The path field of a board.json wlan entry may now be an array of
device paths. ucidef_add_wlan accepts several leading path arguments
and stores them as a JSON array; a single path is still stored as a
plain string for backwards compatibility. A phy is matched if it
corresponds to any of the listed paths, so a radio that enumerates on
a non-deterministic PCI path still resolves to the correct named phy.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
30 hours agorpcd: update to Git HEAD (2026-07-19) 24329/head
Hauke Mehrtens [Tue, 21 Jul 2026 01:28:58 +0000 (03:28 +0200)] 
rpcd: update to Git HEAD (2026-07-19)

e37ed9d81469 file: re-authorize ACL against resolved path to close symlink bypass

Link: https://github.com/openwrt/openwrt/pull/24329
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
32 hours agorealtek: eth: rename packet to frag 24346/head
Markus Stockhausen [Tue, 21 Jul 2026 11:50:29 +0000 (13:50 +0200)] 
realtek: eth: rename packet to frag

Since the jumbo frame preparation the driver can work on fragments
and not only on complete packets in the receive path. This might be
implementet in the transmit patch in the future too. So a chunk of
data is best described as a fragment. Rename all occurrences.

Link: https://github.com/openwrt/openwrt/pull/24346
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
32 hours agorealtek: eth: move tx skb into driver-only structure
Markus Stockhausen [Tue, 21 Jul 2026 11:32:05 +0000 (13:32 +0200)] 
realtek: eth: move tx skb into driver-only structure

The TX path stores the skb information in the coherent part. This
is only needed by the driver. Move it to its proper location.

Link: https://github.com/openwrt/openwrt/pull/24346
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
32 hours agorealtek: eth: move page/pool into driver structure
Markus Stockhausen [Tue, 21 Jul 2026 11:00:41 +0000 (13:00 +0200)] 
realtek: eth: move page/pool into driver structure

The paged pool handling is only required for the driver and not
for the SOC. Move it into the driver-specific part.

Link: https://github.com/openwrt/openwrt/pull/24346
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
32 hours agorealtek: eth: change skb helper function signatures
Markus Stockhausen [Tue, 21 Jul 2026 10:21:29 +0000 (12:21 +0200)] 
realtek: eth: change skb helper function signatures

It is easier to work with ring/slot when shifting around variables
in the different structures. Replace packet pointers in existing
function signatures.

Link: https://github.com/openwrt/openwrt/pull/24346
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
32 hours agorealtek: eth: add driver-only transmit info structure
Markus Stockhausen [Tue, 21 Jul 2026 09:36:49 +0000 (11:36 +0200)] 
realtek: eth: add driver-only transmit info structure

Remove driver-only data from the coherent transmit structure.
It is not needed to keep this in uncached memory as the SOC
does not need access to it.

Link: https://github.com/openwrt/openwrt/pull/24346
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
32 hours agorealtek: eth: Rename coherent structures
Markus Stockhausen [Tue, 21 Jul 2026 09:28:26 +0000 (11:28 +0200)] 
realtek: eth: Rename coherent structures

In the past the ring handling was split into a coherent (SOC/driver shared)
and a driver-only part. Give the coherent structure a meaningful name.

Link: https://github.com/openwrt/openwrt/pull/24346
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
34 hours agorealtek: rtl9303: enable PSE on Hasivo S600WP-5GT-2SX-SE 22245/head
Carlo Szelinsky [Sat, 18 Jul 2026 14:52:34 +0000 (16:52 +0200)] 
realtek: rtl9303: enable PSE on Hasivo S600WP-5GT-2SX-SE

Wire the HS104 controller (0x0d) on the PSE i2c-gpio bus and attach the
four PoE PHYs (lan1-4) via PHY_C45_PSE; lan5 is not PoE. Add the STC8 LED
MCU (0x4d) with per-port PoE LED triggers, and pull the HS104 PSE and STC8
kmods into the image.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/22245
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
34 hours agorealtek: rtl9313: enable PSE on Hasivo S1300WP-8XGT-4S+
Carlo Szelinsky [Sat, 18 Jul 2026 14:52:34 +0000 (16:52 +0200)] 
realtek: rtl9313: enable PSE on Hasivo S1300WP-8XGT-4S+

Wire the two HS104 controllers (0x0d/0x15) on the i2c_sys bus and attach
the 8 PoE PHYs via PHY_C45_PSE. Add the STC8 LED MCU (0x4d) with per-port
PoE LED triggers, enable LEDS_SYSCON, and pull the PSE and STC8 kmods into
the image.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/22245
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
34 hours agorealtek: rtl9303: enable PSE on Hasivo S1100WP-8GT-SE
Carlo Szelinsky [Sat, 18 Jul 2026 13:38:39 +0000 (15:38 +0200)] 
realtek: rtl9303: enable PSE on Hasivo S1100WP-8GT-SE

Wire the two HS104 controllers on the i2c-gpio bus and attach the 8 PoE
PHYs via a new PHY_C45_PSE macro. Add the STC8 syscon with its per-port
PoE LED triggers, enable LEDS_SYSCON, and pull the PSE and STC8 kmods
into the image.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/22245
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
34 hours agokernel: pse-pd: add Hasivo HS104 PoE PSE controller driver
Carlo Szelinsky [Sat, 18 Jul 2026 13:38:39 +0000 (15:38 +0200)] 
kernel: pse-pd: add Hasivo HS104 PoE PSE controller driver

Direct-I2C driver for the HS104 PSE chip (unlike the MCU-fronted
realtek-pse-mcu family). Packaged as kmod-pse-hasivo-hs104.

This driver will be submitted upstream once the pending PSE-core
patches it builds on (above) have landed.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/22245
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
34 hours agokernel: pse-pd: add poll helper and LED trigger support
Carlo Szelinsky [Sat, 18 Jul 2026 13:53:20 +0000 (15:53 +0200)] 
kernel: pse-pd: add poll helper and LED trigger support

Backport the pending v6 poll-based event detection (devm_pse_poll_helper)
and per-PI LED triggers via the notification path, plus the
poll-interval-ms binding. Unblocks the hs104 poll path and PoE LED
triggers.

Pending upstream as [PATCH net-next v5 0/2] (reviewed; v6 pending,
merge expected soon).
Link: https://lore.kernel.org/all/20260429213224.1747410-1-github@szelinsky.de/
Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/22245
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
34 hours agokernel: pse-pd: backport net fixes for unregister/isr
Carlo Szelinsky [Sat, 18 Jul 2026 13:38:38 +0000 (15:38 +0200)] 
kernel: pse-pd: backport net fixes for unregister/isr

pse_isr() 32-bit OOB bitmap access, disable IRQ before freeing PI data
on unregister, and guard against freed PI data on regulator disable.

Pending upstream in the PSE-core teardown UAF fix series
[PATCH net v2 0/2] (in review; merge expected soon).
Link: https://lore.kernel.org/all/20260711121611.1639086-1-github@szelinsky.de/
Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/22245
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
40 hours agokernel: modules: package OP-TEE and fTPM modules 24311/head
Daniel Golle [Sun, 19 Jul 2026 23:16:52 +0000 (00:16 +0100)] 
kernel: modules: package OP-TEE and fTPM modules

Add kmod packages to support accessing the fTPM (in-firmware TPM) which
can be implemented in the boot firmware of most modern platforms.

 - kmod-optee: Open Portable Trusted Execution Environment
 - kmod-optee-rng: OP-TEE random number generator client
 - kmod-rtc-optee: OP-TEE real-time clock client
 - kmod-scmi-transport-optee: SCMI OP-TEE transport
 - kmod-tee: Generic Trusted Execution Environment
 - kmod-tee-stmm-efi: EFI variable service Trusted Application
 - kmod-tpm-ftpm-tee: Microsoft fTPM Trusted Application

Using the TPM 2.0 can be useful for various security applications,
such as encrypting on-disk credentials. OP-TEE itself alone is also
useful as it can provide a PKCS#11 token for authentication (eg. to
connect to a VPN) and significantly lower the risk of leaking secrets
used for authentication. Also, on some platforms RNG and RTC can only be
accessed via OP-TEE, and some ARM SystemReady platforms require EFI
variables to be access via a TA.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
44 hours agorealtek: eth: clean up non-dma ring data 24245/head
Markus Stockhausen [Thu, 16 Jul 2026 15:38:22 +0000 (17:38 +0200)] 
realtek: eth: clean up non-dma ring data

The driver ring handling consists of two parts:

- rx_data: DMA coherent data shared with the SoC
- rx_qs: driver internal handling data

It is unclear what "qs" stands for. Rename that part to "rx_info".

While we are here:
- relocate slot from rx_data to rx_info as it is only needed by
  the driver and not the SoC.
- rename page_pool to pool because there is only this single pool
  inside the driver.

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agorealtek: eth: align dma variables
Markus Stockhausen [Thu, 16 Jul 2026 15:22:15 +0000 (17:22 +0200)] 
realtek: eth: align dma variables

The driver uses rx_data_dma and tx_dma although they have an
identical meaning. Align their naming.

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agorealtek: eth: groundwork for jumbo frames
Markus Stockhausen [Wed, 15 Jul 2026 09:14:32 +0000 (11:14 +0200)] 
realtek: eth: groundwork for jumbo frames

The Realtek SoC hardware can split incoming packets over multiple buffers.
This allows to receive packets that are larger than the current 2K page
pool limit without changing the design to higher order pages. Add a logic
to handle these fragments.

As a first proof of concept simulate fragmentation by reducing the buffer
size down to 400 bytes. With the current support for standard MTU (1500)
the packets might consist of up to 4 fragments.

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agorealtek: eth: increase error counters under lock
Markus Stockhausen [Fri, 17 Jul 2026 10:21:47 +0000 (12:21 +0200)] 
realtek: eth: increase error counters under lock

Change device error statistics like normal statistics - under a lock.
Reword associated messages in preparation for fragment handling.

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agorealtek: eth: add helper for SKB creation
Markus Stockhausen [Fri, 17 Jul 2026 09:57:34 +0000 (11:57 +0200)] 
realtek: eth: add helper for SKB creation

Simplify rteth_hw_receive() by using a separate helper for SKB creation.

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agorealtek: eth: prepare napi receive for fragments
Markus Stockhausen [Fri, 17 Jul 2026 09:35:41 +0000 (11:35 +0200)] 
realtek: eth: prepare napi receive for fragments

Reorder the code around napi_gro_receive() so that it fits nicely
for the upcoming fragment handling. For this relocate the FCS
stripping and eth_type_trans() calls short before the handover
when the packet is fully built.

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agorealtek: eth: Explain page allocation order
Markus Stockhausen [Fri, 17 Jul 2026 09:05:43 +0000 (11:05 +0200)] 
realtek: eth: Explain page allocation order

Add a comment why we are doing this and make use
of a helper variable.

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agorealtek: eth: prepare counters for fragments
Markus Stockhausen [Fri, 17 Jul 2026 08:03:59 +0000 (10:03 +0200)] 
realtek: eth: prepare counters for fragments

Until now the driver packs each received packet into one ring buffer.
In the future jumbo packets will be split into multiple fragments.
Prepare the ring counters for this:

- Add the more flag to SoC packet header. This denotes if a packet
  has more data after the current fragment.
- Ring counters must be handled per packet and not per fragment.
  Increase work_done after each packet and not after each fragment.

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agorealtek: eth: Adapt SKB defines
Markus Stockhausen [Thu, 16 Jul 2026 07:44:31 +0000 (09:44 +0200)] 
realtek: eth: Adapt SKB defines

Testing shows that the existing performance boost by aligning the data
to 2 bytes (NET_IP_ALIGN) breaks fragment handling on RTL838x devices. The
SoC silently drops 2 bytes between each fragment. Use this tricky alignment
only when it is supported. This will bring down performance on RTL838x SoCs
by 30%. All other SoCs are unaffected. This is a legitimate tradeoff for
allowing multiple fragments. While we are here make clearer what the
definies are about and rename them to a SKB_ prefix.

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agorealtek: eth: add rteth_free_skb() helper
Markus Stockhausen [Thu, 16 Jul 2026 07:20:18 +0000 (09:20 +0200)] 
realtek: eth: add rteth_free_skb() helper

Add a helper to simplify SKB freeing and rx counter handling. If SKB
is given, it is freed and the pointer is set to zero. The return value
is the number of freed SKBs (0/1). With this the existing cleanup and
error handling can be simplified like

dev->stats.tx_errors += rteth_free_skb(&packet->skb);

Link: https://github.com/openwrt/openwrt/pull/24245
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
44 hours agoswconfig: fix portmap memory leak and hardening 24246/head
Rosen Penev [Wed, 15 Jul 2026 22:58:06 +0000 (15:58 -0700)] 
swconfig: fix portmap memory leak and hardening

Free the per-port segment strings on unregister to avoid leaking them
across device rebind. Drop the dead (phys < 0) check and guard the
kstrdup allocation against failure.

Move swconfig_create_led_trigger() before list_add_tail() in
register_switch so a failing registration never publishes the device on
the global swdevs list with dangling portmap/portbuf pointers (a
use-after-free for any swdevs iterator). Route both the LED trigger
failure and the -ENFILE (swdev id exhaustion) failure paths through a
shared cleanup that frees portbuf, portmap, and the per-port segment
strings instead of leaking them.

Reorder the frees in unregister_switch to run after list_del so the
buffers are not freed while the device is still reachable from swdevs.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24246
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
44 hours agokernel: disable qualcomm crypto 24326/head
Rosen Penev [Mon, 20 Jul 2026 19:46:42 +0000 (12:46 -0700)] 
kernel: disable qualcomm crypto

Upstream has marked it as BROKEN. Quote:

This driver is harmful:

- It is much slower than the CPU.
- It Has a history of bugs.
- It does not have exclusive access to the hardware, causing races
  with the secure world.
- It register its implementations with too low a cra_priority for them
  to be actually used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24326
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
44 hours agoramips: mt76x8: fix MT7663 EEPROM cell for MERCUSYS MB130-4G v1 24284/head
Frank Lang [Sat, 18 Jul 2026 19:58:04 +0000 (21:58 +0200)] 
ramips: mt76x8: fix MT7663 EEPROM cell for MERCUSYS MB130-4G v1

The nvmem cell for the MT7663 (5 GHz) radio was too small. The MT7663 EEPROM at
offset 0x8000 requires the full MT7615_EEPROM_FULL_SIZE (0x4da8), but the cell
only declared 0x200 bytes.
The driver always requests the full buffer, also for the MT7663, so the undersized
cell makes the nvmem read fail with -EINVAL. The driver then falls back to default
values, which limits TX power to 3 dBm.

Fix this by enlarging the cell to 0x4da8. The offset 0x8000 was already correct â€”
offset 0x0 holds the MT7628 (2.4 GHz) calibration data.

Fixes: #23632
Signed-off-by: Frank Lang <Frank_Lang@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/24284
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
44 hours agogeneric: mips: 6.18: backport fix for highmem init 24286/head
Kyle Hendry [Sun, 19 Jul 2026 02:09:40 +0000 (19:09 -0700)] 
generic: mips: 6.18: backport fix for highmem init

Fix bug in MIPS highmem init that prevents bcm47xx devices from booting

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24286
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agomediatek: filogic: drop dead eth0 MAC assignment on TP-Link BE450 24325/head
Semih Baskan [Mon, 20 Jul 2026 18:31:17 +0000 (21:31 +0300)] 
mediatek: filogic: drop dead eth0 MAC assignment on TP-Link BE450

The eth0 assignment never takes effect. 05_set_preinit_iface brings eth0
up in its default case before 10_fix_eth_mac.sh runs, and the kernel
refuses a MAC change on a running interface, so ip link fails with EBUSY.
This script cannot run any earlier either, since it needs /tmp/tp_data
mounted by 09_mount_cfg_part.

Nothing is lost by dropping it: the DSA user ports carry their own
addresses, which the lan1-3 assignments below already take care of, and
br-lan takes its address from them.

Verified on a BE450 running an image built from main: eth0 comes up with
a different random address on every boot regardless of this line, while
lan1-3 and br-lan keep the label MAC across reboots even with no macaddr
in /etc/config/network.

Fixes: 1513da34bb1a ("mediatek: filogic: set eth0 and LAN port MACs on TP-Link BE450")
Signed-off-by: Semih Baskan <strst.gs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24325
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agorealtek: use Realtek PSE MCU driver for GS1900-8HP B1 24306/head
Stijn Segers [Sat, 18 Jul 2026 11:49:23 +0000 (13:49 +0200)] 
realtek: use Realtek PSE MCU driver for GS1900-8HP B1

Switch the GS1900-8HP B1 (which turns out to come with a Broadcom
PSE, still) to the PSU driver that is being upstreamed.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Link: https://github.com/openwrt/openwrt/pull/24306
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agoethtool: update to 7.1 24278/head
Aleksander Jan Bajkowski [Sat, 18 Jul 2026 11:11:54 +0000 (13:11 +0200)] 
ethtool: update to 7.1

Version 7.1 - Jul 7, 2026
* Feature: track TX pause storm events (-I -a)
* Feature: update doc for ETHTOOL_PFC_PREVENTION_TOUT tunable
* Feature: RX CQE coalescing params (-c, -C)
* Feature: allow hex dump of all pages (-m)
* Feature: qsfp: support newer SFF-8636 compliance codes (-m)
* Feature: sfpid: support newer SFF-8636 compliance codes (-m)
* Fix: document --disable-netlink in help output (-h)
* Fix: add missing newlines in FEC output (--show-fec)
* Fix: sfpid: fix 10G Base-ER module detection (-m)
* Misc: clarify 10000baseCR link mode in man page

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/24278
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agomediatek: filogic: set label MAC address on TP-Link BE450 24180/head
Semih Baskan [Sat, 11 Jul 2026 15:18:56 +0000 (18:18 +0300)] 
mediatek: filogic: set label MAC address on TP-Link BE450

The label-mac-device alias cannot work on this device: it is resolved
by reading the mac-address property of the aliased DT node, but gmac0
never has one. The MAC is stored in a file inside the tp_data UBIFS
volume, so there is no fixed flash offset an nvmem-layout could point
at, and the vendor bootloader does not fix up the FDT either. Drop the
dead alias.

Record the label MAC in board.d instead and assign it to the lan
interface, as is already done for the other devices reading
/tmp/tp_data/default-mac (Mercusys MR90X v1, Archer AX80 v1,
RE6000XD). The explicit lan MAC also makes the br-lan address
independent of the order of the bridge ports.

Suggested-by: Felix Baumann <felix.bau@gmx.de>
Signed-off-by: Semih Baskan <strst.gs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24180
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agomediatek: filogic: set eth0 and LAN port MACs on TP-Link BE450
Semih Baskan [Tue, 7 Jul 2026 09:41:51 +0000 (12:41 +0300)] 
mediatek: filogic: set eth0 and LAN port MACs on TP-Link BE450

eth0 (gmac0) is declared label-mac-device, but nothing assigns its MAC,
so it and the DSA lan ports come up with a random locally administered
address that changes every boot. Assign the base MAC from tp_data
default-mac to eth0 and the lan ports, as is already done for eth1 and
eth2.

Each lan port needs its own assignment: a DSA user port copies the
conduit's MAC once when it is created, at driver probe before preinit
runs, and ignores later changes to eth0.

Run-tested on a BE450 on 25.12.5, where the case is identical.
Two boots without the fix each came up with a different
random address; with the fix applied, eth0 and the lan ports get the
label MAC and keep it across reboots.

Signed-off-by: Semih Baskan <strst.gs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24180
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agokernel: load vmware net modules early 24212/head
Andris PE [Mon, 13 Jul 2026 10:41:50 +0000 (10:41 +0000)] 
kernel: load vmware net modules early

Load vmware network modules early to make them available for failsafe
mode and first-time scripts
REF:
`https://knowledge.broadcom.com/external/article/321259/choosing-a-network-adapter-for-a-virtual.html`
Additionally add e1000 which is default on "Other Linux" vm profiles

Signed-off-by: Andris PE <neandris@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24212
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agokernel: bump 6.18 to 6.18.39 24282/head
John Audia [Sat, 18 Jul 2026 18:06:48 +0000 (14:06 -0400)] 
kernel: bump 6.18 to 6.18.39

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.18.39

Removed upstreamed:
  backport-6.18/704-v7.2-netfilter-flowtable-fix-offloaded-ct-timeout-never-b.patch[1]

All other patches automatically rebased via update_kernel.sh

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.39&id=81a5971cbe18b474b49c651e32f2194b2fb171fe

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/24282
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agorealtek: i2c: replace shared gpio driver with upstream 24269/head
Markus Stockhausen [Fri, 17 Jul 2026 12:23:18 +0000 (14:23 +0200)] 
realtek: i2c: replace shared gpio driver with upstream

Upstream will support I2C GPIO based buses with shared SCL shortly [1].
Drop downstream driver, provide backport and adapt DTS.

[1] https://lore.kernel.org/linux-i2c/20260714162915.3018703-1-markus.stockhausen@gmx.de/

Link: https://github.com/openwrt/openwrt/pull/24269
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 days agoledtrig-network: default missing family to WLAN on non-DT LEDs 24235/head
Mieczyslaw Nalewaj [Wed, 15 Jul 2026 16:58:21 +0000 (18:58 +0200)] 
ledtrig-network: default missing family to WLAN on non-DT LEDs

For LEDs that have no network trigger configuration in Device Tree
(no mode or family properties), net_activate() infers the family
from the LED name or function string. If that inference fails,
the trigger previously returned -EINVAL and refused to activate.

This is too strict for manual activation via sysfs (e.g.
echo "network" > /sys/class/leds/<led>/trigger) on LEDs that
were not declared for the network trigger in DT. In that case
the user expects the trigger to load with sensible defaults.

Change the non-DT activation path to fall back to NET_TRIG_WLAN
instead of failing, while keeping the condition visible via pr_warn().
Device Tree paths with dt_mode or dt_family are left unchanged
and continue to fail on invalid parameters

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/24235
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agoramips: reject invalid frame engine RX lengths 24268/head
Nickolay Savchenko [Fri, 17 Jul 2026 13:13:05 +0000 (16:13 +0300)] 
ramips: reject invalid frame engine RX lengths

fe_poll_rx() takes the packet length directly from the RX descriptor and
passes it to skb_put() without checking that it fits in the allocated
buffer.  A malformed or stale descriptor can therefore extend the skb
beyond its tailroom and corrupt memory.

Reject lengths larger than skb_tailroom(), account the packet in
rx_length_errors and rx_dropped, free the affected skb, and continue by
installing the replacement descriptor.

Signed-off-by: Nickolay Savchenko <n.savchenko@axioma.lv>
Link: https://github.com/openwrt/openwrt/pull/24268
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agoramips: fix frame engine DMA length cleanup
Nickolay Savchenko [Fri, 17 Jul 2026 13:13:05 +0000 (16:13 +0300)] 
ramips: fix frame engine DMA length cleanup

fe_txd_unmap() uses dma_len0 and dma_len1 to decide whether each TX
mapping must be passed to dma_unmap_page().  After unmapping, however,
the code passed the dma_addr0 and dma_addr1 field identifiers to
dma_unmap_len_set().

This leaves the actual length fields unchanged.  A reused descriptor
slot can therefore retain a non-zero length and attempt to unmap an old
DMA mapping again.

Clear dma_len0 and dma_len1 after the mappings have been released.

Signed-off-by: Nickolay Savchenko <n.savchenko@axioma.lv>
Link: https://github.com/openwrt/openwrt/pull/24268
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agorealtek: pcs: drop unneeded pointer cast 24310/head
Jonas Jelonek [Mon, 20 Jul 2026 06:52:05 +0000 (06:52 +0000)] 
realtek: pcs: drop unneeded pointer cast

The return value of device_get_match_data was still explicitly casted to
the driver-internal type. However, since this function returns 'const
void *' and in C void pointers are automatically casted, this isn't
needed. Thus, drop it.

Link: https://github.com/openwrt/openwrt/pull/24310
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agorealtek: pcs: rtl930x: apply only needed patching
Jonas Jelonek [Fri, 17 Jul 2026 08:45:41 +0000 (08:45 +0000)] 
realtek: pcs: rtl930x: apply only needed patching

For 10GBase-R and 2500Base-X, the patching sequences for the slower
modes are also applied. This mirrors the SDK which uses some automatic
detection and only does a one-time initialization. However, Linux works
different. The PCS is configured to a specific mode on demand. Thus,
there is no need to apply the other patching when it isn't really
needed.

Those patching sequences seem to initialize AFE blocks within the
SerDes, thus a 1G AFE shouldn't be needed for 10GBase-R. Testing
confirms this so far, no difference in any link characteristics when
e.g. 1G and 2.5G sequences aren't applied for a 10GBase-R link.

Link: https://github.com/openwrt/openwrt/pull/24310
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agorealtek: pcs: rtl931x: do not configure 1000Base-X for 10GBase-R
Jonas Jelonek [Thu, 16 Jul 2026 23:31:10 +0000 (23:31 +0000)] 
realtek: pcs: rtl931x: do not configure 1000Base-X for 10GBase-R

So far, the 10GBase-R configuration mirrored the SDK which in addition
also sets up 1000Base-X and lets it run in a special mode having
autodetection of 10G/1G. This doesn't make that much sense given that
Linux will trigger PCS reconfiguration once the interface mode has
changed. Thus, we should only provide that for each mode standalone, not
for some proprietary and special mixed auto mode.

Link: https://github.com/openwrt/openwrt/pull/24310
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agorealtek: pcs: rtl931x: add info to config bits
Jonas Jelonek [Thu, 16 Jul 2026 23:28:04 +0000 (23:28 +0000)] 
realtek: pcs: rtl931x: add info to config bits

Give two SerDes register writes some meaningful information, since they
line up with usual PHY registers.

Link: https://github.com/openwrt/openwrt/pull/24310
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agorealtek: pcs: rtl931x: drop RX channel resets during USXGMII config
Jonas Jelonek [Thu, 16 Jul 2026 23:03:36 +0000 (23:03 +0000)] 
realtek: pcs: rtl931x: drop RX channel resets during USXGMII config

The mode configuration calls LEQ/DFE reset and RX reset before doing
USXGMII configuration. Though the SDK does that similar, these calls are
actually unneeded because essentially the same is executed later again
in the attachment configuration. This is also the place where it
rather belongs. Thus, drop those calls in mode configuration.

Link: https://github.com/openwrt/openwrt/pull/24310
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agorealtek: pcs: rtl931x: drop unused helper
Jonas Jelonek [Thu, 16 Jul 2026 22:59:40 +0000 (22:59 +0000)] 
realtek: pcs: rtl931x: drop unused helper

Drop the unused helper rtpcs_931x_sds_reset because it is unused and -
if it was used - would actively mess with the defined SerDes
deactivation/activation in pcs_config.

Link: https://github.com/openwrt/openwrt/pull/24310
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agorealtek: pcs: rtl931x: fix 1000Base-X config
Jonas Jelonek [Sun, 19 Jul 2026 18:53:38 +0000 (18:53 +0000)] 
realtek: pcs: rtl931x: fix 1000Base-X config

Commit 7899dfa6ef71 ("realtek: pcs: rtl931x: separate and reuse
1000base-x config") introduced an issue by accident, using the register
value 0x12 instead of 0x13. A regression hasn't been noticed before, for
yet unknown reasons the 1000Base-X still worked here and there. Probably
due to some external setup.

However, this currently breaks 1000Base-X functionality on at least one
switch. Correcting the register value instantly restores 1000Base-X,
allowing the link to come up. It is unclear yet what this field means,
according to the SerDes register defines from related RTL8295 this might
be TX mode configuration field.

Also add another write which is present in several SDK versions.
Referring from related RTL8295, this might be a field called
EN_LINK_FIB1G, enabling 1000Base-X operation.

Fixes: 7899dfa6ef71 ("realtek: pcs: rtl931x: separate and reuse 1000base-x config")
Link: https://github.com/openwrt/openwrt/pull/24310
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agopackage: rtl826x-firmware: make package versions consistent 24201/head
Eric Fahlgren [Sun, 12 Jul 2026 17:33:48 +0000 (10:33 -0700)] 
package: rtl826x-firmware: make package versions consistent

The two packages rtl826x-firmware and rtl826x-lp-firmware are built
from the same source, yet have 'VERSION=xxx' overrides that modify
the package name and metadata.  This causes issues with apk, as
it always selects the package with the higher version number (the
'-lp-' one), irrespective of which package is desired.

Remove the VERSION overrides and use the actual package version so
that apk can install the correct package.  The binary contents of
the packages remain unaffect, this only changes the package file
name and metadata related to versioning.

Before
  rtl826x-firmware-20221115.apk
  rtl826x-lp-firmware-20240729.apk

After
  rtl826x-firmware-2026.01.24~0cd4abe2-r4.apk
  rtl826x-lp-firmware-2026.01.24~0cd4abe2-r4.apk

Fixes: https://github.com/openwrt/openwrt/issues/24145
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24201
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2 days agoucode-mod-bpf: bump PKG_RELEASE
Felix Fietkau [Thu, 16 Jul 2026 18:07:34 +0000 (20:07 +0200)] 
ucode-mod-bpf: bump PKG_RELEASE

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: add map info method and map type constants
Felix Fietkau [Thu, 16 Jul 2026 18:28:27 +0000 (20:28 +0200)] 
ucode-mod-bpf: add map info method and map type constants

Scripts need the map type to know how to interact with a map, e.g.
per-CPU value handling or keyless queue/stack semantics. Add an
info() map method returning type, key/value size and max_entries,
along with BPF_MAP_TYPE constants for comparison.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: add ring buffer and perf event buffer support
Felix Fietkau [Thu, 16 Jul 2026 18:27:46 +0000 (20:27 +0200)] 
ucode-mod-bpf: add ring buffer and perf event buffer support

Add consumer support for BPF_MAP_TYPE_RINGBUF and
BPF_MAP_TYPE_PERF_EVENT_ARRAY maps. ringbuf(callback) and
perf_buffer(callback, pages, lost_callback) map methods return a
buffer resource with fileno, poll and consume methods. The fileno
method exposes the epoll fd and matches the interface uloop.handle()
expects, so a buffer can be passed directly to uloop for event loop
integration.

The ring buffer callback receives the sample data and may return a
negative integer to stop consumption; the perf callbacks additionally
receive the CPU number.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: add map-in-map and prog array support
Felix Fietkau [Thu, 16 Jul 2026 18:26:30 +0000 (20:26 +0200)] 
ucode-mod-bpf: add map-in-map and prog array support

Updates on array/hash-of-maps and prog array maps take the fd of the
inner object as a 4-byte value. Accept bpf.map and bpf.program
resources as map values and convert them to their fd.

Lookups on map-in-map types return the inner map id; add open_map_id
and open_program_id to obtain a usable object from such an id.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: add support for keyless maps
Felix Fietkau [Thu, 16 Jul 2026 18:25:50 +0000 (20:25 +0200)] 
ucode-mod-bpf: add support for keyless maps

Queue and stack maps have zero-sized keys and require a NULL key
pointer; the kernel rejects any non-NULL key with EINVAL, making
these maps unusable. Accept a null key argument on maps without a
key, mapping get() to peek, set() to push and delete() with return
to pop.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: add per-CPU map support
Felix Fietkau [Thu, 16 Jul 2026 18:25:17 +0000 (20:25 +0200)] 
ucode-mod-bpf: add per-CPU map support

Lookup, update and lookup-and-delete on per-CPU maps use buffers of
roundup(value_size, 8) * num_possible_cpus bytes. The previous code
sized buffers for a single value, so get() on a per-CPU map made the
kernel overflow the stack buffer and set() passed undersized data.

Track the map type and size the buffers accordingly. get() and
delete() with return now yield an array with one value per CPU, set()
accepts either such an array or a single value replicated to all
CPUs.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: fix error reporting in tc hook setup
Felix Fietkau [Thu, 16 Jul 2026 18:07:21 +0000 (20:07 +0200)] 
ucode-mod-bpf: fix error reporting in tc hook setup

Failures in the detach path returned NULL without recording any error
state, so error() reported a stale or empty error. Attach failures
reported a hardcoded ENOENT regardless of the actual cause. Record
errno for all failures; if_nametoindex, bpf_tc_attach and
bpf_tc_detach all set it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: fix stale errno when rodata map is missing
Felix Fietkau [Thu, 16 Jul 2026 18:07:01 +0000 (20:07 +0200)] 
ucode-mod-bpf: fix stale errno when rodata map is missing

bpf_object__next_map does not set errno when it runs out of maps, so
the reported error code was whatever errno happened to hold. With
errno 0 the failure was invisible to error(). Report ENOENT instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: fix unaligned access in integer iterator
Felix Fietkau [Thu, 16 Jul 2026 18:05:55 +0000 (20:05 +0200)] 
ucode-mod-bpf: fix unaligned access in integer iterator

The iterator key buffer is a flexible array member placed directly
after a bool, leaving it without natural alignment for the u32/u64
loads in next_int. Copy the key via memcpy instead of dereferencing
a misaligned pointer, which traps on strict-alignment targets.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: fix key/value aliasing in map argument conversion
Felix Fietkau [Thu, 16 Jul 2026 18:05:28 +0000 (20:05 +0200)] 
ucode-mod-bpf: fix key/value aliasing in map argument conversion

uc_bpf_map_arg converted integer arguments through a single static
buffer. When map set was called with both an integer key and an integer
value, the second conversion overwrote the first, so the element was
written at the wrong key. Convert into a caller-provided buffer
instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agoucode-mod-bpf: fix missing resource pointer checks
Felix Fietkau [Thu, 16 Jul 2026 18:04:47 +0000 (20:04 +0200)] 
ucode-mod-bpf: fix missing resource pointer checks

uc_fn_thisval can return NULL when a method is called with a foreign or
missing this context. pin, foreach and the iterator next functions
dereferenced the result without checking it, crashing the VM.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agobuild: gate firmware image signing behind SIGN_FIRMWARE 24291/head
Paul Spooren [Sun, 19 Jul 2026 09:30:17 +0000 (11:30 +0200)] 
build: gate firmware image signing behind SIGN_FIRMWARE

Firmware image signing in append-metadata/append-gl-metadata was conditional
only by the presence of the build key. Add an explicit SIGN_FIRMWARE option
(default enabled except with BUILDBOT) so appending the fwtool signature can be
toggled on its own.

It's disable on buildbot since we use a decentralized building with no
individual keys on builders. Instead, a fake key is currently used, which adds
an insecure signature.

The future of signing firmware  and key distribution across the build
infrastructure should be discussed separately.

Link: https://github.com/openwrt/openwrt/pull/24291
Signed-off-by: Paul Spooren <mail@aparcar.org>
3 days agotools: firmware-utils: update to Git HEAD (2026-07-19)
Jonas Jelonek [Sat, 27 Jun 2026 11:13:32 +0000 (11:13 +0000)] 
tools: firmware-utils: update to Git HEAD (2026-07-19)

1ab209233682 mkzynfw: rename macros from RTL93XX to RTL_OTTO
606f25ef3ca2 mkzynfw: add board definitions for Zyxel GS1920 v2 series
162fa533b309 mkzynfw: add board definitions for GS2210 series
b2d46a825a53 mkzynfw: add board definitions for Zyxel GS1920 v1 series
5c5df244b8a1 Revert "mkzynfw: add board definitions for Zyxel GS1920 v1 series"
7f28bfbc4b5a Revert "mkzynfw: add board definitions for GS2210 series"
5e1b83d1fc2b mkzynfw: add board definitions for GS2210 series
3e6b426938e8 mkzynfw: add board definitions for Zyxel GS1920 v1 series

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
3 days agoramips: add support for Comfast CF-EW84 24112/head
Vincenzo Suraci [Mon, 6 Jul 2026 09:43:05 +0000 (11:43 +0200)] 
ramips: add support for Comfast CF-EW84

Add support for the Comfast CF-EW84 based on the MediaTek MT7621
SoC.

Hardware:
  CPU/SoC:      MediaTek MT7621DA
  RAM:          128 MB DDR3
  Flash:        Macronix MX25L12805D 16 MB
  Switch:       MediaTek MT7530
  WiFi 2.4 GHz: MediaTek MT7603E
  WiFi 5 GHz:   MediaTek MT7613B
  Ports:        1x WAN, 2x LAN (10/100/1000 Mbps)
  LEDs:         Power, WAN, LAN1, LAN2, WLAN
  Buttons:      Reset
  UART:         through-hole on PCB
                pinout: RX, TX, GND, 3.3V
                settings: 115200n8

Flash instructions:
1. Connect the bundled PoE injector to power.
2. Connect the PC to the LAN1 or LAN2 port of the device.
3. Configure a static IP on the computer's Ethernet adapter:
     IP:      192.168.1.x (x = 2 to 254)
     Mask:    255.255.255.0
     Gateway: empty
     DNS:     empty
4. Connect a second Ethernet cable to the PoE port of the
   bundled injector.
5. Press and hold the reset button on the device.
6. While holding the reset button, plug the other end of the
   second Ethernet cable into the WAN port.
7. Wait at least 3 seconds, then release the reset button.
8. Browse to http://192.168.1.1: the MediaTek U-Boot System
   Recovery page should appear.
9. Click Upload and select the *-sysupgrade.bin firmware file.
10. After flashing completes, browse to http://192.168.1.1
    again: the LuCI login page should appear.

Factory data:
  2.4 GHz EEPROM:        factory offset 0x0000
  5 GHz EEPROM:          factory offset 0x8000
  LAN MAC address:       factory offset 0xe000
  WAN MAC address:       factory offset 0xe000 (+1)

LED layout:
The Comfast CF-EW84 has five physical LEDs, but only the WLAN
LED is software-controllable through the Linux GPIO-LEDs
subsystem.

Signed-off-by: Vincenzo Suraci <vincenzo.suraci@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24112
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agoairoha: an7583: build airoha_an7583-evb by default 24285/head
Mikhail Zhilkin [Sat, 18 Jul 2026 20:28:30 +0000 (23:28 +0300)] 
airoha: an7583: build airoha_an7583-evb by default

These devices aren't broken and their build shouldn't have been disabled.

Fixes: 2566781 ("airoha: an7583: remove source-only flag")
Link: https://github.com/openwrt/openwrt/pull/23809#issuecomment-5011321092
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24285
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
3 days agoairoha: an7583: add missing config symbol
Mikhail Zhilkin [Sat, 18 Jul 2026 20:19:44 +0000 (23:19 +0300)] 
airoha: an7583: add missing config symbol

Add missing CONFIG_SND_SOC_AN7581 symbol.

Fix error:
------------------------------------------------------------------
ASoC support for Airoha AN7581 chip (SND_SOC_AN7581) [N/m/?] (NEW)
make[7]: *** [scripts/kconfig/Makefile:85: syncconfig] Error 1
------------------------------------------------------------------

Fixes: 2566781 ("airoha: an7583: remove source-only flag")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24285
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
3 days agorealtek: add support for Zyxel GS1900-10HP B1 24283/head
Carlo Szelinsky [Sat, 18 Jul 2026 20:09:03 +0000 (22:09 +0200)] 
realtek: add support for Zyxel GS1900-10HP B1

The GS1900-10HP B1 keeps the RTL8380M SoC and port layout but replaces the
A1's Broadcom PoE (Gen1) with a Realtek RTL8238 PSE fronted by a Nuvoton
MCU speaking the Gen2 protocol at 115200 baud. It reuses the shared
rtl8380_zyxel_gs1900-10hp.dtsi and only overrides the PSE compatible and
UART speed.

Specifications:
- SoC: Realtek RTL8380M
- Ports: 8x 10/100/1000 (PoE+), 2x SFP
- PoE: Realtek RTL8238 via Nuvoton MCU (Gen2, UART 115200)

Tested on hardware: driver probes RTL8238B (8 ports), per-port control via
ethtool, verified across a cold power-cycle.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/24283
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
3 days agorealtek: gs1900-10hp: move A1 PoE to in-kernel PSE driver
Carlo Szelinsky [Sat, 18 Jul 2026 20:08:34 +0000 (22:08 +0200)] 
realtek: gs1900-10hp: move A1 PoE to in-kernel PSE driver

The GS1900-10HP A1 (Broadcom BCM59121 behind a Gen1 MCU on UART) was
driven by the userspace realtek-poe daemon. Move it to the in-kernel
realtek-pse-mcu (Gen1) driver so PoE is managed through the standard
PSE-PD / ethtool interface, and factor the board description shared with
the upcoming B1 variant into rtl8380_zyxel_gs1900-10hp.dtsi.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/24283
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
3 days agorealtek: dts: adapt RTL8214FC bus location on RTL839x 24281/head
Markus Stockhausen [Sun, 19 Jul 2026 06:25:07 +0000 (08:25 +0200)] 
realtek: dts: adapt RTL8214FC bus location on RTL839x

The RTL839x has the following hard-coded bus topology:
- Bus 0: Port 0-23
- Bus 1: Port 24-51

So the bus number and the PHY address in the dts are mostly
ignored. Nevertheless fix the assignment for the Zyxel GS1920.
This does not change the functionality it just describes the
hardware correctly. While we are here add the PHY package
description too.

Link: https://github.com/openwrt/openwrt/pull/24281
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
3 days agorealtek: dts: more ethernet-phy-package conversion
Markus Stockhausen [Sat, 18 Jul 2026 17:10:21 +0000 (19:10 +0200)] 
realtek: dts: more ethernet-phy-package conversion

Encapsulate some more multiport PHYs into their packages.

Link: https://github.com/openwrt/openwrt/pull/24281
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
4 days agoCI: remove labeler workflow and enable webhook-based labeling 24256/head
Josef Schlehofer [Thu, 16 Jul 2026 21:52:35 +0000 (23:52 +0200)] 
CI: remove labeler workflow and enable webhook-based labeling

Remove the .github/workflows/labeler.yml workflow and enable the "enable_labeler_yml" option in .github/formalities.json to let the webhook bot handle pull request labeling. This avoids running on GitHub Actions, so it is faster and uses fewer resources.

It uses the existing .github/labeler.yml for labels.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24256
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoCI: migrate to webhook bot and simplify labeler
Josef Schlehofer [Thu, 16 Jul 2026 17:57:35 +0000 (19:57 +0200)] 
CI: migrate to webhook bot and simplify labeler

This commit migrates the repository validation to a webhook-based bot instead of the GitHub Actions workflow (.github/workflows/formal.yml).

Since the bot handles stable branch labeling automatically (via the "branch_labeling: true" configuration option), the redundant branch check and labeling steps are removed from .github/workflows/labeler.yml.

The following configuration choices are applied in formalities.json:
- check_space_after_assignment: false (Disabled temporarily to catch any issues since it is a newly implemented check)
- check_makefile_indentation: false (Disabled temporarily to catch any issues since it is a new feature)
- check_patch_headers: 'warning' (Changed to warning instead of hard error since many legacy patches lack headers)
- enable_stale_bot: false (Disabled for now)

Other configurations can be adjusted in formalities.json based on the openwrt-bot-worker repository [1].

[1] https://github.com/openwrt/openwrt-bot-worker

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24256
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoramips: move sound driver to files 24236/head
Rosen Penev [Sat, 11 Jul 2026 23:32:38 +0000 (16:32 -0700)] 
ramips: move sound driver to files

This is local only. Also has never been upstreamed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24236
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
4 days agoairoha: add initial support for Nokia XG-040G-MF 23809/head
Mikhail Zhilkin [Mon, 15 Jun 2026 14:27:49 +0000 (17:27 +0300)] 
airoha: add initial support for Nokia XG-040G-MF

This commit adds initial support for Nokia XG-040G-MF XG-PON ONU.

Specification
-------------
- SoC       : Airoha AN7583DT (dual-core ARM Cortex-A53 1.2 GHz)
- RAM       : 512 MiB DDR4 (Winbond W664GG6RB-06)
- Flash     : SPI-NAND 256 MiB (GigaDevice GD5F2GM7UEYIG)
- WLAN      : -
- Ethernet  : 1x 2500 Mbps (LAN1, Airoha EN8811HN)
              3x 10/100/1000 Mbps (LAN2-LAN4, Airoha AN7583 SoC switch)
- XG-PON    : ECONET EN7572, SLIC: MaxLinear PEF32001VSV12
- USB       : 1x USB2 (with power control via gpio)
              1x USB3 (with power control via gpio)
- Buttons   : Reset
- LEDs      : 1x Power (green)
              1x WAN (green)
              1x WAN (red)
              4x LAN (green)
              2x USB (green)
- Power     : 12 VDC, 1 A

Unsupported functions, limitations and known issues
---------------------------------------------------
1. XG-PON won't be available after installing OpenWrt.
2. USB ports: AN7583 SoC in OpenWrt doesn't support USB at this time.

Installation (UART)
-------------------
1. Attach UART and run picocom:
   picocom -b 115200 --send-cmd "sb -vv" /dev/ttyUSB0
2. Interrupt boot process by pressing Enter key to enter u-boot
   Username: telecomadmin
   Password: nE7jA%5m
3. Start download firmware via ymodem protocol (via UART):
   loady 0x85000000
4. Press Ctrl + A then Ctrl + S in the picocom terminal (if you are using
   a different terminal, please refer to the documentation) to start
   upload OpenWrt initramfs image using ymodem protocol. Enter local path
   to the OpenWrt initramfs image and press Enter.
5. Load OpenWrt initramfs image from the memory:
   bootm 0x85000000
5. Sysupgrade with OpenWrt sysupgrade image

Alternative for the p.3-4. Load and boot OpenWrt initramfs from tftp IP
192.168.1.254:
   tftpboot 0x85000000 192.168.1.254:openwrt-initramfs-uImage.itb
   bootm 0x85000000

Backup and installation (without UART)
--------------------------------------
1. Unplug Fiber
2. Make ONU Reset
3. Navigate: http://192.168.1.1
   Username: CMCCAdmin
   Password: aDm8H%MdA
4. Go to Apps -> Home Storage -> FTP and check Enable FTP
5. Go to Apps -> Home Storage -> SAMBA Sharing and check Enable Samba
6. Visit the following URL to open Telnet:
   http://192.168.1.1/system.cgi?telnet
7. Telnet account login:
   Username: user
   Password: <see ONU label>
8. Get root privileges:
   su user_ftp
   Password: <see ONU label>
9. Copy 'squashfs-factory-kernel.bin', 'squashfs-factory-rootfs.bin' and
   'OpenWrt.mtd2.u-boot-env.bin' (backup of 'u-boot-env' partition from
   the another Nokia XG-040G-MF with OpenWrt installed)
9. Attach USB flash drive and check the new dir in /mnt:
   ls /mnt
10. Change current dir to the flash drive (change D to your flash drive
   label):
   cd /mnt/D
11. Make backup:
   for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; \
   do cat /dev/mtd$i | gzip -9 > mtd$i.bin.gz; done
12. Check image sizes:
   ls -l | awk '{if(NR>1) {$5=sprintf("0x%x", $5); print}}'
13. Write images:
   mtd_debug erase /dev/mtd0 0x60000 0x20000
   mtd_debug write /dev/mtd0 0x60000 0x20000 OpenWrt.mtd2.u-boot-env.bin
   mtd_debug erase /dev/mtd14 0x0 0x2880000
   mtd_debug write /dev/mtd14 0x0 0x3e6cfc squashfs-factory-kernel.bin
   mtd_debug erase /dev/mtd11 0x0 0x80e0000
   mtd_debug write /dev/mtd11 0x0 0x440000 squashfs-factory-rootfs.bin
   0x3e6cfc - size of your 'squashfs-factory-kernel.bin'
   0x440000 - size of your 'squashfs-factory-rootfs.bin'
14. Reboot:
   reboot

Recovery
--------
The same as described in Installation (UART).

Return to stock
---------------
1. Follow the steps 1-5 of the Installation (UART)
2. Once in OpenWrt upload you backup to the /tmp dir of the router:
   scp -O mtd16.bin.gz root@192.168.1.1:/tmp
5. Connect to the router using ssh and install kmod-mtd-rw:
   apk update && apk add kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
6. Unlock bootloader:
   mtd unlock bootloader
7. Restore stock:
   zcat /tmp/mtd16.bin.gz | mtd write - all_flash
8. Reboot:
   reboot

Stock layout
------------
+-------+------------+---------+---------+
| mtd   | label      | start   | size    |
+-------+------------+---------+---------+
| mtd0  | bootloader | 0       | 80000   |
| mtd1  | romfile    | 80000   | 40000   |
| mtd14 | nsb_master | c0000   | 2880000 |
| mtd15 | nsb_slave  | 2940000 | 2880000 |
| mtd6  | bosa       | 51c0000 | 40000   |
| mtd7  | ri         | 5200000 | 40000   |
| mtd8  | flag       | 5240000 | 40000   |
| mtd9  | flagback   | 5280000 | 40000   |
| mtd10 | config     | 52c0000 | a00000  |
| mtd11 | data       | 5cc0000 | 80e0000 |
| mtd12 | oopsfs     | dda0000 | 400000  |
| mtd13 | log        | e1a0000 | a00000  |
+-------+------------+---------+---------+

UART
----
A view from the back side of the PCB:
   ------------------------
   |       GND RX TX
   |        X  X  X
Connection parameters:
115200, 8N1, 3.3V

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | e0:xx:xx:xx:xx:a0 | label     |
| WAN     | e0:xx:xx:xx:xx:a1 | label + 1 |
+---------+-------------------+-----------+
The LAN MAC (hex) was found in 'ri', 0x3e

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23809
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
4 days agoairoha: move common Nokia XG-040G properties to dtsi files
Mikhail Zhilkin [Mon, 29 Jun 2026 18:52:26 +0000 (21:52 +0300)] 
airoha: move common Nokia XG-040G properties to dtsi files

Move shared DTS properties for Nokia XG-040G-MD and XG-040G-MF into
common DTSI files to reduce duplication:
- an758x-nokia_xg-040g-common.dtsi
- an758x-nokia_xg-040g-stock-parts.dtsi
- an758x-nokia_xg-040g-ubi-parts.dtsi

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23809
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
4 days agoairoha: an7583: remove source-only flag
Mikhail Zhilkin [Tue, 16 Jun 2026 05:12:57 +0000 (08:12 +0300)] 
airoha: an7583: remove source-only flag

Remove source-only flag from Airoha an7583 subtarget for upcoming Nokia
XG-040G-MF support. Also disable builds for airoha_an7583-evb and
airoha_an7583-evb-emmc evaluation boards.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23809
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
4 days agoairoha: use standard LED function and enumerators for PHY LEDs
Mikhail Zhilkin [Sat, 27 Jun 2026 15:44:28 +0000 (18:44 +0300)] 
airoha: use standard LED function and enumerators for PHY LEDs

Configure shared LAN PHY LED templates with standard LED_FUNCTION_LAN
macros and initial function-enumerators. These nodes remain disabled
by default.

Board-specific DTS files enabling them must provide the required 'color'
property, and must override the 'function-enumerator' values if identical
colors are used to guarantee unique sysfs names.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23809
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
4 days agoairoha: an7583: refresh kernel config
Mikhail Zhilkin [Mon, 22 Jun 2026 17:36:52 +0000 (20:36 +0300)] 
airoha: an7583: refresh kernel config

1. Enable MEDIATEK_GE_SOC_PHY driver and disable NET_DSA_MT7530_MDIO
2. Refresh kernel configs with:
   make kernel_oldconfig CONFIG_TARGET=subtarget

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23809
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
4 days agoairoha: an7583: enable mtd virtual concat support
Mikhail Zhilkin [Sun, 14 Jun 2026 05:48:45 +0000 (08:48 +0300)] 
airoha: an7583: enable mtd virtual concat support

This is required for upcoming Nokia XG-040G-MF support.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23809
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
4 days agoairoha: an7583: add default packages
Mikhail Zhilkin [Tue, 16 Jun 2026 05:20:20 +0000 (08:20 +0300)] 
airoha: an7583: add default packages

Add airoha-an7583-npu-firmware, kmod-gpio-button-hotplug, kmod-leds-gpio
and uboot-envtools to the default packages.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23809
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
4 days agoairoha: wrap long lines and fix indents
Mikhail Zhilkin [Tue, 16 Jun 2026 05:37:42 +0000 (08:37 +0300)] 
airoha: wrap long lines and fix indents

Wrap long lines and fix indents in the an7583.mk.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23809
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agokernel: use iremap for assembly 24271/head
Paul Spooren [Fri, 17 Jul 2026 19:19:46 +0000 (21:19 +0200)] 
kernel: use iremap for assembly

Currently assembly code of the Kernel may contain the build path, resulting in
unreproducible firmware images (and Kernels). Fix this by adding a iremap
KAFLAG.

Before:

    strings "/path/to/vmlinux" | grep linux-6.18.38
    /path/to/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.18.38
    /path/to/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.18.38

After

    strings "/path/to/vmlinux" | grep linux-6.18.38
    target-x86_64_musl/linux-x86_64/linux-6.18.38
    target-x86_64_musl/linux-x86_64/linux-6.18.38

Link: https://github.com/openwrt/openwrt/pull/24271
Signed-off-by: Paul Spooren <mail@aparcar.org>
5 days agorealtek: add PoE support for GS1920-24HP 24239/head
Jonas Jelonek [Wed, 27 May 2026 14:26:47 +0000 (14:26 +0000)] 
realtek: add PoE support for GS1920-24HP

Add PoE support for GS1920-24HP by providing the device tree
definition and selecting the Realtek PSE MCU driver package for build.
Support includes both versions of the device since they basically share
the same PSE frontend. The common DTSI includes the shared definitions,
the device DTS files then set the correct compatibles.

Link: https://github.com/openwrt/openwrt/pull/24239
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agorealtek: add PoE support for USW XG Pro 8 PoE
Jonas Jelonek [Fri, 26 Jun 2026 18:10:31 +0000 (18:10 +0000)] 
realtek: add PoE support for USW XG Pro 8 PoE

Add device tree definition for PoE support using the Realtek PSE MCU
driver. Select the kernel package for the driver in DEVICE_PACKAGES
accordingly.

Link: https://github.com/openwrt/openwrt/pull/24239
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agorealtek: add PoE support for XGS1930-28HP
Jonas Jelonek [Sun, 3 May 2026 22:17:30 +0000 (22:17 +0000)] 
realtek: add PoE support for XGS1930-28HP

Add support for PoE on Zyxel XGS1930-28HP by leveraging the new Realtek
PSE driver. Define the PSE controller with all its properties in DTS of
the device and link it to the PHYs.

Link: https://github.com/openwrt/openwrt/pull/24239
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agorealtek: switch to PSE driver for Plasma Cloud PSX28
Jonas Jelonek [Sun, 31 May 2026 07:40:01 +0000 (07:40 +0000)] 
realtek: switch to PSE driver for Plasma Cloud PSX28

Use the kernel PSE driver for PoE functionality on this device instead
relying on userspace apps. Drop the automatic selection for poemgr in
favor of the driver module.

Link: https://github.com/openwrt/openwrt/pull/24239
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agorealtek: add PoE support for Linksys LGS328MPCv2
Jonas Jelonek [Tue, 14 Jul 2026 22:08:27 +0000 (22:08 +0000)] 
realtek: add PoE support for Linksys LGS328MPCv2

Add PoE support to Linksys LGS328MPCv2 by adding the required device
tree definition and select the needed kernel module package, making use
of the Realtek PSE MCU driver.

Co-authored-by: Jan-Henrik Bruhn <git@jhbruhn.de>
Link: https://github.com/openwrt/openwrt/pull/24239
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agorealtek: add macro for pse-pi
Jonas Jelonek [Wed, 15 Jul 2026 08:34:19 +0000 (08:34 +0000)] 
realtek: add macro for pse-pi

Add a macro PSE_PI for the common pse-pi definition, helping with
devices which make use of the Realtek PSE MCU driver. While those
definitions stay manageable for low port counts, this adds too much
visual boilerplate with 24 or even 48 ports. The macro keeps it short
with one line per pse-pi.

Also make use of this macro directly for the two devices XS1930-12HP and
XMG1915-10EP.

Link: https://github.com/openwrt/openwrt/pull/24239
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agouboot-airoha: fix AN7583 pinctrl compatible
Robert Marko [Fri, 17 Jul 2026 10:06:45 +0000 (12:06 +0200)] 
uboot-airoha: fix AN7583 pinctrl compatible

Use the compatible expected by the AN7583 pinctrl driver so the pinctrl and integrated GPIO driver can bind.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 days agomtd: fis: fix buffer overflow from negative memset size 23550/head
Anna Kiri [Tue, 26 May 2026 17:10:36 +0000 (19:10 +0200)] 
mtd: fis: fix buffer overflow from negative memset size

In fis_remap(), when desc < last, the memset size is computed as
'tmp - end'. Since tmp is calculated as 'end - positive_value', tmp is
always less than end, making 'tmp - end' negative. When cast to size_t,
this wraps to a very large value, causing a massive buffer overflow.

Fix by swapping the operands to 'end - tmp' which correctly computes the
number of bytes to clear.

Signed-off-by: Anna Kiri <bredcorn@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23550
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agokernel: remove kmod-crypto-misc 23927/head
Rosen Penev [Tue, 23 Jun 2026 21:48:58 +0000 (14:48 -0700)] 
kernel: remove kmod-crypto-misc

Nothing selects this. In addition, a lot of those algorithms are
legacy/obsolete.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23927
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agomediatek: fix nmbm max-reserved-blocks for Keenetic/Netcraze devices 24001/head
Maxim Anisimov [Mon, 29 Jun 2026 13:14:20 +0000 (16:14 +0300)] 
mediatek: fix nmbm max-reserved-blocks for Keenetic/Netcraze devices

The devicetree set mediatek,bmt-max-reserved-blocks to 64, but the
factory firmware uses 256. With the lower value NMBM fails to locate
its signature on some boards, and the device does not boot.

Restore the factory value of 256 to match stock firmware and fix
boot on affected units.

Vendor nmbm max blocks value:
https://github.com/keenetic/kernel-49/blob/master/drivers/mtd/nmbm/nmbm-mtd.c#L31

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24001
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agoramips: mt7620: fix jumbo frame mode 24242/head
Gleb Pesin [Wed, 15 Jul 2026 19:12:33 +0000 (19:12 +0000)] 
ramips: mt7620: fix jumbo frame mode

MAX_RX_PKT_LEN value 2 selects 1552-byte frames, not jumbo mode.
Select value 3 so the configured 2 KiB frames are actually accepted by
the switch.

Tested on a ZBT-WE826 (MT7620). With value 2, 1534-byte IPv4
packets pass while 1535-byte packets are dropped. With value 3,
1792-byte and 1800-byte DF IPv4 packets pass.

Fixes: d083212e1105 ("ramips: ethernet: ralink: mt7620 enable jumbo frames")
Signed-off-by: Gleb Pesin <dormancygrace@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24242
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agotreewide: strip trailing whitespace where present 24255/head
Mieczyslaw Nalewaj [Thu, 16 Jul 2026 14:34:54 +0000 (16:34 +0200)] 
treewide: strip trailing whitespace where present

Ran a treewide trailing-whitespace cleanup for *.c, *.h, *.dts and *.dtsi.
Only files under target/linux/lantiq/... and target/linux/qualcommax/...
required changes, so the diff is limited to those paths.

Done by executing commands:
find . -type f | grep "\.c$" | xargs sed -i 's/[ \t]\+$//'
find . -type f | grep "\.h$" | xargs sed -i 's/[ \t]\+$//'
find . -type f | grep "\.dts$" | xargs sed -i 's/[ \t]\+$//'
find . -type f | grep "\.dtsi$" | xargs sed -i 's/[ \t]\+$//'

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/24255
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agoipq40xx: ipqess: recover TX queue on watchdog timeout 24122/head
Denis Yarkovoy [Sun, 12 Jul 2026 07:34:57 +0000 (10:34 +0300)] 
ipq40xx: ipqess: recover TX queue on watchdog timeout

The current ipqess TX timeout handler only logs the timeout. If TX
completion interrupts are lost or left masked, descriptors can remain
pending indefinitely and the master Ethernet device stays wedged until a
reboot.

Log the TX ring indexes and interrupt state to make future failures
useful, then force the TX completion NAPI path to run and re-kick the TX
producer index. This gives the driver a chance to reclaim pending TX
descriptors and wake the queue instead of reporting the same watchdog
forever.

Signed-off-by: Denis Yarkovoy <dyarkovoy@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24122
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
5 days agoipq40xx: move ipqess driver source to files
Denis Yarkovoy [Sun, 12 Jul 2026 07:34:56 +0000 (10:34 +0300)] 
ipq40xx: move ipqess driver source to files

The ipqess driver is carried locally in OpenWrt and is not present in
upstream Linux. Move the driver sources out of the source-adding kernel
patch and into target/linux/ipq40xx/files/ so the local source is easier
to maintain.

Keep the kernel patch only for the upstream-style Kconfig, Makefile and
MAINTAINERS wiring, and refresh the dependent ipqess patches.

Use the void-returning platform driver .remove callback.

Signed-off-by: Denis Yarkovoy <dyarkovoy@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24122
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
6 days agokernel: set MACOSX_DEPLOYMENT_TARGET to host version 24251/head
Georgi Valkov [Wed, 15 Jul 2026 14:16:29 +0000 (17:16 +0300)] 
kernel: set MACOSX_DEPLOYMENT_TARGET to host version

Fix a warning interpreted as error when building the Linux kernel
on macOS host, by setting MACOSX_DEPLOYMENT_TARGET to the version
of the host. Fixes:

make[5]: Entering directory '/Volumes/test/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.18.38'
  HOSTCC  scripts/mod/modpost.o
scripts/mod/modpost.c:1719:9: error: 'strchrnul' is only available on macOS 15.4 or newer [-Werror,-Wunguarded-availability-new]
 1719 |                 sep = strchrnul(namespace, ',');
      |                       ^~~~~~~~~

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24251
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agorealtek: fix fan control for Plasma Cloud PSX28/ESX28 24248/head
Jonas Jelonek [Thu, 16 Jul 2026 07:04:51 +0000 (07:04 +0000)] 
realtek: fix fan control for Plasma Cloud PSX28/ESX28

Commit 82ddc472d722 ("realtek: dts: convert to upstream switch
notation") adjusted the switch description in the device tree to match
upstream. This was a correct change, however it broke the fan control
script for Plasma Cloud PSX28/ESX28 devices because it uses a
full-fledged platform device path including the switch node (because the
I2C is a child of the switch):

/sys/devices/platform/1b000000.switchcore/1b000000.switchcore:i2c@100c/i2c-4/4-002e/hwmon/

Since the mentioned change, this path doesn't exist anymore. Instead of
just changing the intermediate parts to match the DT structure again, do
not rely on that at all. Instead, use

/sys/bus/i2c/devices/4-002e/hwmon/

as the path which relies less on the DT structure and still points to
the same device. This makes fan control on those device work again,
reducing the fan speed during boot which has been broken since the
commit.

Fixes: 82ddc472d722 ("realtek: dts: convert to upstream switch notation")
Fixes: 2b5555c1950d ("realtek: rtl931x: Add support for Plasma Cloud PSX28 Switch")
Link: https://github.com/openwrt/openwrt/pull/24248
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
6 days agoairoha: an7583: fix AN7583 PCS port count
Robert Marko [Thu, 16 Jul 2026 12:27:41 +0000 (14:27 +0200)] 
airoha: an7583: fix AN7583 PCS port count

The AN7583 PCS match data does not initialize num_port. This leaves it at
zero, so probe allocates a zero-sized ports array and a later PCS lookup
returns a pointer derived from NULL.

Set the number of ports for each AN7583 PCS instance. Also reject
out-of-range PCS indices defensively.

Fixes kernel crashing on boot once ethernet starts probing on AN7583.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>