Commit graph

64713 commits

Author SHA1 Message Date
Felix Fietkau
254dd7d7d9 wifi-scripts: enable GCMP-256 by default on WPA3/OWE configurations with HE or EHT
GCMP-256 support is mandatory with EHT, but HE hardware can already be expected
to support it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-21 20:34:09 +02:00
Felix Fietkau
a17c3be409 wifi-scripts: on psk-sae configurations, disable PSK support on 6 GHz
This allows sharing a wifi-iface section across bands while enforcing the no-PSK
rule for 6 GHz

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-21 20:34:06 +02:00
Felix Fietkau
91a50b27bc unetmsg: make remote connection TCP timeout more aggressive
It is meant for reliable network connections, so requests should fail
early if a node goes down.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-21 17:12:46 +02:00
Thomas Richard
dd57c070e9 stm32: modules: add missing dependency for stm32-dfsdm-adc
Now on Linux 6.12, stm32-dfsdm-adc also depends on
kmod-industrialio-backend.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
74011c5c1c kernel: modules: iio: package industrialio-backend module
The stm32-dfsdm-adc module depends on it (kernel 6.12).

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
774a22e00e stm32: modules: add kmod-stm32-dcmipp package
Add kernel module package for Digital Camera Memory Interface Pixel
Processor (DCMIPP) support for kernel 6.12.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
b1e93ee54f stm32: enable 6.12 testing kernel
The stm32 target now supports 6.12 kernel as testing.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
db05331f38 stm32: 6.12: update kernel 6.12 config
Update stm32mp1 kernel config for 6.12.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
1cdbddae6e stm32: 6.12: refresh kernel patches
Drop upstreamed patches and refresh remaining ones.

Manually rebased:
- 033-ARM-dts-stm32-rtc-add-LSCO-to-WLAN-BT-module-on-stm3.patch
- 035-ARM-dts-stm32-rtc-add-pin-to-provide-LSCO-on-stm32mp.patch

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
234eadd07e kernel/stm32: Restore kernel files for v6.6
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

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:28:42 +02:00
Thomas Richard
9e57133944 kernel/stm32: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:25:44 +02:00
Wei-Ting Yang
8ef981698e util-linux: add wdctl
Add the wdctl utility.

Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19041
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:13:44 +02:00
Wei-Ting Yang
695548128f util-linux: remove redundant slashes
Remove redundant slashes.

Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19041
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:04:20 +02:00
Mathew McBride
3e5a70482b kernel: enable memory mapped TPM interface on armsr
The memory mapped TPM interface (TIS) can be used for
emulated or virtualized TPM instances with QEMU and
a simulation package like swtpm.

On QEMU the device will appear in the device tree
with a "tcg,tpm-tis-mmio" compatible.

For example:
qemu-system-aarch64 -machine virt -cpu max \
    -bios u-boot.bin \
    -nographic \
    .... \
    -hda openwrt-armsr-armv8-combined-efi.img \
    -chardev socket,id=chrtpm,path=/tmp/mytpm/swtpm-sock \
    -tpmdev emulator,id=tpm0,chardev=chrtpm \
    -device tpm-tis-device,tpmdev=tpm0

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Link: https://github.com/openwrt/openwrt/pull/19188
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 14:00:36 +02:00
Shiji Yang
0ef4c3dfa0 uboot-envtools: cns3xxx: remove config file
This file is a leftover of cns3xxx target which has been dropped
in commit a9790dff53 ("cns3xxx: drop target").

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19191
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 13:57:06 +02:00
John Audia
836a4cc6d3 kernel: bump 6.6 to 6.6.94
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.94

Removed upstreamed:
	generic/backport-6.6/421-01-v6.16-spi-bcm63xx-spi-fix-shared-reset.patch[1]
	generic/backport-6.6/421-02-v6.16-spi-bcm63xx-hsspi-fix-shared-reset.patch[2]
	generic/backport-6.6/725-01-v6.16-net-dsa-tag_brcm-legacy-fix-pskb_may_pull-length.patch[3]
	mvebu/patches-6.6/0001-v6.16-pinctrl-armada-37xx-use-correct-OUTPUT_VAL-register-.patch[4]
	mvebu/patches-6.6/0002-v6.16-pinctrl-armada-37xx-set-GPIO-output-value-before-set.patch[5]

