Commit Graph

65879 Commits

Author SHA1 Message Date
Tianling Shen 3a35a2cff1 rockchip: backport dts updates for rk3576
Backport core dts updates for rk3576.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20041
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-02 22:42:35 +02:00
Tianling Shen 0a6ed6db26 rockchip: backport driver updates for rk3576
Backport clk/phy/rng/ufs/usb driver updates for rk3576.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20041
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-02 22:42:34 +02:00
Tianling Shen cf4365e767 rockchip: use per-SoC defined kernel loadaddr
The FIT loadaddr on RK3308/RK3566/RK3568/RK358x is 0x02000000
instead of 0x02080000, while on RK3576 it's 0x42000000, which is
quite different from the former SoCs and incompatible with current
kernel loadaddr value.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20041
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-02 22:42:34 +02:00
Tianling Shen 5c724939c3 rockchip: add DEVICE_DTS_DIR definition
Avoid duplicating `rockchip/` prefix when specifying dts path.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20041
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-02 22:42:34 +02:00
Jonas Jelonek 272a392fe1 realtek: rtl93xx: replace pending I2C patches with upstreamed patches
Replace the pending I2C backport patches for RTL93XX added in
44655c97bb with the upstreamed variants. The patches have been accepted
upstream in the meantime and are included in v6.17 or v6.18.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20273
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-02 13:52:24 +02:00
Felix Fietkau 727d8b27ab wifi-scripts: retry setup of wireless devices that show up late
When a phy appears after setup has already been attempted, tell netifd
to retry setup for all failed wireless devices.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 13:30:31 +02:00
Felix Fietkau 915a57ccd9 netifd: send event after running wireless handler
This can be used by other services to trigger reconfiguration, or detect when
PHY renaming has been performed.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 11:04:38 +02:00
Felix Fietkau 42b5cf24a8 procd: update to Git HEAD (2025-10-02)
ace5f272e139 service: fix use-after-free on service data update
94bfb9cf4238 service: implement set_data ubus method
cb40d082b126 service: send ubus notifications for event triggers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 11:04:10 +02:00
Felix Fietkau 8c399b4905 wifi-scripts: ucode: only set a hostapd config if it has interfaces
Do not pass invalid configs to hostapd.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 10:47:34 +02:00
Felix Fietkau 4b7323e3bf netifd: always call setup for disabled radios
Ensures that renaming is handled properly. For disabled radios, setup is
performed with an empty list of interfaces.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 10:47:34 +02:00
Sven Eckelmann 3adb820779 realtek: rtl931x: Add SPI_CTRL0 as pinmux
The RTL931x has next to its SPI flash controller a SPI master interface. It
is connected to

* SPI_CS#[1,0]: AH22 , AK22 (aka: GPIO 12, 11)
* SPI_CLK:      AL23 (aka: GPIO 8)
* SPI_MISO:     AM23 (aka: GPIO 9)
* SPI_MOSI:     AL22 (aka: GPIO 10)

It is not the same as the SPI flash controller which uses pins:

* SPI_CS#[1,0]: B24, A24
* SPI_SCLK:     A23
* SPI_SDI/SIO0: B21
* SPO_SDO_SIO1: B21
* SPI_SIO2:     A22
* SPI_SIO3:     B22
* SPI_RSTN:     B23

As shown above, the SPI master controller shares its pin with GPIO 8, 9,
10, 11, 12. In some upcoming devices (like the Plasma Cloud PSX28/ESX28),
they will be used for SFP cage signaling. These pins must therefore be
switched manually to the GPIO mode.

The SPI_CTRL0 register provides all necessary configuration to enforce the
GPIO mode of the pins. And until more requirements (and a correct driver)
for the SPI master controller arise, it is therefore possible to use
pinctrl-single to configure it using the devicetree.

Previously the ethernet driver did configure the SPI master controller for
31.25 MHz. It is unknown for which kind of device this was originally made
and what was actually connected there. But this manual write to the
register conflicts potentially with the write of the pinctrl driver to the
same register. Luckily, we don't need this SPI speed configuration in the
ethernet driver. Still, to allow this device an easy migration, the
`spi0-31mhz` configuration was already prepared.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20263
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-02 10:30:16 +02:00
Felix Fietkau 50c51504fd mediatek: fix polarity of user button on openwrt-one
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-02 09:54:32 +02:00
Florian Maurer ab50b9a561 mac80211: ath: improve ath10k "failed to flush transmit queue" errors
Currently, in busy environments, ath10k logs "failed to flush transmit
queue" errors and have a spiking CPU usage, making the wireless barely
usable.
With this patch, taken from https://patchwork.kernel.org/project/linux-wireless/patch/20250806070005.1429-1-hujy652@gmail.com/
this does not occur in normal operation and the wifi is much more stable

