Dimitri Souza [Fri, 26 Jun 2026 22:59:43 +0000 (19:59 -0300)]
mediatek: acer-predator-w6x: add LED boot status support
Define led-boot, led-failsafe, led-running, and led-upgrade in the
Acer Predator W6X DTSI so the system LED reflects the standard OpenWrt
boot and runtime states.
David Yang [Fri, 1 May 2026 17:43:00 +0000 (01:43 +0800)]
ramips: timecloud: fix LED configs
The LED(s) does not have a label for status, ethernet, or whatsoever.
These two LEDs, are used to form one dual-color indicator. On vendor
firmware, the light is turned from orange to white, when external
storage is detected and ready to use. However, if we use white for any
other triggers (USB / SD card / ethernet), it is difficult to see while
the orange is on. Thus, we change led-running to white to indicate a
successful startup.
Also add the missing pinmux config for uart3 since LEDs take GPIO 7 and
8.
Florian Maurer [Sun, 31 May 2026 21:04:41 +0000 (21:04 +0000)]
wifi-scripts: ucode: check wpa_supplicant exists before mesh probe
The mesh capability check unconditionally ran wpa_supplicant -vmesh to
detect driver support. On devices where wpa_supplicant is not installed,
this produces a "/bin/sh: wpa_supplicant: not found" error in the logs
on every wifi reconfiguration even when no mesh interface is configured.
Guard the invocation with fs.access() so the binary is only executed
when it is actually present, and use its absolute path to avoid relying
on $PATH.
Florian Maurer [Sun, 31 May 2026 20:14:38 +0000 (20:14 +0000)]
wifi-scripts: ucode: only set antenna when config changes
mac80211's ieee80211_set_antenna() rejects calls with -EOPNOTSUPP once
the radio is started (local->started == true). The spurious failure
triggers a wpa_supplicant invocation in the error path, producing both
a "command failed: Not supported (-122)" message and (where wpa_supplicant
is not installed) a "/bin/sh: wpa_supplicant: not found" message in the
log on every wifi reconfiguration.
In this code path, reset_config() tears down all interfaces before the
antenna is touched, so local->started is false exactly when the antenna
config has changed. Skip the iw phy set antenna call otherwise, matching
the behaviour of mainline OpenWrt's bash mac80211.sh. The trade-off is
that we no longer re-assert the antenna mask on warm reconf if it was
cleared out-of-band (e.g. by a driver reload); in practice drivers do
not clear it mid-life.
Also split the antenna details out of the generic "Configuring '${phy}'
distance: ..." log line so it isn't claimed when the call was skipped.
Fil Dunsky [Fri, 5 Jun 2026 14:53:45 +0000 (17:53 +0300)]
mediatek: add support Livinet Li320
This commit adds support for Livinet Li320 wireless router.
Specification
-------------
- SoC : MediaTek MT7981B dual-core ARM Cortex-A53
- RAM : 512MB
- Flash : SPI-NAND Fudan Micro FM25S01BI3
- WLAN : MediaTek MT7976 dual-band Wi-Fi 6
- Ethernet : MediaTek MT7531 switch, 1x WAN + 3x LAN (2.5GbE uplink via gmac0)
- Buttons : WPS, Reset
- LEDs : 8xGreen, 1xRed
- Power : Barrel DC 12v
Installation
------------
The factory firmware is a compatible OpenWrt-based fork, allowing
direct installation via the LuCI upgrade page using the sysupgrade image.
MAC addresses
-------------
| Interface | MAC source |
|-----------|--------------------------|
| LAN | Factory 0x4 (mac-base -1)|
| WAN | Factory 0x4 (mac-base -2)|
| WLAN 2.4G | Factory 0x4 (mac-base) |
| WLAN 5G | Factory 0x4 (mac-base +1)|
Grische [Wed, 17 Jun 2026 12:09:18 +0000 (14:09 +0200)]
rockchip: add support for FriendlyARM NanoPi R2S Plus
The NanoPi R2S Plus is a NanoPi R2S with on-board eMMC added. The device
tree (rk3328-nanopi-r2s-plus.dts) is already present in kernel 6.12, and
U-Boot support has been present since v2025.01, so neither a kernel DTS
backport nor a U-Boot patch is required.
Hardware
--------
Rockchip RK3328 (4x Cortex-A53, up to 1.4 GHz)
1GB DDR4 RAM
32GB eMMC 5.1
microSD slot (up to 128GB)
1x 1000 Base-T (native, RTL8211F via GMAC) - WAN
1x 1000 Base-T (USB 3.0, RTL8153B) - LAN
Optional M.2 SDIO Wi-Fi
2x USB 2.0 Type-A host
1x USB-C (5V power input, USB device for Maskrom update)
1x USB-C (onboard USB-to-UART debug console, 1500000 bps)
1x serial debug header / UART0 (3.3V TTL, 3-pin 2.54mm)
2 Buttons (GPIO key, Maskrom)
3 LEDs (SYS red, WAN green, LAN green)
DC 5V/2A power
Operating temperature 0 to 70 C
The MAC addresses are derived from the eMMC CID, so they are stable
regardless of whether the device boots from microSD or eMMC.
Installation
------------
On RK3328 the BootROM boots the eMMC before the microSD slot, so the
Maskrom button must be held to boot from microSD while stock firmware is
still on the eMMC.
How to boot from eMMC:
1. Write the uncompressed sysupgrade image to sdcard
2. Hold the "Mask" button while powering on the device
3. Wait until OpenWrt is fully booted
4. Copy the compressed .gz sysupgrade image to the machine's /tmp folder using scp
5. Run: gunzip -c /tmp/openwrt-...-friendlyarm_nanopi-r2s-plus-squashfs-sysupgrade.img.gz | dd of=/dev/mmcblk1 bs=4M conv=fsync
6. Power the device off, remove the sdcard and power it back on
Tested:
- microSD boot (via Maskrom button) and native eMMC boot
- Both Ethernet ports (RTL8211F WAN, RTL8153B LAN)
- eMMC-derived MAC addresses
Signed-off-by: Grische <github@grische.xyz> Assisted-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Link: https://github.com/openwrt/openwrt/pull/23854 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Mikhail Zhilkin [Sat, 23 May 2026 14:42:33 +0000 (17:42 +0300)]
airoha: add support for Nokia XG-040G-MD
This commit adds support for Nokia XG-040G-MD XG-PON ONU.
Specification
-------------
- SoC : Airoha AN7581DT Quad-core ARM Cortex-A53 1.2 GHz
- RAM : 512 MiB DDR4 (ESMT M16U4G16256A-QLB)
- Flash : SPI-NAND 256 MiB (SkyHigh ML02G300WHI00)
- WLAN : -
- Ethernet : 1x 2500 Mbps (LAN1, Airoha EN8811HN)
3x 10/100/1000 Mbps (LAN2-LAN4, Airoha AN7581 SoC switch)
- XG-PON : ECONET EN7572AN, SLIC: MaxLinear PEF32001VSV12
- USB : 1x USB 3.0 (with power control via gpio)
1x USB 2.0 (with power control via gpio)
- Buttons : Reset
- LEDs : 1x Power (green, gpio-controlled)
1x WAN (green, gpio-controlled)
1x WAN (red, gpio-controlled)
4x LAN (green, gpio-controlled)
2x USB (green)
- Power : 12 VDC, 1 A
Unsupported functions and limitations
-------------------------------------
1. XG-PON won't be available after installing OpenWrt.
Installation (stock layout, 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
I was unable to download the file without errors, the bootloader network
driver is very unstable. Perhaps you will be more fortunate.
Backup and installation (stock layout, 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-MD 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 (stock layout)
-----------------------
The same as described in Installation (UART).
Return to stock (stock layout)
------------------------------
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
Notes (OpenWrt U-Boot layout)
-----------------------------
1. Only devices with SkyHigh ML02G300WHI00 spi-nand are supported. Driver
for FudanMicro FM25G02B is absent in current U-Boot.
2. A simple installation without serial console is also possible using a
fork of @dangowrt's UBI Installer Link: https://github.com/dangowrt/owrt-ubi-installer
Installation / recovery (OpenWrt U-Boot layout)
-----------------------------------------------
1. Make sure that you have 'bosa' and 'ri' partitions mtd backups before
you start
2. Place OpenWrt images on the tftp server (IP: 192.168.1.254):
openwrt-airoha-an7581-nokia_xg-040g-md-ubi-bl31-uboot.fip
openwrt-airoha-an7581-nokia_xg-040g-md-ubi-initramfs-recovery.itb
openwrt-airoha-an7581-nokia_xg-040g-md-ubi-preloader.bin
3. Attach serial console and start terminal with XMODEM support:
picocom -b 115200 --send-cmd "sx -vvX" /dev/ttyUSB0
4. Push reset button and power on the router
5. Press 'x', then 'Ctrl + A' and 'Ctrl + S'
6. Paste full path to the bl2 image:
'openwrt-airoha-an7581-nokia_xg-040g-md-ubi-preloader.bin'
7. Wait until the file is downloaded and the following prompt appears:
Press x to load BL31 + U-Boot FIP
8. Press 'x', then 'Ctrl + A' and 'Ctrl + S'
9. Paste full path to the fip image:
'openwrt-airoha-an7581-nokia_xg-040g-md-ubi-bl31-uboot.fip'
10. Wait until the file is downloaded, u-boot will prepare ubi partition
automatically
11. Wait for U-Boot menu
12. Run 'Load BL31+U-Boot FIP via TFTP then write to NAND'
13. Run 'Load BL2 preloader via TFTP then write to NAND'
14. Run 'Boot system via TFTP'
15. Once in OpenWrt perform standard sysupgrade
16. Once in OpenWrt upload 'bosa' and 'ri' partitions mtd backups to the
/tmp dir using scp protocol
17. Check ID of the UBI volumes:
ubinfo -d 0 -N bosa | grep "Volume ID"
ubinfo -d 0 -N ri | grep "Volume ID"
18. Write backups according to the volume ID:
ubiupdatevol /dev/ubi0_2 /tmp/bosa.bin
ubiupdatevol /dev/ubi0_3 /tmp/ri.bin
19. Reboot:
reboot
USB power control
-----------------
Disable (both ports):
echo disabled > /sys/devices/platform/usb-power/state
Enable (both ports):
echo enabled > /sys/devices/platform/usb-power/state
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 | 04:xx:xx:xx:xx:0d | label |
| WAN | 04:xx:xx:xx:xx:0e | label + 1 |
+---------+-------------------+-----------+
The LAN MAC (hex) was found in 'ri', 0x3e
Mikhail Zhilkin [Sat, 6 Jun 2026 12:08:36 +0000 (15:08 +0300)]
uboot-airoha: add support for Nokia XG-040G-MD
Add support for Nokia XG-040G-MD.
Known issues
------------
1. Reset button is currently doesn't work and cannot be used to start
tftp recovery:
Button 'reset' not found (err=-19)
LED 'green:power' not found (err=-19)
Reduce repetition in dcvs_manual, dcvs_get, vth_manual and tap_manual
by hoisting the per-channel enable bit write out of per-case branches
and encoding per-channel register/bit mappings as lookup tables where
the pattern is uniform across channels.
This also fixes two bugs in dcvs_get that were hidden in the switch:
- DCVS1 read never populated dcvs_sign_out; it wrote the sign bit read
(0x14[4:4]) into dcvs_coef_bin and then immediately overwrote it with
the coefficient read, leaving the sign always zero for that channel.
- DCVS3 assigned the manual bit read directly to a bool without the !!
normalisation applied to all other cases.
Jonas Jelonek [Sat, 27 Jun 2026 19:23:05 +0000 (19:23 +0000)]
realtek: pcs: rtl930x: fix LEQ calibration to use media type
Replace the mode-based approximation in the LEQ adapt+lock step with
proper media-based logic using the newly stored sds->media field. Those
adjustments are based on SDK code and digging through some basics of
signal conditioning.
PCB connections route through an external PHY (PHY-attached); that PHY
handles its own equalization so the SerDes LEQ is left in free-running
auto-adapt with no correction offset. DAC and fiber SFP connect directly
to the SerDes without an intermediate PHY and require a calibrated lock.
Replace the SDK's dacLongCableOffset/eqHoldEnable variable pair with a
single direct_serdes bool and encode the full per-media LEQ correction
into one switch: fiber +3 (direct SerDes, no cable), DAC short +4
(base 3 + 1), DAC long +6 (base 3 + 3).
Fix the MAXHOLD_EN bit (0x17[7]) and the 0x0c[8] write to be gated on
direct_serdes; both were previously conditioned on PCB which is the
PHY-attached case and thus wrong. Fix the LEQ lock to apply to all
direct SerDes connections (DAC + fiber), not just PCB. Also drop the
spurious dead-code branch that was an artifact of the original
transplanting.
No behavioral change because this particular function of calibration is
not used right now but will be in the future.
Jonas Jelonek [Sat, 27 Jun 2026 17:50:12 +0000 (17:50 +0000)]
realtek: pcs: store active media type in SerDes state
Track the resolved media type in struct rtpcs_serdes alongside hw_mode,
storing it as soon as rtpcs_sds_select_media() resolves it so all
subsequent ops (set_hw_mode, activate, post_config) can access it.
This is unused for now and will be used only in dead code in next
patches. Though, this dead code is going to be used with subsequent
patches.
Jonas Jelonek [Sat, 27 Jun 2026 17:25:02 +0000 (17:25 +0000)]
realtek: pcs: rtl930x: give some calibration functions meaningful names
Adapted from the SDK, the calibration functions are just named after
their sequential logic and with a numbering scheme. This doesn't help
understanding what the code is doing. Instead, give some of them
meaningful names where possible, revealing kind of a logical structure.
The calibration code is deeply nested with multiple function using
numeric nesting. Though it tries to follow the SDK pattern, this makes
it just unnecessarily complex and confusing. Dissolve some of this
unneeded nesting, together with some minor cleanup here and there.
The RTL8367S-VB (Family D) uses a software-emulated VLAN MC table
(emu_vlanmc) since it lacks hardware support for the VLAN MC registers
used by earlier chips.
- Add missing NULL check after kzalloc() in rtl8367b_init_regs() to
prevent NULL pointer dereference on allocation failure.
- Add missing kfree(smi->emu_vlanmc) in rtl8367b_remove() to prevent
memory leak on driver unload.
Patches removed due being upstreamed:
- 007-add-libeu-symbols-to-libelf.patch
- 008-fix-autoconf-ENABLE_IMA_VERIFICATION.patch
- 009-fix-null-dereference-with-lto.patch
- 102-fix-potential-deref-of-null-error.patch
Note that this release is needed in order to build against GCC 16.1
https://github.com/openwrt/openwrt/pull/23194
Release notes from 0.192 to 0.195:
https://inbox.sourceware.org/elfutils-devel/CAJDtP-RjuT13zehLgSvz9TnwQZ1VYPOS=q_kuut5a2g+KLamgw@mail.gmail.com/T/
https://inbox.sourceware.org/elfutils-devel/CAJDtP-S0rYAOZQeDZvMtPkQztgK9RboWtYwpqNLCNGNdaSGn-A@mail.gmail.com/T/
https://inbox.sourceware.org/elfutils-devel/CAJDtP-Qok4ViNzvrr28WgkCCqrFH0iAZStiD8C7nbpDhrPzLWA@mail.gmail.com/T/
All the layer 3 device specific functions and attributes currently
live in the DSA driver. Add a configuration structure to the layer
3 code. For now provide and fill a dummy value. It will be replaced
with meaningful data with the next patches.
This commit removes unnecessary pinctrl nodes for the PHY LEDs. The LEDs are
controlled directly via GPIO pins. Alternate function of gpio33/34 is CTS/RTS
for UART2. It looks like this pinctrl is somehow conflicting with HSUART. This
is likely an errata in the early silicon revision. HSUART is connected to GPS.
The comment incorrectly states that the PHY driver doesn't attach. The driver
attaches correctly, the only drawback is a warning in the log.
Warning:
[ 10.463371] mdio_bus mt7530-0: Failed to setup PHY LED pinctrl
[ 10.494230] mdio_bus mt7530-0: Failed to setup PHY LED pinctrl
[ 10.926028] mt7530-mmio 1fb58000.switch: configuring for fixed/internal link mode
[ 10.933640] mt7530-mmio 1fb58000.switch lan3 (uninitialized): PHY [mt7530-0:09] driver [Airoha AN7581 PHY] (irq=50)
[ 10.944890] mt7530-mmio 1fb58000.switch lan4 (uninitialized): PHY [mt7530-0:0a] driver [Airoha AN7581 PHY] (irq=51)
Fixes: 99307582dea2 ("airoha: add support for Gemtek W1700K") Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> Link: https://github.com/openwrt/openwrt/pull/23936 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Hauke Mehrtens [Sat, 20 Jun 2026 18:47:14 +0000 (20:47 +0200)]
ead: fix compilation with GCC 15
GCC 15 defaults to C23, where an empty parameter list "()" means
"(void)" instead of an unspecified argument list. This broke two spots
in the bundled tinysrp sources:
- The interrupt() signal handler in t_truerand.c was declared with
"()", so its type became "void (*)(void)" and no longer matched the
"void (*)(int)" expected by signal():
t_truerand.c:100:32: error: passing argument 2 of 'signal' from
incompatible pointer type [-Wincompatible-pointer-types]
Give it the proper signal handler signature instead.
- The pre-ANSI fallback in t_defines.h declared strchr(), strrchr()
and strtok() with "()". ead.c is compiled without -DHAVE_CONFIG_H,
so STDC_HEADERS is undefined and that legacy branch is taken, where
the zero-argument prototypes now conflict with the declarations in
the standard headers:
tinysrp/t_defines.h:90:30: error: conflicting types for 'strtok';
have 'char *(void)'
Drop the dead K&R branch and include <stdlib.h> and <string.h>
unconditionally; the library's own objects already take this path
via config.h.
Hauke Mehrtens [Fri, 26 Jun 2026 22:42:11 +0000 (00:42 +0200)]
thc-ipv6: fix compilation with GCC 15
GCC 15 defaults to C23, where an empty parameter list "()" means
"(void)" instead of an unspecified argument list. This broke thc-ipv6 in
two ways:
- thc-ipv6.h declared thc_open_ipv6() with an empty argument list, so
its prototype became "int(void)" and conflicted with the actual
definition "int thc_open_ipv6(char *interface)" and all of its
callers:
thc-ipv6-lib.c:127:36: error: too many arguments to function
'thc_open_ipv6'; expected 0, have 1
thc-ipv6-lib.c:2555:5: error: conflicting types for 'thc_open_ipv6';
have 'int(char *)'
- The alarming() SIGALRM handlers in detect_sniffer6.c and thcping6.c
were declared with "()", so their type became "void (*)(void)" and no
longer matched the "void (*)(int)" expected by signal():
detect_sniffer6.c:140:19: error: passing argument 2 of 'signal'
from incompatible pointer type [-Wincompatible-pointer-types]
Add patches giving the prototype and the signal handlers their proper
signatures.
Hauke Mehrtens [Fri, 26 Jun 2026 22:51:21 +0000 (00:51 +0200)]
rtl8812au-ct: fix compilation with GCC 15
GCC 15 enables -Wheader-guard and the kernel module build treats
warnings as errors, so the mismatched include guards in three driver
headers break the build:
include/rtl8812a_sreset.h:20: error: header guard
'_RTL88812A_SRESET_H_' followed by '#define' of a different macro
[-Werror=header-guard]
Add a patch making each '#ifndef' match its '#define'. rtl8192e_sreset.h
was a copy/paste of the rtl8812a guard, so it gets its own
'_RTL8192E_SRESET_H_' name instead of duplicating '_RTL8812A_SRESET_H_'.
Jonas Jelonek [Fri, 26 Jun 2026 09:32:34 +0000 (09:32 +0000)]
realtek: dsa: rtl93xx: allow to adjust LED_CLK
The LED_GLB_CTRL register has a field to select the clock used for LED
output, either for serial LED output or for the external auxiliary MDIO
to connect a RTL8231. While the default value for the period time of
400ns is the correct one for most applications, some special devices
require a dedicated setting, e.g. UniFi switches with Etherlighting.
Support the generic DT property "clock-frequency" within the LED node,
and read + apply during LED configuration. In case the property isn't
specified, no change is applied to keep previous behavior. In case an
unsupported value is supplied, the default is used as a fallback
Felix Fietkau [Fri, 26 Jun 2026 17:00:36 +0000 (19:00 +0200)]
wifi-scripts: fix disabled vif tracking using wrong dictionary key
wdev_update_disabled_vifs() indexed the disabled_vifs map with the wdev
object instead of the vif name. The map is read back via
disabled_vifs[vif.name], so disabled vifs were never matched, and
coercing the wdev object into a string key triggered an infinite
escaping loop in ucv_to_string_json_encoded() during state output,
causing OOM on reboot.
Suggested-by: Shayne Chen (陳軒丞) <Shayne.Chen@mediatek.com> Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.
For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
The DSA private structure provides an overwhelming mix of
information. L3 data is part of this. Provide a new separated
structure that is linked bidirectionally to the old data.
For the start it only contains a reference pointer and no L3
specific data.
The L3 code is manually initialized and finalized in the DSA
probe/remove functions. Relocate the code into seperate helpers
that encapsule all required steps. Make no longer exposed L3
functions static.
DSA is layer 2 and not layer 3. Nevertheless all routing management
needs a home. Separate it into its own source file. This first
step is far from perfect but at least it guides the DSA driver into
the right direction.
No functional changes. Just relocating, renaming and proper including.
Jonas Jelonek [Fri, 26 Jun 2026 10:08:43 +0000 (10:08 +0000)]
realtek: mdio: add polling setup support for RTL8264B
Add polling setup support for RTL8264B PHY to avoid 'skip polling'
message during boot. Rely on the default register values for polling for
now, similar to RTL8261.
Improve the DSA receive tagging. For this convert the receive path
to METADATA_HW_PORT_MUX. This way no skb data mangling is needed.
See e.g. airoha_eth.c or mtk_eth_soc.c.
This is just some reordering/simplifcation of the transmit path.
Relocate the port extraction into a separate helper for a smaller
xmit function. While we are here add some documentation and
reorder the tag and its contents. As these are only arbitrary
values that help the ethernet driver to identifiy the tag this
is just cosmetic.
When sending data packets the hardware expects data size plus 4
bytes for the layer 2 checksum (FCS). This does not count into
"bytes sent" metric. Fix that.
Jonas Jelonek [Sat, 20 Jun 2026 07:52:34 +0000 (07:52 +0000)]
realtek: pcs: replace hardcoded page values with named fields
Replace all hardcoded page values in various calls and definitions with
the previously added defines. This should help readability, giving those
various values a name and making it easier to compare and track within
the context of what is being set.
Jonas Jelonek [Sat, 20 Jun 2026 07:37:46 +0000 (07:37 +0000)]
realtek: pcs: add SerDes page definitions
To reduce having magic values all over the place in the whole driver,
add definitions for the SerDes register pages. They are equal among all
variants and can be clearly named, as already done in the debugfs output
of the realtek-otto-serdes-mdio driver. This should ease comparison,
code understanding and very likely is a step forward towards
upstream-readyness.
Also define two macros to cover the special cases for RTL931x's digital
SerDes via 0x40/0x80 page offset.
Fil Dunsky [Wed, 3 Jun 2026 18:18:20 +0000 (21:18 +0300)]
mediatek: add WD-R3000N-G2A as ALT device for Bazis AX3000WM
The Bazis AX3000WM is an OEM variant of the Shenzhen Jia Yan Technology
WD-R3000N-G2A (per EAEU certificate N RU Д-CN.РА04.В.23104/26). Hardware
is identical. Added for the owners of this device so they can find it
in firmware-selector.
xiao bo [Thu, 25 Jun 2026 11:20:49 +0000 (19:20 +0800)]
rockchip: backport upstream fix R76S SD suspend power loss
This patch is a full backport of Linux upstream commit a9c1acebfe0484343a443d082e039ca77186ed22
for rk3576-nanopi-r76s.dts device tree, resolving SD card power dropout in runtime suspend.
When runtime suspend is active, the SD power domain is shut down, wiping power control
registers and cutting card power. I/O recovery relies on mmc_blk_mq_rw_recovery(),
which results in poor performance and unstable card detection.
Implement GPIO-controlled vcc3v3_sd regulator and attach vmmc-supply to sdmmc node
to maintain SD power during suspend. Also add cd-gpios to guarantee working hotplug
when system enters idle/suspend state.
Modifications in DTS:
- vcc3v3_sd fixed regulator + sdmmc_pwren pinctrl
- vmmc-supply & vqmmc-supply for sdmmc bus power retention
- cd-gpios for SD card presence detection
Mikhail Zhilkin [Sun, 7 Jun 2026 10:04:39 +0000 (13:04 +0300)]
kernel: add support for FudanMicro FM25G01B and FM25G02B spi-nand
This commit adds support for FudanMicro FM25G01B and FM25G02B SPI NAND
chips. This is required to:
1. Fix bootloop on new revision of Keenetic KN-1812 and Netcraze NC-1812
(with FudanMicro FM25G02B SPI NAND)
2. Add Nokia XG-040G-MD support (device has either SkyHigh or FudanMicro
SPI NAND).
Shine [Fri, 12 Jun 2026 14:27:28 +0000 (16:27 +0200)]
scripts: dhcpv6: harmonize IAID between IA_NA and IA_PD requests
For DHCPv6 address requests (IA_NA), odhcp6c currently uses the first eight
digits of the i/f name's MD5 hash as IAID.
In case of DHCPv6-PD, however, odhcp6c expects the IAID to be specified
explicitly for the IA_PD(s) requested, otherwise it will start counting the
IAID from "1" up for each "-P" argument.
As OpenWrt only requests a single IA_PD per interface, make sure to pass
the identical IAID for IA_PD as is used for IA_NA, unless a custom IAID
was explicitly specified in the i/f configuration.
This prevents regressions with ISPs that expect an IA_PD request to come
from the same IAID+DUID combination as the IA_NA request.
In addition, add some validation of the "reqprefix" value, in order to
catch most cases that would otherwise result in netifd or odhcp6c
malfunction.
Installation / Flashing guide:
1. Power off the device.
2. Hold Reset button and power on to enter ASUS Restoration mode (slow flash LED).
3. Set your computer's static IP to 192.168.1.x (e.g., 192.168.1.10).
4. Upload the OpenWrt initramfs image via ASUS Restoration tool to 192.168.1.1.
5. Wait for the device to boot into the temporary OpenWrt environment.
6. Access LuCI (192.168.1.1) and flash sysupgrade image to make it permanent.
Robert Senderek [Mon, 9 Feb 2026 12:07:06 +0000 (13:07 +0100)]
mvebu: add support for Zyxel NAS326
-----
Hardware:
CPU: ARMADA 380 1x1332Mhz
RAM: 512MB DDR3
FLASH: 256MB MX30LF2G18AC
2x SATA III
2x USB3.0
1x USB2.0
i2c to control various states.
RTC with battery
1Gbit LAN (WoL capable)
9x LED
RESET button at back
Power button at front (gpio-poweroff)
Copy button at front
-----
Doesn't work
FAN control
buzzer
-----
UART connections
Connect UART to port J3 115200
+----+----+----+----+----+
|3.3V| TX | RX | | GND|
+----+----+----+ +----+
Depend of UART adapter board can fail to boot when adapter is attached. (all leds are dimmed) .
In that case disconnect UART for an < second and after that all leds should be white.
Stop u-boot by ctrl-c within 3s window. (bootdelay 7s or more helps)
setenv bootdelay 7
saveenv
Felix Fietkau [Fri, 19 Jun 2026 14:32:19 +0000 (16:32 +0200)]
base-files: derive DHCP DUID from device MAC address
The DUID-UUID was generated from a random UUID, which is regenerated on
every fresh flash and therefore does not survive reconfiguration events
such as reflashing without keeping the configuration. RFC8415/RFC6355
prefer a DUID that remains stable across such events.
Add a ucode helper that picks the first LAN port (falling back to WAN)
from /etc/board.json, resolves its MAC address and derives a stable UUID
from it, falling back to a random UUID only when that fails.
John Crispin [Thu, 16 Apr 2026 12:26:11 +0000 (14:26 +0200)]
netifd: expose udhcpc timeout/retry/tryagain UCI options in dhcp.sh
proto/dhcp.sh hardcoded `-t 0` (infinite retries) with no way
for UCI / operator to tune per-retry interval (udhcpc -T),
retry count (udhcpc -t) or failure retry-loop wait (udhcpc -A).
Add three new proto config ints (timeout, retry, tryagain)
and thread them into the udhcpc command line. Unset options
preserve existing behaviour: retry defaults to 0, timeout and
tryagain are omitted so udhcpc uses its own RFC defaults.
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
John Crispin [Thu, 12 Mar 2026 13:50:05 +0000 (14:50 +0100)]
lldpd: resolve bridge VLAN sub-interfaces to member ports
When bridge VLAN filtering is active, network_get_physdev resolves
UCI interface names to the VLAN sub-interface (e.g. br-lanv0) rather
than the bridge master. LLDP frames use reserved multicast
(01:80:c2:00:00:0e) which bridges trap to member ports, so lldpd
must listen on the physical ports to receive them.
Detect when the resolved device is a sub-interface of a bridge and
expand it to the list of bridge member ports instead.
Felix Fietkau [Wed, 17 Jun 2026 10:01:52 +0000 (12:01 +0200)]
procd: update to Git HEAD (2026-06-17)
9ff6e43bb75f service: notify instance exit details via ubus 4f42296dc4f0 jail: mount rootfs overlay with userxattr in user namespace 60fdbf00e924 jail: chown rootfs overlay dir to mapped root in user namespace