Added new back-port:
	generic/backport-6.6/001-powerpc-kernel-Fix-pcc_save_regs-inclusion.patch[6]
All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=29abb7fc82443bee273ba4623ce319bf7ba1d43d
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=59d5f3134b5c265df233b7f385bbe718191411be
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=2e02edb66427e3b8752e1f3dd3cfc1bef3f2357b
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=39ed85ae485d991ffb24d25629a679c0b22e2d8f
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.94&id=8f0f45a312151a52aae920a091ea4b454ac97caf
6. Addresses a build failure for pcc

Build system: x86/64
Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19183
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 13:54:17 +02:00
Shiji Yang
cb1b656027 kernel: bump 6.12 to 6.12.34
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.34

Remove upstreamed patches:
  generic/backport-6.12/421-01-v6.16-spi-bcm63xx-spi-fix-shared-reset.patch [1]
  generic/backport-6.12/421-02-v6.16-spi-bcm63xx-hsspi-fix-shared-reset.patch [2]
  generic/backport-6.12/610-06-v6.16-net-dsa-b53-do-not-enable-RGMII-delay-on-bcm63xx.patch [3]
  generic/backport-6.12/610-08-v6.16-net-dsa-b53-allow-RGMII-for-bcm63xx-RGMII-ports.patch [4]
  generic/backport-6.12/610-09-v6.16-net-dsa-b53-do-not-touch-DLL_IQQD-on-bcm53115.patch [5]
  generic/backport-6.12/611-v6.16-net-dsa-tag_brcm-legacy-fix-pskb_may_pull-length.patch [6]

