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
John Crispin [Tue, 17 Mar 2026 11:25:24 +0000 (12:25 +0100)]
wifi-scripts: make scan output fields conditional
Only print VHT/HE/EHT center frequency and channel width fields
when they are actually populated. This avoids displaying undefined
values for non-6GHz HE results where channel info is derived from
VHT/HT Operation IEs. Also fix center_chan_2 format specifier from
%s to %d.
John Crispin [Wed, 17 Jun 2026 08:44:57 +0000 (10:44 +0200)]
netifd: dhcp: add restart command for clean lease re-acquire
Add a proto_dhcp_restart() handler that re-acquires the DHCP lease via a
single ubus call, releasing the previous lease and triggering a fresh
DHCPDISCOVER without bouncing the interface.
The re-acquire is implemented by sending SIGHUP to udhcpc, which releases
the current lease (if any) and immediately transitions the state machine
to INIT_SELECTING so the next main-loop iteration sends a fresh
DHCPDISCOVER. A single signal thus expresses 'release this lease and get
a new one' without exiting the client, so upstream watchdogs (e.g. a
DNS-health monitor) can request a clean re-lease without tearing down the
interface.
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
John Crispin [Mon, 15 Jun 2026 08:50:16 +0000 (10:50 +0200)]
wifi-scripts: fix EAP STA support in supplicant config generation
The supplicant config generator read eap_type and auth from UCI for
internal logic but never wrote the corresponding eap= and phase2=
directives to the wpa_supplicant config.
Fix by:
- Generating eap= and phase2= from eap_type/auth for PEAP/TTLS/FAST/TLS
- Adding eap and phase2 to the network_append_vars output list
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
John Crispin [Tue, 17 Mar 2026 10:37:00 +0000 (11:37 +0100)]
wifi-scripts: fix HE Operation IE parsing in iwinfo scan
cell.he was only populated when the 6 GHz Operation Information
sub-element was parsed, making HE invisible to scan results on
2.4/5 GHz bands. Fix this by setting cell.he unconditionally when
HE Operation IE (Extension Element 36) is seen.
Gate 6 GHz channel width parsing on cell.band rather than the HE
Operation Parameters bit field, which proved unreliable on MediaTek
firmware. Fix flag byte offsets in the 6 GHz path: VHT Oper Info
Present (BIT 14) and Co-Hosted BSS (BIT 15) are in byte 1 of
he_oper_params which maps to ext[2], not ext[1].
For non-6GHz bands, derive channel width from the already-parsed
VHT/HT Operation IEs instead of leaving cell.he empty.
Felix Fietkau [Wed, 17 Jun 2026 08:40:30 +0000 (10:40 +0200)]
netifd: update to Git HEAD (2026-06-16)
abfaaac65929 netifd: fix const-discard warnings in attr/devtype parsing 52c7db3a2beb bridge: remove kernel member on teardown regardless of device claim state 741fd3c162df bridge: attempt delbr unconditionally on bridge destroy 2909720f8cf1 system-linux: detach device from stale bridge before adding it 67f06ef1600a interface: detach hotplug members on reassignment bb7f0a456dce interface-ip: skip offlink handling on point-to-point links c1f9d4df847a system-linux: guard PSE port priority for older kernel headers b087b0773366 build: prefer libnl-tiny and fix LIBNL detection on reconfigure b0063715d7ea device: add broadcast_flood bridge port setting 973354a1a6f0 interface: add carrier_loss_delay option d155e4cefbd9 interface: add restart support
Štěpán Dalecký [Fri, 5 Jun 2026 14:02:09 +0000 (16:02 +0200)]
mvebu: fix Turris MOX update
Turris MOX still upgrades from a legacy SD card image rather than
using the default sysupgrade path for cortexa53 devices.
Route image validation, upgrade handling and config backup through
the legacy_sdcard helpers so sysupgrade writes the correct image
format and preserves settings.
Igor Kravchenko [Sun, 21 Jun 2026 08:29:25 +0000 (11:29 +0300)]
qualcommbe: fold kernel fixes
Move the QCA8084 XPCS channel lookup fix into the SerDes speed config
patch, so qca8084_qxgmii_set_speed() walks the channel table with the
loop index from the start.
Move the PPE port reset loop fix into the PPE driver update patch, so
ppe_port_mac_reset() asserts and deasserts each reset control instead of
reusing the MAC reset for every iteration.
New kconfig symbols:
- ARM64_ERRATUM_4118414: enabled on ARM Cortex-A76 and newer targets.
- ARM64_ERRATUM_4193714: enabled on ARM C1-Pro and newer targets.
Rosen Penev [Sat, 20 Jun 2026 21:13:12 +0000 (14:13 -0700)]
kernel: use module_mtd_part_parser for mtdsplit
Remove boilerplate.
Also added deregister for bcm_wifi for consistency. Not needed as it's
builtin but still good to have.
There's a slight change from subsys_initcall to module_init. Not really
an issue for mtd drivers. No driver in linux upstream's drivers/mtd uses
subsys_initcall.
Kenneth Kasilag [Sun, 21 Jun 2026 23:26:43 +0000 (23:26 +0000)]
qualcommbe: fix pwm period calculation
During testing on the Askey SBE1V1K, it was noticed that only very low
PWM frequencies would work, and 100% duty cycles also did not work.
Comparing the proposed upstream pwm-ipq driver to the downstream vendor
driver, `ipq_pwm_apply()` fixed pwm_div at its maximum and derived only
pre_div from the requested period. Since the period spans
`(pre_div + 1) * (pwm_div + 1)` input clocks, pinning pwm_div near its
maximum forces pre_div towards zero for short periods: once pre_div
rounds to 0 the shortest representable period is
`(pwm_div + 1) / clk_rate` (~2.7 ms, i.e. ~366 Hz, at a 24 MHz clock),
and any shorter request is silently stretched to that. The high
duration then truncates to 0, so the output collapses to ~0% duty.
Since 4-wire fans commonly expect a ~25kHz PWM, it was effectively
unusable, since every duty cycle programs a ~zero high time.
Search for the (pre_div, pwm_div) pair whose period best approximates
the request instead of fixing pwm_div. Starting pre_div at the smallest
value that keeps pwm_div within its field and stopping once pre_div
exceeds pwm_div bounds the loop and keeps pwm_div as large as possible
for fine duty resolution. For a 25 kHz request at 24 MHz this selects
pre_div = 0, pwm_div = 959, giving full 0..960 duty resolution.
While reworking the high-duration computation, round it to nearest
rather than truncating, so mid-range duty cycles are not biased low, and
clamp it to pwm_div + 1. Rounding, or a 100% duty request, could
otherwise push hi_dur past the period length and overflow the 16-bit
HI_DURATION field.
Also compute hi_div in `get_state()` in 64-bit; `hi_dur * (pre_div + 1)`
can exceed 32 bits before the existing promotion.
Fixes: 01fb4a6daadb ("qualcommbe: update pwm patches and add missing symbol") Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me> Link: https://github.com/openwrt/openwrt/pull/23916 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Jonas Jelonek [Sun, 21 Jun 2026 14:07:39 +0000 (14:07 +0000)]
realtek: pcs: drop unused cmu_band code
For RTL930x and RTL931x, there were some functions to get and set the
CMU band. However, they were used nearly nowhere and even the SDK
doesn't use them for active SerDes configuration. Drop them to reduce
dead code.
Dropping the cmu_band_set call from RTL931x configuration has no
negative effect. We do not know where this call originally came from.
It was introduced 51c8f76612 ("realtek: improve MAC config handling for
all SoCs") but without any explanation why and where it came from. The
SDK doesn't have it and it may be overwritten again in the later CMU
setup when parts of the SerDes are reset.
Jonas Jelonek [Sun, 21 Jun 2026 10:53:59 +0000 (10:53 +0000)]
realtek: pcs: rtl931x: use xsg_write instead of open-coded pattern
The xsg_write operation for RTL931x already offers the correct procedure
writing to both page + 0x40 and page + 0x80. Though, this wasn't used
so far because this pattern was still open-coded where needed. Replace
that with the xsg_write helper call.
In clear_symerr, this deliberately changes the exact sequence of
operations a bit. However, this shouldn't have any practical effect and
testing shows no issues.
Jonas Jelonek [Sun, 21 Jun 2026 14:41:06 +0000 (14:41 +0000)]
realtek: pcs: rename 'determine_hw_mode' to 'select_hw_mode'
Rename the 'determine_hw_mode' to 'select_hw_mode' to better express
what the function does. Based on the requested interface, the number of
links on a SerDes and the capabilities, it selects a suitable hardware
mode. 'determine' is clunkier and less expressive in this case.
Jonas Jelonek [Fri, 19 Jun 2026 21:36:32 +0000 (21:36 +0000)]
realtek: pcs: add macro for USXGMII AN opcode
Instead of hardcoding the USXGMII AN opcode values and potentially
losing track of what they actually mean, add a define for them. Actually
only one is used, however the other one gets a macro too for
documentation purpose.
Sayantan Nandy [Fri, 19 Jun 2026 06:48:29 +0000 (12:18 +0530)]
airoha: account for L2 overhead in PPE MTU configuration
The PPE egress MTU register and WAN MTU register compare against L2
frame length without FCS, as confirmed by the hardware reset value of
0x05EA (1514 = ETH_HLEN + 1500).
Account for VLAN_ETH_HLEN when programming these registers to prevent
valid VLAN-tagged frames from being incorrectly dropped by hardware.
Rosen Penev [Sun, 21 Jun 2026 05:02:34 +0000 (22:02 -0700)]
kernel: fix wrong strlcat call
strlcat takes the total buffer size, not the remaining space.
Passing strlen(cmdline) + l caused it to truncate by one byte
when the appended string fit within the buffer.
This is also more consistent with the rest of the file.
Rosen Penev [Sat, 20 Jun 2026 20:21:46 +0000 (13:21 -0700)]
kernel: replace open-coded arithmetic in allocators
Dynamic size calculations in allocator arguments can overflow,
leading to undersized allocations. Replace with:
- kcalloc() for count * sizeof() patterns
- devm_kcalloc() for managed allocations
- array_size()/size_add()/size_mul() for complex cases
Rosen Penev [Sat, 20 Jun 2026 20:19:44 +0000 (13:19 -0700)]
kernel: replace BUG_ON/BUG with WARN_ON/WARN_ON
BUG() and BUG_ON() are deprecated - they destabilize the system
and make debugging impossible. Replace with:
- WARN_ON() + return error for assertion failures
- WARN_ON_ONCE() for bounds checks
- WARN_ON() + return -EPERM for in_interrupt() guards
Shine [Mon, 2 Feb 2026 22:06:44 +0000 (23:06 +0100)]
packages: arm-trusted-firmware-tools: fix build on musl host
Due to POSIX style ioctl() declaration in MUSL, arm-trusted-firmware-tools
fails to build on MUSL based hosts with -Werror and -pedantic GCC switches
enabled. Alpine Linux, for example, fixes this with an unconditional cast
to "int". This commit tries to apply this cast only for MUSL based build
hosts, while keeping the type as-is where the cast isn't needed. Maybe
overkill, but cleaner than an unconditional cast.
Ahmed Naseef [Fri, 19 Jun 2026 12:29:12 +0000 (16:29 +0400)]
econet: replace pending patches with upstream backports
The EN751221 clock/reset bindings and driver, along with the PCI bridge
window fix, have all been accepted upstream. Replace the downstream
patches with the exact versions merged upstream and add the kernel
version tag:
910: dt-bindings: clock, reset: Add econet EN751221 (v7.1, 35af99f7482673)
911: clk: airoha: Add econet EN751221 clock/reset support (v7.1, d8b034525fd954)
913: PCI: Prevent assignment to unsupported bridge windows (v7.1, 92427ab4378faa)