Supersedes #19427
Ref: https://github.com/openwrt/openwrt/issues/15929#issuecomment-2227391307
Ref: https://github.com/openwrt/openwrt/issues/14965

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/19529
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-01 22:15:13 +02:00
Josef Schlehofer fca63d04b5 libunwind: enable it to all targets
This commit will enable building for riscv64
and maybe for other platforms such as mipsel64.

Suggested-by: Rosen Penev <rosenp@gmail.com>
in https://github.com/openwrt/openwrt/pull/3871#issuecomment-778987028

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20193
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-01 20:23:42 +02:00
Josef Schlehofer 1e00160a8f libunwind: avoid using $(PKG_NAME) in PKG_SOURCE_URL
If there is used $(PKG_NAME) in PKG_SOURCE_URL,
then it can not be copy&pasted to the browser's address bar.

Let's remove $(PKG_NAME) and use hardcoded project name
in the PKG_SOURCE_URL

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20193
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-01 20:23:42 +02:00
Josef Schlehofer be6567276c libunwind: update to version 1.8.3
Release notes:
https://github.com/libunwind/libunwind/releases/tag/v1.8.2
https://github.com/libunwind/libunwind/releases/tag/v1.8.3

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20193
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-01 20:23:42 +02:00
Daniel Golle 8f4f7cce76 firmware-utils: revert commit breaking x86 MBR images
0782d24 Revert "ptgen: do not create stub partition to fill a gap if gap caused by alignment"

Fixes: #20254
Fixes: c5ece837a3 ("firmware-utils: update to git HEAD")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-10-01 16:44:43 +01:00
Felix Fietkau a60bc69acd netifd: update to Git HEAD (2025-09-30)
c3bf8fd913a4 interface: fix reload for devices that point to vlan aliases
22216cac7c94 bridge: fix reload when ports refer to aliased vlans on another bridge
ecca21ca07dd system: add logging wrappers for basic system functions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-01 10:08:54 +02:00
Felix Fietkau 3d8d525b21 wifi-scripts: ucode: add support for setting Multi-AP profile/vlanid
Required for Profile-2 support.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-01 10:08:54 +02:00
Felix Fietkau d32e051b69 wpa_supplicant: report interface events and support querying interface status
Makes information like Multi-AP status (including VLAN ID) accessible

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-01 10:08:54 +02:00
Felix Fietkau f6fd18eb60 wpa_supplicant: include multi-ap status in interface state
This can be used to read the Multi-AP profile and default VLAN ID

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-01 10:08:54 +02:00
Felix Fietkau 5e7113b3db wpa_supplicant: do not wait for notify completion
There is no callback, so no use tracking the request status.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-01 10:08:54 +02:00
Sven Eckelmann 263721dd0a realtek: rtl930x: Fix Plasma Cloud PSX8/PSX10 copper phy-mode
The RTL8224 used by Plasma Cloud PSX8/PSX10 is not using USXGMII but
USXGMII 10G-QXGMII mode. The correct phy-mode string for this is
"10g-qxgmii".

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20239
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-30 20:12:27 +02:00
Sven Eckelmann 4481e0c91d realtek: Work around missing 10g-qxgmii PHY mode
The current SerDes implementation for RTL931x handles 10G-QXGMII via the
"usxgmii" PHY mode. This is not 100% correct because it is not a single
port with 10G (max) but 4 ports with 2.5G each.

To allow setting of the "10g-qxgmii" phy mode, just change the code for now
to use the same codepaths as USXGMII. This has to be cleaned up further
during the SerDes driver rewrites.

Suggested-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20239
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-30 20:12:27 +02:00
Sven Eckelmann 657b61be2e realtek: rtl931x: Enable REALTEK_PHY for RTL8224 support
The Plasma Cloud PSX28 and ESX28 are using RTL8224 as ethernet PHY. This
phy works perfectly fine on PSX8/PSX10 (RTL930x) but failed to establish a link
on rtl931x because the upstream realtek phy driver was not enabled.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20239
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-30 20:12:27 +02:00
Felix Fietkau 1a79345b5d hostapd: skip add call on already present MLD interfaces
Avoid tearing down running interfaces

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-30 16:44:20 +02:00
Chuanhong Guo 996e4cb506 uboot-mediatek: rax3000m: use ddr3-1866mhz built in the dependency
The u-boot of cmcc_rax3000m_*-ddr3 declares a dependency on
trusted-firmware-a-mt7981-*-ddr3-1866mhz, while actually packages
the normal BL2. This causes build failure if the the non-1866m
variant isn't built.
According to the previous commit, it's intended to use the lower
frequency variant to fix device stability issues. Correct
BL2_DDRTYPE as intended.