Manually rebased patches:
  bcm27xx/patches-6.12/950-0665-drm-vc4-tests-Drop-drm-parameter-for-vc4_find_crtc_f.patch [7]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=408ca1d1803b223d615f9021055f9ccb4f4863ea
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=2a98786e258718ff93ef6d6bd26a9a39076e0cb7
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=6d1c93a5c6b0ae87bb7001d8d6fdef3b3be9c6c6
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=1aa31695bf0dc1ee3e6c559c14db7fd05b6bb102
[5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=b2fc08d276797e529cacad6fa9d704a7367090b5
[6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=2c32fc56c05aa69439fdfd5e0b25f57e2a158627
[7] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.34&id=aba86d49e5ac3700295ab8c417436abacc19cc32

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19184
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-21 13:50:11 +02:00
Felix Fietkau
bbd95c0523 ucode: add ubus refcounting fix
Fixes a regression in the last ucode update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-20 22:54:32 +02:00
Felix Fietkau
9850052190 hostapd: fix generating own neighbor report for dynamically added/changed interfaces
hostapd_neighbor_set_own_report is normally called from interface setup only.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-20 14:57:35 +02:00
Felix Fietkau
3ebf110711 hostapd: fix dealing with mac address changes for the primary BSS
Ensure that hapd->own_addr is set properly, since hostapd_setup_bss
only handles it for secondary BSS interfaces

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-20 14:57:35 +02:00
Stefan Kalscheuer
7e014bbe0b mvebu: add 6.12 testing kernel
Add 6.12 testing kernel for mvebu target.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Stefan Kalscheuer
819f78463c mvebu: 6.12: refresh kernel config
Add new and remove obsolete symbols for Kernel 6.12

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Stefan Kalscheuer
1738e87632 mvebu: 6.12: refresh patches
Drop upstreamed patches:
0001-v6.16-pinctrl-armada-37xx-use-correct-OUTPUT_VAL-register-.patch
0002-v6.16-pinctrl-armada-37xx-set-GPIO-output-value-before-set.patch
820-v6.11-01-dt-bindings-firmware-add-cznic-turris-omnia-mcu-bind.patch
820-v6.11-02-platform-cznic-Add-preliminary-support-for-Turris-Om.patch
820-v6.11-03-platform-cznic-turris-omnia-mcu-Add-support-for-MCU-.patch
820-v6.11-04-platform-cznic-turris-omnia-mcu-Add-support-for-powe.patch
820-v6.11-05-platform-cznic-turris-omnia-mcu-Add-support-for-MCU-.patch
820-v6.11-06-platform-cznic-turris-omnia-mcu-Add-support-for-MCU-.patch
820-v6.11-07-ARM-dts-turris-omnia-Add-MCU-system-controller-node.patch
820-v6.11-08-ARM-dts-turris-omnia-Add-GPIO-key-node-for-front-but.patch
820-v6.11-09-platform-cznic-turris-omnia-mcu-Depend-on-OF.patch
820-v6.11-10-platform-cznic-turris-omnia-mcu-Depend-on-WATCHDOG.patch
820-v6.11-11-platform-cznic-turris-omnia-mcu-fix-Kconfig-dependen.patch

Manually refreshed:
310-linksys-use-eth0-as-cpu-port.patch
350-drivers-thermal-step_wise-add-support-for-hysteresis.patch
901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch
902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch
910-drivers-leds-wt61p803-puzzle-improvements.patch

All other patches automatically refreshed.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Stefan Kalscheuer
6354ac76a4 kernel/mvebu: Restore kernel files for v6.6
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

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Stefan Kalscheuer
1e1e91a213 kernel/mvebu: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/18975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 23:09:40 +02:00
Chukun Pan
782afec6c1 mediatek: 6.12: fix cci driver probe for mt7988d
The patch of kernel 6.12 missing cpufreq part for
mt7988d, causing the ccifreq driver probe to fail.
Add it to avoid mt7988d devices boot hang.

Fixes: a9822e8 ("kernel/mediatek: 6.12: drop patches which have been applied upstream")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2025-06-19 22:53:04 +02:00
Shiji Yang
9817c9186a x86: move common kconfig symbols into target shared config
These kernel config symbols are selected by all sub-targets. We
can merge them together to simplify the config files.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18632
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 22:49:43 +02:00
Shiji Yang
805b5d893c x86: refresh kernel symbol configs
All kernel config symbols are refreshed by `make kernel_oldconfig`.
Some symbols are moved to the generic/config-6.12 because the
refresh tool will automatically trim them.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18632
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 22:49:43 +02:00
Hauke Mehrtens
6348047e50 procd: update to Git HEAD (2025-06-19)
cde025d fix generating syscall-names.h for loongarch64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 22:39:14 +02:00
Josef Schlehofer
db9ba9a943 tools/bash: update to version 5.2.37
Update to the latest version.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19143
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 22:16:32 +02:00
Mieczyslaw Nalewaj
225622e0f9 mt76: replace strlcpy with strscpy
Change deprecated function strlcpy to strscpy
for compatibility with kernel 6.12.

strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().

Direct replacement is safe here since DEV_ASSIGN is only used by
TRACE macros and the return values are ignored.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18927
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 22:03:30 +02:00
Markus Stockhausen
23faf4c485 realtek: activate MIPS power cluster controller for RTL931x
The SMP environment is prepared well for the RTL93X. Now describe the
power cluster controller in the DTS. Tested on RTL9311 based Linksys
LGS352C.

Without patch:

root@OpenWrt:~# dmesg | grep CPU
[    0.140425] CPU1 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.191952] Synchronize counters for CPU 1: done.
[    1.232191] CPU2: failed to start
[    1.237863] No online CPU in core 1 to start CPU3
[    2.273784] CPU3: failed to start
[    2.277589] smp: Brought up 1 node, 2 CPUs

root@OpenWrt:~# cat /proc/cpuinfo  | grep -E "model|proc"
processor               : 0
cpu model               : MIPS interAptiv (multi) V2.0
processor               : 1
cpu model               : MIPS interAptiv (multi) V2.0

With patch:

root@OpenWrt:~# dmesg | grep CPU
[    0.000000] CPU0 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Failed to get CPU clock: -2
[    0.000000] CPU frequency from device tree: 1000MHz
[    0.133360] smp: Bringing up secondary CPUs ...
[    0.140418] CPU1 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.191950] Synchronize counters for CPU 1: done.
[    0.230103] CPU2 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.289220] Synchronize counters for CPU 2: done.
[    0.326189] CPU3 revision is: 0001a120 (MIPS interAptiv (multi))
[    0.378861] Synchronize counters for CPU 3: done.
[    0.413829] smp: Brought up 1 node, 4 CPUs

