Commit graph

69665 commits

Author SHA1 Message Date
Wei-Ting Yang
62e7565f0e tools/expat: update to 2.8.2
This version bump includes fixes for the following CVEs:
- CVE-2026-41080
- CVE-2026-45186
- CVE-2026-50219
- CVE-2026-56131
- CVE-2026-56132
- CVE-2026-56403
- CVE-2026-56404
- CVE-2026-56405
- CVE-2026-56406
- CVE-2026-56407
- CVE-2026-56408
- CVE-2026-56409
- CVE-2026-56410
- CVE-2026-56411
- CVE-2026-56412

Full release notes:
https://github.com/libexpat/libexpat/blob/master/expat/Changes

Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24016
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-02 16:36:16 +02:00
Robert Marko
b994fb029a microchip: update TAS patch to pending one
Update the TAS patch to the one sent upstream, it adds SparX-5 registers.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-02 13:44:11 +02:00
Rosen Penev
4e1fd5b025
kernel: modules: mux-mmio: add missing regmap-mmio dependency
mux-mmio.ko depends on regmap-mmio.ko at runtime, but the kmod package
was missing the dependency, causing build failures when the module is
included.

Fixes: ac39016898 ("kernel: modules: package MMIO mux driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24028
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-02 10:06:12 +02:00
Rosen Penev
9fedddbc1e
treewide: remove factory:
For the most part, factory: remains as a hold over from nvmem-layout
conversion and no longer serves any purpose.

In the case of &factory sections, reduce identation slightly by
referencing the nvmem-layout node instead.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24008
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-02 10:03:37 +02:00
Hauke Mehrtens
4b370c5097 odhcp6c: Increase PKG_RELEASE
Indicate that there are some changes. This should make sure that the
package gets updated.

Fixes: 257aee0cc0 ("scripts: dhcpv6: don't report custom ip6class if default")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-07-01 23:11:25 +02:00
Hauke Mehrtens
75fad162df ead: Increase PKG_RELEASE
Indicate that there are some changes. This should make sure that the
package gets updated.

Fixes: 63c0767f3d ("ead: fix integer underflow in handle_send_a()")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-07-01 23:09:23 +02:00
Robert Marko
53389564b9 microchipsw: configure TAS port link speed
On the TSN and RED variants of SparX-5 and LAN969x TAS (Time-Aware Shaper)
is present in the silicon.

Currently, the driver does not use configure it at all, which means that
the TAS_PROFILE_CONFIG.LINK_SPEED[1] value is left at the default of 3
which means that its configured for 1 Gbps.

So, running iperf between two 10G switch ports will result in only 940-ish
Mbps while we should be getting around 9.3 Gbps.

Correctly populating the TAS_PROFILE_CONFIG.LINK_SPEED[1] with the current
port speed fixes this issue and we achieve around 9.4 Gbps between two 10G
switch ports.

So, port the TAS port link speed setting from the vendor BSP 6.18 kernel[2]

[1] https://microchip-ung.github.io/lan969x-industrial_reginfo/reginfo_LAN969x-Industrial.html?select=hsch,tas_profile_cfg,tas_profile_config,link_speed
[2] https://github.com/microchip-ung/linux/tree/bsp-6.18-2026

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 20:40:19 +02:00
Erik Conijn
67ee9cf19d wireguard: add metric to routes
maintainer: Felix Fietkau <nbd@nbd.name>

The metric field is not used when wireGuard routes are created.

See: https://github.com/openwrt/openwrt/issues/23199

This patch is aimed at adding the metric field in the config to the created routes for WireGuard if
the metric field is not empty and not 0

Compile tested: X86, Openwrt-main
Run tested: X86

Please have a look and consider implementing

Signed-off-by: Erik Conijn <egc112@msn.com>
Link: https://github.com/openwrt/openwrt/pull/23280
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-01 19:09:09 +02:00
Andy Chiang
85767ac8fe dnsmasq: add some default values of dhcp.conf
add ra/dhcpv4/dhcpv6

dhcpv6 service provided by dnsmasq without odhcpd

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23445
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-01 19:07:55 +02:00
Andy Chiang
6f30f08d0e dnsmasq: add fallback for default dhcpv4/dhcpv6 values
The default dhcpv4/dhcpv6 in odhcpd is disabled.
Add fallback for default values to keep consistency.

Link: https://github.com/openwrt/odhcpd/blob/master/README.md

Ref: https://github.com/openwrt/luci/pull/8642

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23445
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-01 19:07:55 +02:00
Lech Perczak
f640d4441f imx: cortexa7: support camera on TechNexion PICO-PI-IMX7D
Enable device packages required for camera support and add relevant device
tree nodes.

The drivers probe and connect properly, but it currently only supports
uncompressed UYVY in 2592x1944, 1920x1080 and 1280x960 resolutions, so I
had to use ustreamer to get the stream over network:

ustreamer -r 1920x1080 -m UYVY -d /dev/video0 -s 0.0.0.0

To get the camera working, the following extra packages are needed:
kmod-mux-mmio kmod-video-imx7-csi kmod-video-imx-mipi-csis kmod-video-mux \
kmod-video-ov5645

To set up the capture, you need to set up the links and formats across
the pipeline, for example:

media-ctl -d /dev/media0 -l "'ov5645 3-003c':0 -> 'csis-30750000.mipi-csi':0[1]"
media-ctl -d /dev/media0 -l "'csis-30750000.mipi-csi':1 -> 'csi-mux':1[1]"
media-ctl -d /dev/media0 -l "'csi-mux':2 -> 'csi':0[1]"
media-ctl -d /dev/media0 -l "'csi':1 -> 'csi capture':0[1]"

media-ctl -d /dev/media0 -V "'ov5645 3-003c':0 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csis-30750000.mipi-csi':0 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csis-30750000.mipi-csi':1 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csi-mux':1 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csi-mux':2 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csi':0 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csi':1 [fmt:UYVY8_1X16/1920x1080 field:none]"

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 19:06:28 +02:00
Lech Perczak
37bbeb1af4 kernel: modules: video: package ov5645 driver
Create a package for ov5645 kernel module, required to support camera on
PICO-PI-IMX7D board.

Currently limit the visibility to imx_cortexa7 subtarget, but this can
be enabled on other platforms if needed.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 19:06:28 +02:00
Lech Perczak
16a7c79ae8 kernel: modules: video: package video-mux
Package the video-mux module, required by PICO-PI-IMX7D board, to
support included OV5645 camera.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 19:06:28 +02:00
Lech Perczak
ac39016898 kernel: modules: package MMIO mux driver
Create a package for MMIO-based multiplexer driver, used as a backend by
video-mux on i.MX7 SoCs.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 19:06:28 +02:00
Lech Perczak
0f54eda2dc kernel: modules: video: package i.MX7 CSI driver
Create a package for i.MX7 CSI driver module, together with it's common
code for i.MX family.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 19:06:28 +02:00
Richard Huynh
da28c7a67e wifi-scripts: add EHT beamforming options to hostapd config
Some EHT options like beamformer/beamformee
are disabled by default in hostapd.conf

Read the EHT Phy Cap structure and enable/disable
switches within the hostapd.conf for capable hardware.

Without this EHT SU beamformer/beamformee and MU
beamformer capabilities are omitted from AP beacons,
even if the driver reports the hardware as capable.

Signed-off-by: Richard Huynh <voxlympha@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22956
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 19:03:55 +02:00
Matthias Urlichs
54e70703a0 ath79: add support for Ubiquiti NanoStation Loco M (XW v2)
This commit adds support for the NanoStation Loco M2/M5 XW devices
on the ath79 target with test date (label on the packaging, not the
device) later than October 2017.

To discover whether you have the new version, open a console on the
stock web interface and run `dmesg | grep AR803`. New versions print
AR8035, v1 shows AR8032.

Specifications:

 - AR9342 (rev 3) SoC @ 535 MHz
 - 64 MB RAM
 - 8 MB SPI flash
 - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
 - AR8035 switch
 - 2T2R 5 GHz radio, 22 dBm
 - 13 dBi built-in directional antenna
 - POWER/LAN green LEDs
 - 4x RSSI LEDs (red, orange, green, green)
 - UART (115200 8N1) on PCB

Flashing via TFTP:

 - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
   button on the device pressed
 - Power on the device via PoE (keep reset button pressed)
 - Keep pressing until LEDs flash alternatively LED1+LED3 =>
   LED2+LED4 => LED1+LED3, etc.
 - Release reset button
 - The device starts a TFTP server at 192.168.1.20
 - Set a static IP on the computer (e.g., 192.168.1.21/24)
 - Upload via tftp the factory image:
   $ tftp 192.168.1.20
   tftp> bin
   tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanostation-loco-m-xw-v2-squashfs-factory.bin

MAC addresses: stored on Flash, in the "art" partition.

Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Link: https://github.com/openwrt/openwrt/pull/23912
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 19:02:40 +02:00
solodecode
a6e1135d6d mediatek: filogic: fix Globitel BT-R320 FIT rootfs mapping
Globitel BT-R320 boots the sysupgrade FIT from the eMMC production
partition with root=/dev/fit0.

The device tree did not describe the production GPT partition and
/chosen/rootdisk did not point at the FIT container. fitblk then had no
rootdisk match and the board stopped at:

  Waiting for root device /dev/fit0...

Describe the eMMC GPT partitions, set /chosen/rootdisk to production,
and use the FIT sysupgrade path.

Fixes: a3105d3f95 ("mediatek: filogic: add support for Globitel BT-R320")
Signed-off-by: solodecode <zikwarface134@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23895
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 19:01:37 +02:00
Dhimant Thanki
9a44d910cc ath79: fix Ethernet auto-negotiation on Ruckus ZoneFlex 7025
On the ZoneFlex 7025 the uplink port (eth0) is connected to PHY 4 of
the AR7240 built-in switch. This PHY erroneously advertises
1000baseT/Full capability, even though the AR7240 built-in switch only
supports 10/100 Mbps.

Because of the bogus gigabit capability, phylib performs 1000BASE-T
master/slave resolution against the PHY's non-functional gigabit
registers, which never completes. Auto-negotiation then fails: the
link flaps between speeds or never comes up at all, while a manually
forced fixed speed works fine.

Cap the PHY at 100 Mbps so the gigabit capability is removed and the
master/slave resolution path is skipped. eth0 then auto-negotiates
reliably to 100 Mbps full-duplex.

Signed-off-by: Dhimant Thanki <dhimant.thanki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24022
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-07-01 18:58:36 +02:00
Przemek Rudy
e6f5d04c52
mvebu: MikroTik: add support for RB5009UPr+S+IN
The MikroTik RB5009UPr+S+IN is a multigig router based on the Marvell
Armada 7040 SoC, sharing the same hardware base as the RB5009UG+S+IN
with added PoE-out support on all ethernet ports.

Specification:

- SoC             : Marvell Armada 7040 (88F7040), 4x Cortex-A72
- CPU frequency   : 350-1400 MHz
- RAM             : 1 GB
- Flash           : 16 MB SPI NOR + 1 GB NAND
- Switch          : Marvell MV88E6393X
- Ethernet        : 1x 2.5G (p1, QCA8081), 7x 1G (p2-p8), 1x SFP+ 10G
- PoE-in          : 802.3af/at on p1, 24-57V
- PoE-out         : 802.3af/at on p1-p8, 130 W total
- Power           : DC jack / 2-pin terminal / PoE-in, 24-57V
- USB             : 1x USB 3.0 type A, max 1.5 A
- LEDs/Keys (GPIO): 4x/1x
- UART            : MikroTik SPI/UART combo header (10-pin, 2.0mm pitch)
  - assignment    : GND Vcc Rx ? GND / CLK DO /CS Tx DI (top view)
  - settings      : 115200n8

Flash instruction using initramfs image:

RouterBOOT cannot boot the OpenWrt kernel directly. A U-Boot loader
(u-boot.elf) is installed as an intermediary: RouterBOOT loads
u-boot.elf, which then loads the OpenWrt initramfs image.

1. Rename the downloaded initramfs image, removing the version number,
   to: openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb
2. Set up a BOOTP/TFTP server serving u-boot.elf, with the renamed
   initramfs image in the same directory
3. Power off the router, hold the reset button (front panel), power on
   and keep holding until the initramfs image has been served, then
   release
4. The router boots the initramfs image, reachable at 192.168.1.1
5. Log in via SSH, install U-Boot, wipe NAND and flash OpenWrt:

     . /lib/functions.sh
     yafut -d /dev/mtd$(find_mtd_index "YAFFS") -w -i /tmp/u-boot.elf -o kernel -T
     ubiformat /dev/mtd$(find_mtd_index "ubi") -y
     sysupgrade /tmp/openwrt-mvebu-cortexa72-mikrotik_rb5009upr-squashfs-sysupgrade.bin

Recovery:

Hold the reset button while U-Boot is booting to load the initramfs
image again. To return to RouterOS, use MikroTik Netinstall.

MAC Addresses:

MAC addresses are read from the RouterBOOT hard_config in NOR via the
macaddr_hard nvmem cell:

offset +0 p1  (2.5G, label-mac-device)
offset +1 p2
offset +2 p3
offset +3 p4
offset +4 p5
offset +5 p6
offset +6 p7
offset +7 p8
offset +8 sfp

Tested-by: Sm00shed <sm00shed@posteo.de> (RB5009UPr+S+IN, OpenWrt v25.12.4,
kernel 6.12.87, mtpoe fw 65.21)
Signed-off-by: Przemek Rudy <prudy@protonmail.com>
[carlo@common-net.org: refactor RB5009UPr+S+IN support and fix sysupgrade path]
Signed-off-by: Carlo Filippi <carlo@common-net.org>
[sm00shed@posteo.de: fix compatible indentation, remove mikrotik,rb5009, expand commit message]
Signed-off-by: Sm00shed <sm00shed@posteo.de>
Link: https://github.com/openwrt/openwrt/pull/23698
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 17:03:40 +02:00
Przemek Rudy
4b1a883528
mvebu: rename generic rb5009 to rb5009ug
Specialize RB5009UG model from generic RB5009.

Signed-off-by: Przemek Rudy <prudy@protonmail.com>
[carlo@common-net.org: fixed model name and backward compatibility ]
Signed-off-by: Carlo Filippi <carlo@common-net.org>
Signed-off-by: Sm00shed <sm00shed@posteo.de>
Link: https://github.com/openwrt/openwrt/pull/23698
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 17:03:09 +02:00
YaleiZang
10631d244c airoha: remove KERNEL_LOADADDR from airoha_an7583-evb device definition
Delete the KERNEL_LOADADDR assignment from the airoha_an7583-evb device definition.
The kernel load address is now centrally managed in image Makefile with, just using default load address:

    loadaddr-$(CONFIG_TARGET_airoha_an7583) := 0x80200000

This ensures the load address configuration is maintained in a single location.
Removing the duplicate assignment prevents confusion and potential misconfiguration.

Signed-off-by: YaleiZang <yalei.zang@airoha.com>
Link: https://github.com/openwrt/openwrt/pull/24000
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-01 13:57:06 +02:00
Felix Fietkau
638a1927b1 mt76: update to Git HEAD (2026-07-01)
50a0c3057575 firmware: update MT7986 firmware to version 20260515
6b7b98627bcc wifi: mt76: mt7915: HW ATF support for mt7986+
910db36ae5b1 wifi: mt76: mt7996: HW ATF support
f6cf5faff4b6 firmware: update MT7996 firmware to version 20260311
fe40221e05eb wifi: mt76: mt7996: fix EAPOL source BSS for non-MLD stations
59676919ea40 wifi: mt76: mt7996: fix non-MLD station num_sta leak

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-01 13:15:44 +02:00
Felix Fietkau
365c6232c0 qosify: update to Git HEAD (2026-06-22)
298754f6ded2 map: add NQB DiffServ codepoint
d26cc573f36c qosify: account for bytes in traffic class statistics
0edbc51af3b6 qosify: group traffic class stats under a "classes" table
fe8491da8daf qosify: add per-DSCP traffic statistics
181a691407ee dns: track cname cache hit/miss statistics
cece4e23a9df qosify: track per-DNS-pattern traffic statistics
6b4be193a6dd qosify: report eBPF map entry count and last reload time
e57b34046341 qosify: account for GSO segment count in packet statistics
c49e72a4a45d qosify-bpf: remove unused variable in classify()
44ce40f8e083 qosify: count all traffic in per-DSCP statistics
beeb87ec1f16 qosify: expose default traffic classes in statistics

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-01 13:15:44 +02:00
Rosen Penev
aef2523de1
apm821xx: only install swconfig for needed devices
Only the wndap6x0 devices need swconfig because of the realtek switch.
Place swconfig there instead of for every device.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23985
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 09:40:06 +02:00
Rosen Penev
8fd0289452
apm821xx: move PHY/DSA drivers to DEVICE_PACKAGES on nand boards
Only the devices that actually have these PHYs and DSA switches
should carry the kernel modules, instead of baking them into the
kernel for all nand boards.

These devices have no space constraints, so any size increase is
meaningless.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23985
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 09:40:05 +02:00
Dmitry Mostovoy
c495d1061a
mediatek: remove extra space in bootargs cudy wr3000p/s/h/e v1 ubootmod
Removes an extra space in "bootargs" property mistakenly added initially

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23274
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 09:32:36 +02:00
Dmitry Mostovoy
395252be08
mediatek: add cudy m3000-v2-yt8821 ubootmod
RAM: ESMT M15T2G16128A-DEB DDR3 1866 MT/s

This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdinfo" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1

3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_m3000-v2-yt8821-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_m3000-v2-yt8821-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_m3000-v2-yt8821-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
  ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
  ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
  ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23274
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 09:32:36 +02:00
Dmitry Mostovoy
6a08c65949
mediatek: add cudy m3000-v1 ubootmod
RAM: ESMT M15T2G16128A-DEB DDR3 1866 MT/s

This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdinfo" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1

3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_m3000-v1-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_m3000-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_m3000-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
  ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
  ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
  ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23274
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 09:32:36 +02:00
Dmitry Mostovoy
05f37579ad
arm-trusted-firmware-mediatek: cudy-ddr3: reduce ram speed to 1866 MT/s
Add DDR3_FREQ_1866 for DDR3 Cudy devices
to reduce RAM speed to 1866 MT/s

All known Cudy devices with DDR3 256/512 MB RAM use
ESMT M15T2G16128A-DEB DDR3 1866 MT/s or
ESMT M15T2G16256A-DEB DDR3 1866 MT/s

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23274
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 09:32:35 +02:00
Sven Eckelmann
4abe97b2bc
rtl826x-firmware: ship rtl8261n and rtl8264b in single firmware package
The firmware loading does not depend (solely) on the PHY id. The driver
needs to read out the vendor version id of the PHY before it can decide
which firmware file needs to be loaded.

A split in an RTL8261N and an RTL8264B firmware package is therefore
misleading. And it could even be that a product ships an RTL8264B but
switches the revision of the chip in the middle of its product lifetime. In
this case, the first identification based on the chip ID or the actual chip
ID for the OpenWrt porter might fail for another user with a later/earlier
produced device.

Shipping both files in the same package avoids this problem. Only the "low
power" firmware package is slightly misleading because there is only a
RTL8261N firmware binary for low power but no corresponding RTL8264B
version. It will ship simply the non-low power version for RTL8264B.

Suggested-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/23947
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 00:13:59 +02:00
Carlo Szelinsky
21f3bf350d
generic: net: phy: realtek: select rtl826x phy patch table by chip version
The in-tree realtek 5G/10G driver picks the firmware patch table from the
PHY ID (RTL8264 -> rtl8264b.bin). The vendor driver instead picks it from
VEND1 0x104[2:0] (0 = RTL8264B, else RTL8261N-C), independent of PHY ID.

On the S1300WP the RTL8264 dies read 0x104=0xf802 ([2:0]=2), so they need
the RTL8261N-C table; the RTL8264B table leaves the PCS unlocked (0xA600
stuck 0x1000) and config_init fails with -ETIME. Read 0x104[2:0] and load
rtl8261n.bin when non-zero. Boards with such a die must ship rtl8261n.bin.

Fixes: 6369c9e5c7 ("generic: net: phy: realtek: add 5G and 10G PHY support")
Co-authored-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/23947
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-01 00:13:58 +02:00
Yanase Yuki
57116f660b
mvebu: switch to kernel 6.18 and drop 6.12
Use kernel 6.18 instead of 6.12.
Tested on Check Point V-80.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/23962
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-30 20:48:59 +02:00
Paul Spooren
b0b4bf6ea0
build: don't store timestamps in APK packages
This commit statically sets SOURCE_DATE_EPOCH to 0, which causes `apk mkpkg` to
drop the date from generated packages. This improves reproducibility while
leaving package specific SOURCE_DATE_EPOCH untouched. The latter can be
interesting for i.e. packages like busybox, which prominently show that date on
the login shell.

Without this commit, packages that live inside feed repositories (openwrt.git,
packages.git etc) like `mtd` or `attendedsysupgrade-common` would have random
timestamps since no "full" git log was available.

Below an example with different source dates (0, 1):

│  0755  root:wheel    -                           -  /
│  0755  root:wheel    -                           -  lib/
│  0755  root:wheel    -                           -  lib/apk/
│  0755  root:wheel    -                           -  lib/apk/packages/
│ -0644  root:wheel    1970-01-01T00:00:01Z       10  lib/apk/packages/mtd.list
│ +0644  root:wheel    -                          10  lib/apk/packages/mtd.list
│  0755  root:wheel    -                           -  sbin/
│ -0755  root:wheel    1970-01-01T00:00:01Z    24595  sbin/mtd
│ +0755  root:wheel    -                       24595  sbin/mtd

Link: https://github.com/openwrt/openwrt/pull/24005
Signed-off-by: Paul Spooren <mail@aparcar.org>
2026-06-30 18:53:03 +02:00
Felix Fietkau
92143f94b6 mac80211: notify driver on airtime weight changes
Add a new sta_set_airtime_weight driver op so drivers can program the
airtime fairness weight into hardware.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-30 13:56:29 +02:00
Rosen Penev
106fd083bc mediatek: qihoo: fix WMAC eeprom
Wrong factory partition was used.

Fixes: 53fa04d261 ("mediatek: filogic: replace mtd-eeprom with nvmem")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23999
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-06-30 10:38:56 +02:00
Markus Stockhausen
cc697093b8 realtek: l3: reorganize lock access
The layer 3 code shares the register access lock with the DSA driver.
It is currently unclear to which extent this is really needed. To
avoid permanent access to the DSA private structure reorganize the
locking as follows:

- create a lock pointer in the layer 3 control structure
- link it to the DSA lock during probing
- use the ctrl->lock pointer whenever needed.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:08 +02:00
Markus Stockhausen
efe23afc8b realtek: l3: move route_use_bm to layer 3
This is another variable that belongs to the layer 3 code.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:08 +02:00
Markus Stockhausen
649d926584 realtek: l3: move RTL930x setup to layer 3 code
Move the setup where it belongs and drop the no longer used
l3_setup() callback in the DSA code.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:08 +02:00
Markus Stockhausen
5fe67b9887 realtek: l3: relocate RTL83xx setup
Make use of the new layer 3 setup callback for RTL83xx.

- RTL838x had no setup. Drtop it completely
- RTL839x move the setup over to the layer 3 code.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:08 +02:00
Markus Stockhausen
658cdf86ad realtek: l3: add setup callback
The existin setup calls must be migrated from the DSA code into
the layer 3 code. Provide a new callback for that. Keep it empty
for now.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:08 +02:00
Markus Stockhausen
867afa0e03 realtek: l3: cleanup headers
With all the code relocation it is time to clean the headers.

- otto_l3_route_ht_params is internal and can be moved to l3.c
- otto_l3_route is no longer needed in rtl-otto.h
- additionally reorder structures to avoid forward declarations

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:08 +02:00
Markus Stockhausen
339db36d97 realtek: l3: relocate find_slot()
Move find_slot() and its helpers into the new layer 3 ecosystem.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:08 +02:00
Markus Stockhausen
4d82173451 realtek: l3: relocate set_egress_intf()
Relocate set_egress_intf() to layer 3 code. While we are here change
prefix of interface structure to otto_l3_ and move its definition
to the new code too.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:08 +02:00
Markus Stockhausen
e0377bf382 realtek: l3: relocate get_egress_mac()
Move get_egress_mac() from DSA to layer 3 code.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:07 +02:00
Markus Stockhausen
04ca93a856 realtek: l3: move host_route_write to layer 3 source
Move another function from DSA to layer 3 coding.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:07 +02:00
Markus Stockhausen
55cf68c52c realtek: l3: move host_route_use_bm to layer 3
This is another layer 3 specific attribute. Move it to its new home.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 18:17:07 +02:00
Markus Stockhausen
f4ddf8d7ef realtek: irq: backport upstream patches
The interrupt driver downstream patches have been sent
upstream and got accepted. Backport them and make the
driver free of downstream hacks.

Link: https://github.com/openwrt/openwrt/pull/23679
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-29 17:50:48 +02:00
Mieczyslaw Nalewaj
0a64c7a7b6 ramips: ethernet: ralink: add mediatek,no-swconfig property
Skip swconfig registration and disable MAC learning when the
"mediatek,no-swconfig" property is set. This is needed for MT7620
devices using the internal switch as a transparent bridge to an
external RGMII switch, where ports 0-4 are unused.

The no-swconfig property itself is valid for both DSA and non-DSA
setups. However, disabling MAC learning is only required for DSA,
where multiple CPU-facing interfaces would otherwise cause an
incorrect ARL table to be built. Non-DSA setups work correctly
without disabling MAC learning.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/23933
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-06-29 14:54:58 +02:00
Luiz Angelo Daros de Luca
3c0a73b4d2 ramips: ethernet: ralink: fix offload with diff dsa tag
DSA copies the driver features to slave device, including offload
capabilites. Once a packet is sent though a DSA slave interface,
according to its features, the kernel does not calculate checksums,
expecting that the HW will fill the gaps. DSA adds the defined DSA
tag and sends the tagged packet through the master device.

Ethertype DSA tags expect the driver to calculate checksum based on the
csum_start/csum_offset. However, mtk_eth_soc does not use that info.
mtk_eth_soc checks the network header and decides if the HW can manage
that packet, unaware that mac layer now contains an extra DSA tag. When
that tag is the Mediatek CPU tag, offload will work as expected.
When it is an incompatible DSA tag (all but Mediatek) or if DSA is
stacking two incompatible DSA tags, the driver will still count on the
HW offload. In this case, packets go to the network with an incorrect
checksum.

This patch adds an extra check and disables offloading when DSA tag is
in use and it is not Mediatek. Offloading is also disabled even when DSA
tag is Mediatek but there is something else increasing the mac layer
region (possibly another stacked tag). Mediatek tag can encode 802.1Q info and
using vlan tags will still use offloading. Other mac layer protocols
that are not supported by Mediatek will disable HW offloading. PPPoE was
not tested but it is expected that it will disable offloading.

This code is heuristically trying to keep HW offload enable with DSA tags.
Anyway, in the worse case, offloading is disabled and there is an increase
in overhead, which is better than packet with wrong checksum.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23933
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-06-29 14:54:58 +02:00