Fixes: 028050da69 ("mediatek: CMCC RAX3000Me: fix stability issues")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2025-09-30 21:12:06 +08:00
Paul Spooren 16416782f1 include: make APK packing mtime reproducible
APK kindly stores the mtime of each containing file in created packages,
breaking reproducibility. As a fix, touch all files of the package with the
timestamp of PKGSOURCE_DATE_EPOCH, which contains the timestamp based on the
last package modification.

Over at OPKG, something similar is done by setting mtime in the tar command,
see the `ipkg-build` script.

To tackle this in APK directly, some changes are suggested. However until this
is merged, we should fix it downstream.
https://gitlab.alpinelinux.org/alpine/apk-tools/-/merge_requests/348

Signed-off-by: Paul Spooren <mail@aparcar.org>
2025-09-30 14:48:13 +02:00
Daniel Golle c68a41818e rpcd: update to git HEAD
d4fa147 rpc-sys: packagelist: handle ABI versions in apk world properly

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-09-30 12:41:58 +01:00
Rosen Penev 6157a2aeb9 ath79: replace various mtd_get_mac_text
Deprecated. Replaced with nvmem.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20176
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-30 11:21:18 +02:00
Rosen Penev cbdc2b851e ath79: dir-8x5: use nvmem
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20176
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-30 11:21:18 +02:00
Rosen Penev bd2e17c180 ath79: dir-505: use nvmem
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20176
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-30 11:21:18 +02:00
Rosen Penev 6c20daed13 ath79: tew-673gru: use nvmem
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20176
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-30 11:21:18 +02:00
Markus Stockhausen b49f9d9804 realtek: backport ECC driver
Upstream will get support for the Realtek ECC engine with 6.18.
To make use of this in Openwrt

- backport upstream patches
- change config so that ECC will be built for nand subtargets
- define ECC engine in RTL93xx DTS.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19746
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-30 11:15:26 +02:00
Issam Hamdi 36d8d19993 realtek: rtl931x: set hash_msb based on VLAN ID when adding a new L2 entry
During testing, we discovered that when adding a new offload FDB rule
on certain VLANs and then delete it, does not work as expected.

Steps to Reproduce:

* Create VLAN 4094 on the port lan1:

      bridge vlan add vid 4094 dev lan1 pvid

* Add a new FDB entry on port lan1 for VLAN 4094:

      bridge fdb add 00:01:02:22:33:44 dev lan1 vlan 4094 master permanent

* Delete the new FDB entry on port lan1 for VLAN4094

      bridge fdb del 00:01:02:22:33:44 dev lan1 vlan 4094 master permanent

Root Cause:

The failure occurs because the hash_msb flag is not set correctly
based on the VLAN ID when adding a new L2 entry.

Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20183
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-29 20:55:22 +02:00
Sven Eckelmann 8c82e2dc93 realtek: Switch booleans in rtl838x_l2_entry to single bits
In upstream kernel, it is not well received to use a lot of simple booleans
in structs. It is preferred to use 1-bit bitfields [1] and consolidate the
booleans together.