processor               : 0
cpu model               : MIPS interAptiv (multi) V2.0
processor               : 1
cpu model               : MIPS interAptiv (multi) V2.0
processor               : 2
cpu model               : MIPS interAptiv (multi) V2.0
processor               : 3
cpu model               : MIPS interAptiv (multi) V2.0

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19110
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 21:56:49 +02:00
Markus Stockhausen
a51359aafd kernel: mtdsplit_uimage: return 0 if not fatal
Introduced with Linux 6.7, in commit:
5c2f7727d437 ("mtd: mtdpart: check for subpartitions parsing result"),
when a parser returns an error, this will be passed up, and
consequently, all parent mtd partitions get torn down.

Adjust the mtdsplit_uimage driver to only return an error if there is a
critical problem in reading from the mtd device or allocating memory.
Otherwise return 0 to indicate that no partitions were found.
Also add logging to indicate what went wrong.

E.g. on Realtek devices that are booted for the first time through
initramfs with OpenWrt never installed before boot log will show

[    0.975518] Creating 7 MTD partitions on "spi0.0":
[    0.981062] 0x000000000000-0x0000000e0000 : "u-boot"
[    1.041320] 0x0000000e0000-0x0000000f0000 : "u-boot-env"
[    1.060683] 0x0000000f0000-0x000000100000 : "u-boot-env2"
[    1.080992] 0x000000100000-0x000000200000 : "jffs2-cfg"
[    1.100988] 0x000000200000-0x000000300000 : "jffs2-log"
[    1.120599] 0x000000300000-0x000000fe0000 : "firmware"
[    1.157426] mtdsplit_uimage: no rootfs after uImage in "firmware"
[    1.176456] mtdsplit_uimage: no rootfs after uImage in "firmware"
[    1.200262] 0x000000fe0000-0x000001000000 : "log"

Similar issues were fixed before with commit ade045084b
("kernel: mtdsplit_minor: return 0 if not fatal") and
c78765213e ("kernel: mtdsplit_uimage: return 0 if not fatal")

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19163
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 20:51:18 +02:00
Valeriy Manzhos
f7dba4ebbc ath79: enable USB by default on hAP ac
Due to a bug, USB is not powered on after boot on hAP ac.
This prevents extroot configurations from working as overlayfs is mounted
before USB device can be powered on. This commit fixes this by enabling USB
in devicetree.

Related discussion links:
- https://forum.openwrt.org/t/usb-power-is-off-on-boot/229007

---

Extroot configuration requires the USB to be powered on before
preinit_main/80_mount_root. Probably the simplest approach is to enable
it in the devicetree. Another approach would be to add a script into
/lib/preinit that will power on USB via /sys/class/gpio/usb-power/value
E.g.
cat /lib/preinit/79_power_on_usb
do_power_on_usb(){
  echo '1' > /sys/class/gpio/usb-power/value
}
boot_hook_add preinit_main do_power_on_usb

Signed-off-by: Valeriy Manzhos <manzhos.va@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19149
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 20:42:02 +02:00
Yijie Jin
c35f2a23c8 ramips: mt7621: add support for JDCloud RE-SP-01B
JDCloud RE-SP-01B is a dual-band WiFi 5 router based on the MT7621AT.

Specifications:
- SoC: MediaTek MT7621AT
- RAM: 512MB DDR3
- Flash: 32MB SPI NOR
- WiFi: MediaTek MT7603EN (2.4GHz), MediaTek MT7615N (5GHz)
- Ethernet: 1x WAN, 2x LAN (Gigabit Ethernet)
- LEDs: red, blue, green (GPIO controlled)
- Button: Reset (GPIO controlled)
- eMMC: Single onboard (32GB/64GB/128GB)
- USB: 1x USB 2.0 port

MAC Address Structure:
The MAC addresses share the structure DC:D8:7C:XX:XX:XX, where:
- WAN, LAN, and 2.4GHz WiFi: same as the label MAC address.
- 5GHz WiFi: label MAC address + 0x800000.

The manufacturer writes the label MAC address at different
offsets depending on the storage version of the device:

e.g.
128GB version:  &config + 0x442a
64GB version:   &config + 0x4429

So `get_mac_ascii()` is used here to search for the
base label MAC address of the device.

Ref:
https://github.com/openwrt/openwrt/pull/17409#discussion_r1899674262
https://github.com/immortalwrt/immortalwrt/commit/c0c480d

Flash Instruction:
A 3rd party bootloader is required to boot the image. You can
use a SOP16 test clip to burn the image/bootloader to the flash.

The official bootloader does provide a web recovery interface
which only accepts an official image. To access it, you will
need to hold the reset button and power on the device, set your
IP address to 192.168.68.2 and visit http://192.168.68.1.

Co-authored-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Yijie Jin <jinyijie@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17409
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 20:33:57 +02:00
Markus Stockhausen
22854586c6 realtek: fix/add switchcore syscon nodes for RTL838x/RTL839x/RTL931x
The switchcore node is the central location that describes the Realtek switch
register addresses starting at 0x1b000000. It will be used by current and
future regmap enabled device drivers. The upstream MDIO driver already makes
use of it by calling syscon_node_to_regmap(dev->parent->of_node);

In the current DTS base we have 3 issues that should be fixed:

- rtl838x.dtsi has a length of 0x20000 instead of 0x10000
- rtl839x.dtsi has a length of 0x20000 instead of 0x10000
- rtl931x.dtsi has no switchcore node at all

Align these mismatches with the "good" RTL930x template.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18642
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 20:28:30 +02:00
Jonas Jelonek
0bd5d5f748 realtek: rtl931x: fix I2C sda pin
The drivers for I2C bus and mux for RTL931x have an incorrectly defined
SDA0 pin number, causing an error with correct pin numbers specified in
the device tree.

Using the `show tech-support board` on the vendor firmware of a Netgear
MS510TXM shows the correct pin numbers but they don't work with the
drivers. So fix this.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19171
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 19:31:41 +02:00
Jonas Jelonek
24d9fdff2e realtek: rtl931x: add missing function reference for l2_hash_seed
Add missing function reference for the l2_hash_seed call in rtl931x_reg
in the rtl83xx DSA driver part.
While at it, rename the referenced function to proper naming convention
and simplify its content.

The missing reference causes a hard crash after a short time (on
MS510TXM) because the driver assumes the reference always exists.