[1] https://www.kernel.org/doc/html/v6.16/process/coding-style.html#using-bool

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20183
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-29 20:55:22 +02:00
Bjørn Mork d22b57e1e4 realtek: add phy-handle for Zyxel GS1900-10HP SFP slots
Align GS1900-10HP dts with other realtek devices to reduce the risk of device
specific regressions with the upcoming driver cleanup/rewrite.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/20228
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-29 20:54:19 +02:00
Bjørn Mork e2dad927a8 realtek: fix Zyxel GS1900-10HP SFP slots
Parse the pcs-handle property regardless of phy-handle

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/20228
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-29 20:54:19 +02:00
Daniel Golle 318f07c231 ath79: mikrotik: check RouterBOOT version matching sysupgrade image
Check if the uploaded image matches the version of RouterBOOT before
proceeding with sysupgrade on MikroTik devices with NOR flash.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-09-29 17:34:51 +01:00
John Thomson 502e6253a1 ath79: mikrotik: generate a RouterBOOT v7 NOR compatible sysupgrade
RouterBOOT v7 for NOR devices does not support the historic yaffs
"kernel" ELF boot method.
Generate a compatible kernel

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2025-09-29 17:34:51 +01:00
John Thomson 7276e28e47 ramips: mikrotik: generate a RouterBOOT v7 NOR compatible sysupgrade
RouterBOOT v7 for NOR devices does not support the historic yaffs
"kernel" ELF boot method.
Generate a compatible kernel

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2025-09-29 17:34:51 +01:00
John Thomson 99cfba0721 ipq40xx: mikrotik: generate a RouterBOOT v7 NOR compatible sysupgrade
RouterBOOT v7 for NOR devices does not support the historic yaffs
"kernel" ELF boot method.
Generate a compatible kernel

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2025-09-29 17:34:51 +01:00
John Thomson 097049552a image: adapt mikrotik yafut to allow switch to bootimage YAFFS path
Adjust the YAFFS file path written depending on the sysupgrade
filename.
Default to kernel (for ELF), switch to bootimage (for NPK) if image name
has v7.

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2025-09-29 17:34:51 +01:00
John Thomson f473d15816 build: add Mikrotik NOR RouterBOOT v7 image build
Add build step 'kernel-pack-npk' which uses 'npk_pack_kernel' which is now
part of firmware-utils to enable wrapping the kernel inside a MikroTik NPK
package.

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-09-29 17:34:51 +01:00
Daniel Golle c5ece837a3 firmware-utils: update to git HEAD
7e6f69b npk_pack_kernel: add tool for creating MikroTik NPK kernel packages
 d3f8b6e zynsig: add new tool for creating images for the ZyXEL GS1920 series
 9fa340d ptgen: create separate images for gpt data structure
 78d8084 ptgen: allow image generation for a specified disk size
 3f2d148 ptgen: allow non-default placement of gpt entry table
 f1f98b0 ptgen: do not create stub partition to fill a gap if gap caused by alignment
 6ea8b6d ptgen: fix protective MBR partition size
 febfef7 ptgen: use long long instead of long for sizes
 996dc48 ptgen: fix misprint and simplify calculation a bit
 0725c3d build: require CMake >= 3.5 due to dropped legacy support

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-09-29 17:34:51 +01:00
Felix Fietkau 2f6a467f6c ucode: update to Git HEAD (2025-09-29)
f642f65c3d00 rtnl: optimize string attribute encoding
1946c571eb25 nl80211: rework string attribute encoding
6b16cd37373a nl80211: properly handle decoding numeric struct members
5a342b86c010 nl80211: support sending requests on listener socket
cd2850eec8ca lib: fix `rindex()` return value when needle at the start of the haystack
23b21eb2e8cb ubus: add connection functions to global scope
a5b206f60f5d struct: align `X` and `Z` length & truncation semantics with `*`
387880348c89 nl80211: read all pending event messages
470bc3ebffe0 uloop: fix potential use-after-free when destroying uloop entities

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-29 14:09:10 +02:00
Christian Marangi 1545173ec1
kernel: netdevices: fix typo for Aeonsemi AS21xxx description
Fix a typo on defining the PHY package kmod description that reference
phy-aeonsemi-as21x1x package instead of phy-aeonsemi-as21xxx.

Fixes: 08a616b216 ("generic: backport support for Aeonsemi AS21xxx PHY")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-09-29 13:56:33 +02:00
Felix Fietkau 0f56141c6c hostapd: add new ubus method for performig channel switch
This is a replacement for the bss based function, which cannot be used for MLO.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-29 13:41:06 +02:00
George Tsiamasiotis 75ca6bafd6 scripts/patch-kernel.sh: do not try to check files after patch
Since we are not using patch -b, *.orig files are only created when
there are conflicts, or never according to posix patch.

As such, it doesn't really make sense to always delete *.orig files
presuming they are patch backups, even if they are patch backups.
Doing so is both deleting potentially useful information for failed
patch applications and creating hard to diagnose bugs [1].

In a similar vein, checking for *.rej files does not add any value
since we're already checking the patch command's return code.

[1]: https://github.com/openwrt/packages/issues/27485

Signed-off-by: George Tsiamasiotis <george@tsiamasiotis.gr>
Link: https://github.com/openwrt/openwrt/pull/20141
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-29 13:33:07 +02:00
Felix Fietkau 973cfbadf5 hostapd: fix condition for re-creating MLD interfaces
Check the correct interface in order to avoid tearing down an existing
itnerface.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-29 12:37:02 +02:00