[  111.785559] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 805469a0
[  111.800991] Oops[#1]:
[  111.801026] CPU: 0 PID: 11 Comm: kworker/u8:0 Tainted: G           O       6.12.33 #0
[  111.801046] Workqueue: dsa_ordered dsa_slave_switchdev_event_work
...
[  111.880600] epc   : 00000000 0x0
[  111.884219] ra    : 805469a0 rtl83xx_port_fdb_add+0x7c/0x204
[  111.890570] Status: 11000403 KERNEL EXL IE
[  111.895263] Cause : 50800008 (ExcCode 02)
[  111.899731] BadVA : 00000000
[  111.902946] PrId  : 0001a120 (MIPS interAptiv (multi))
[  111.956086] Process kworker/u8:0 (pid: 11, threadinfo=0b107c25, task=265aeb31, tls=00000000)
...
[  112.015167] Call Trace:
[  112.019549] [<80170b04>] load_balance+0x494/0x708
[  112.025022] [<807bb368>] dsa_port_do_fdb_add+0x24c/0x340
[  112.031048] [<807bc868>] dsa_switch_event+0xd44/0x13cc
[  112.036845] [<8015867c>] raw_notifier_call_chain+0x48/0x88
[  112.043031] [<807bcf3c>] dsa_tree_notify+0x10/0x3c
[  112.048395] [<807b2a64>] dsa_port_bridge_host_fdb_add+0x15c/0x190
[  112.055459] [<807b4e40>] dsa_slave_switchdev_event_work+0x164/0x1cc
...

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19170
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-19 19:22:45 +02:00
Shiji Yang
9b777547be ramips: PCIe driver improvements for mt7620 and mt7628
This patchset fixes some PCIe bridge register access issues and
reworks the initialization procedure. It may bring some stability
improvements. To match the driver changes, the memory remap range
was extended and a PCIe reset pinctrl was added to mt7628an.dtsi.

Link: https://lore.kernel.org/all/OSBPR01MB1670555F549B69B9A5E7F133BC72A@OSBPR01MB1670.jpnprd01.prod.outlook.com/
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/18299
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-18 20:35:23 +02:00
Shiji Yang
8e1d58a596 generic: net: phy: psb6970: fix missing-prototypes warnings
Fix the following build warnings on 6.12 kernel:

drivers/net/phy/psb6970.c:426:12: error: no previous prototype for 'psb6970_init' [-Werror=missing-prototypes]
  426 | int __init psb6970_init(void)
      |            ^~~~~~~~~~~~
drivers/net/phy/psb6970.c:434:13: error: no previous prototype for 'psb6970_exit' [-Werror=missing-prototypes]
  434 | void __exit psb6970_exit(void)
      |             ^~~~~~~~~~~~

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19174
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-18 20:23:20 +02:00
Felix Fietkau
042afe1f3d mt76: update to Git HEAD (2025-06-18)
55218e636092 Revert "wifi: mt76: mt7996: fill txd by host driver"
fdfe9eca6401 wifi: mt76: disable napi on driver removal
d7a070e11de4 wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
29363a669195 wifi: mt76: mt7996: prevent uninit return in mt7996_mac_sta_add_links
e285cb42be03 wifi: mt76: Remove an unneeded local variable in mt76x02_dma_init()
3dee73c357cf wifi: mt76x2: Add support for LiteOn WN4516R,WN4519R
73f9582f92b6 wifi: mt76: mt7925: introduce thermal protection
cf8522c5eea8 wifi: mt76: mt7925: fix host interrupt register initialization
8a24527e6c63 wifi: mt76: mt7921: add 160 MHz AP for mt7922 device
d0ef73122e8b wifi: mt76: mt7996: avoid NULL pointer dereference in mt7996_set_monitor()
7fdbe4cb5c8d wifi: mt76: mt7996: avoid null deref in mt7996_stop_phy()
925d156dab3d wifi: mt76: mt7996: fix uninitialized symbol warning
a403590fd464 Revert "wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()"
ca76c1bcede4 wifi: mt76: mt7996: remove duplicate check in mt7996_mcu_sta_mld_setup_tlv()
b70a4a619538 wifi: mt76: scan: Fix 'mlink' dereferenced before IS_ERR_OR_NULL check
2247afffc734 wifi: mt76: add mt76_connac_mcu_build_rnr_scan_param routine
460aa7da0ef6 wifi: mt76: mt7925: add RNR scan support for 6GHz
a68584ddf98e wifi: mt76: mt7996: Fix null-ptr-deref in mt7996_mmio_wed_init()
025c1d19b55a wifi: mt76: mt7915: Fix null-ptr-deref in mt7915_mmio_wed_init()
c20015bdc88b wifi: mt76: mt7925: prevent multiple scan commands
832387a1f876 wifi: mt76: mt7925: refine the sniffer commnad
7bf6a2914a54 wifi: mt76: mt7925: ensure all MCU commands wait for response
1bd4dbd48281 wifi: mt76: mt7925: extend MCU support for testmode
0ca6ed4e2724 wifi: mt76: mt7925: add test mode support
a2838480f805 wifi: mt76: remove capability of partial bandwidth UL MU-MIMO
1865f5ea80ea wifi: mt76: mt7996: fix beamformee SS field
3bda39f1465e wifi: mt76: mt7996: set EHT max ampdu length capability
7d30840e5b21 wifi: mt76: mt7996: drop fragments with multicast or broadcast RA
bf22595a1d8a wifi: mt76: mt7996: fix invalid NSS setting when TX path differs from NSS
b9f01d7c368c wifi: mt76: mt7996: change max beacon size
8808d7c4eed7 wifi: mt76: mt7996: fix RX buffer size of MCU event
36e0b90e47ff wifi: mt76: fix available_antennas setting
da2c23bec426 wifi: mt76: support power delta calculation for 5 TX paths
3e161d0cf3c7 wifi: mt76: mt7925: add rfkill_poll for hardware rfkill
ee6dac9b6b76 wifi: mt76: mt7915: mcu: increase eeprom command timeout
0534761b76e1 wifi: mt76: mt7915: mcu: lower default timeout
79dd14f2e816 wifi: mt76: mt7915: mcu: re-init MCU before loading FW patch
f2943046881d wifi: mt76: Assume __mt76_connac_mcu_alloc_sta_req runs in atomic context
656eb209ec42 wifi: mt76: Move RCU section in mt7996_mcu_set_fixed_field()
4f47d90943a3 wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl_fixed()
189532e383c1 wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl()
5603bd03d56a wifi: mt76: Remove RCU section in mt7996_mac_sta_rc_work()
ca24f0794e94 wifi: mt76: mt7925: fix the wrong config for tx interrupt
63f18baa5bb6 wifi: mt76: mt7925: fix invalid array index in ssid assignment during hw scan
4bdc4c5f26e0 wifi: mt76: mt7925: fix incorrect scan probe IE handling for hw_scan
321ae47a7439 wifi: mt76: mt7925: fix off by one in mt7925_mcu_hw_scan()
3699df4e85ec wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_sta_set_decap_offload()
a17fbd3d8598 wifi: mt76: mt7921: prevent decap offload config before STA initialization

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-06-18 17:05:58 +02:00
Álvaro Fernández Rojas
3f69fe3907 bmips: update BCM531x5 RGMII delays patch
Replace BCM531x5 patch with the one sent upstream.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-18 11:12:00 +02:00
Álvaro Fernández Rojas
0bd694ea22 generic: 6.12: backport accepted BCM5325 patches
Backport accepted BCM5325 patches from net-next.
These patches will be merged in the v6.17 kernel window.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-18 11:11:54 +02:00
Jonas Gorski
d015a39dd3 iproute2: point KERNEL_INCLUDE to toolchain headers
Glibc since 2.41 tries to include linux/sched/types.h from sched.h, and
pointing KERNEL_INCLUDE to the kernel headers makes it use
linux/sched/types.h from the kernel headers instead of the installed
one.

This then breaks the configure (test) compile for setns() and the test:

mips-openwrt-linux-gnu-gcc -I/fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi -o config.HaAJYe/setnstest config.HaAJYe/setnstest.c
In file included from /fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi/linux/sched/types.h:5,
                 from /fork.openwrt/staging_dir/toolchain-mips_24kc_gcc-14.3.0_glibc/include/bits/sched.h:63,
                 from /fork.openwrt/staging_dir/toolchain-mips_24kc_gcc-14.3.0_glibc/include/sched.h:43,
                 from config.HaAJYe/setnstest.c:2:
/fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi/linux/types.h:10:2: warning: #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders" [-Wcpp]
   10 | #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders"
      |  ^~~~~~~
In file included from /fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi/linux/posix_types.h:5,
                 from /fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi/linux/types.h:14:
/fork.openwrt/build_dir/target-mips_24kc_glibc/linux-ath79_generic/linux-6.6.93/include/uapi/linux/stddef.h:5:10: fatal error: linux/compiler_types.h: No such file or directory
    5 | #include <linux/compiler_types.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Fix this by pointing KERNEL_INCLUDE to the toolchain headers, which
include the installed kernel headers.

Tested with musl, glibc, and SDK.

Fixes: 60738feded ("iproute2: Fix KERNEL_INCLUDE in SDK")
Reported-by: Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2025-06-18 10:46:35 +02:00
Josef Schlehofer
0bca24493e tools: libdeflate: update to 1.24
Release notes:
https://github.com/ebiggers/libdeflate/releases/tag/v1.23
https://github.com/ebiggers/libdeflate/releases/tag/v1.24

Changelog can be found in NEWS.md in relevant tags.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19145
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-17 11:23:08 +02:00
Markus Stockhausen
c131870c34 realtek: switch LGS310C devicetree to new i2s-gpio-shared driver
From now on both SFP ports can be used without manual intervention.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18737
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-17 10:52:42 +02:00
Markus Stockhausen
5b8155d434 realtek: activate i2c-gpio-shared driver
Currently only RTL83xx devices are known with shared SCL pins.
So activate the driver only for those targets.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18737
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-17 10:52:42 +02:00
Markus Stockhausen
acd7ecc9ed realtek: add new i2c-gpio-shared driver for shared SCL lines
Some Realtek switches have been designed with I2C busses that share a
single SCL line. The clock line is used for 2 or more busses. This cannot
be used with the standard i2c-gpio driver that relies on distinct SDA
and SCL pairs.

Provide a derived i2c-gpio-shared driver that can be used instead. This
driver can handle up to 4 busses with only a single clock line.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18737
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-17 10:52:42 +02:00
Jack Sun
2f85dc277b tools/cmake: update to 3.31.5
Release notes: https://cmake.org/cmake/help/latest/release/3.31.html
No need refresh patch

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17814
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-06-17 06:27:12 +02:00
Josef Schlehofer
764576eb5b perf: disable slang support
libs/slang2 is getting picked up from the packages feed, if the slang2
is compiled first and then if you try to compile perf, it fails
due to unmet dependency.

Fixes:
Package perf is missing dependencies for the following libraries:
libslang.so.2

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19123
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-16 23:22:59 +02:00