74924 Commits
Author SHA1 Message Date
John CrispinandRobert Marko 45db20988c qualcommax: add DSA out-of-band tagging protocol
Add kernel patch for the DSA out-of-band tagging protocol used by the
PPE switch driver, and enable CONFIG_NET_DSA_TAG_OOB.

Signed-off-by: John Crispin <john@phrozen.org>
Link: https://github.com/openwrt/openwrt/pull/22381
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-11 22:26:43 +02:00
rodriguezstandHauke Mehrtens b5ea3abd60 ramips: mt76x8: add support for Cudy LT500 Outdoor v1
Hardware:
 - SoC: MediaTek MT7628AN
 - Flash: 16 MiB SPI NOR
 - RAM: 128 MiB DDR2
 - WLAN: 2.4 GHz (MT7628AN, 11n), 5 GHz (MediaTek MT7615E, 11ac)
 - Ethernet: 1x10/100 Mbps LAN
 - Buttons: 1 Reset button
 - LEDs: 8x Green
 - LTE: internal USB-connected modem Quectel EC200A
 - Serial Console: unpopulated header 115200 8n1

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | 80:af:ca:xx:xx:x0 | label     |
| WLAN 2g | 80:af:ca:xx:xx:x0 | label     |
| WLAN 5g | 80:af:ca:xx:xx:x2 | +2        |
+---------+-------------------+-----------+

Migration to OpenWrt:
- Download the RSA signed intermediate firmware:
  `openwrt-ramips-mt76x8-cudy_lt500-outdoor-v1-squashfs-flash.bin`
- Connect computer to LAN and flash the intermediate firmware via OEM web interface
- OpenWrt is now accessible via 192.168.1.1

Revert back to OEM firmware:
- Press the reset button while powering on the device
- Connect the LAN port to the PC
- Open 192.168.1.1 in a browser and use the wizard to upload and flash OEM firmware image
- When recovery process is done, OEM firmware is accessible via 192.168.10.1 again

Signed-off-by: rodriguezst <git@rodriguezst.es>
Link: https://github.com/openwrt/openwrt/pull/23752
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-07-11 19:57:05 +02:00
ShineandHauke Mehrtens d47ce71a89 scripts: dhcp: option to override preferred Client ID per interface
Using UUID-based client IDs for DHCPv4/DHCPv6 with no option of falling
back to hardware IDs (ie. MAC-address or DUID-LL) resp. none at all (IPv4),
is causing regressions in some setups.

Introduce a new setting to override the preferred client ID to be used for
DHCPv4/DHCPv6 on a per-interface basis:

network.<ifname>.sendclientid='auto|global|hardware|none'

- "auto" (default if empty or not present) uses any explicitly defined
  client ID, or falls back to the global DUID and finally to the DUID-LL
  resp. MAC address (ie. identical to before this commit).
- "global" uses the global default DUID, if configured, for DHCPv4 and
  DHCPv6 requests, even if a client ID is explicitly specified for the i/f
- "hardware" will not pass a client ID to udhcpc/odhcp6c, even if a global
  default DUID is configured or an explicit client ID specified, resulting
  in the i/f MAC address resp. type 3 DUID(-LL) to be used
- "none" (IPv4 only) will not add an option tag 61 to DHCPv4 requests at
  all.

Signed-off-by: Shine <4c.fce2@proton.me>
Link: https://github.com/openwrt/openwrt/pull/24107
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-07-11 17:30:55 +02:00
Rosen PenevandJonas Jelonek b0a03893cb gpio-button-hotplug: fix signed issue
struct gpio_keys_button has an unsigned int for its irq field. A signed
one is needed for fwnode_irq_get. Handle it before passing it to the
button member.

Fixes: 79b9a36959 ("gpio-button-hotplug: use device and fwnode")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24174
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-11 00:32:05 +02:00
Mikhail KshevetskiyandRobert Marko baeacca598 uboot-airoha: update to v2026.07
Changes:
 * removed upstreamed patches,
 * refresh patches,
 * add en7523/an7581/an7583 pinctrl support
 * add basic PCS support for an7583
 * add an7583 specific mdio bus support

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/24165
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-10 19:41:31 +02:00
Christian Marangi 2a73f02e56 airoha: enable NPU for Nokia device and fix ADC shunt-resistor
Enable NPU and USB support for Nokia device and apply the correct value for
the shunt-resistor for the i2c ADC chip to correctly read voltage.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-07-10 08:55:45 +02:00
Shiji YangandJonas Jelonek 25ee12629e uboot-tools: update to v2026.07
Update to the latest stable version. Also remove obsolete symbol
PKG_CONFIG_SYSROOT_DIR[1].

[1] https://github.com/u-boot/u-boot/commit/8ef8dee4f3a2b2021decfefd853dbd2a1632b77f
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24123
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-09 13:01:03 +02:00
Shiji YangandJonas Jelonek f381d86d91 tools/mkimage: update to v2026.07
Update to the latest version. There are no new changes here, just
to align with uboot-tools.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24124
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-09 13:00:18 +02:00
Jonas Jelonek 32e4796045 Revert "realtek: add support for Ubiquiti UniFi USW Pro Max 24 PoE"
This reverts commit b519bc3b76.

The partition layout wasn't tested properly on the device and has major
issues, possibly soft-bricking the device on first boot. Thus, the
installation procedure in the commit message is faulty. Revert for now.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-09 10:47:21 +02:00
Rosen PenevandRobert Marko e79589bea4 mvebu: use libdeflate for gzip
Shrinks size slightly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24149
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-09 10:28:04 +02:00
Tomáš MacholdaandRobert Marko ede8c8acac mvebu: turris-mox: fix USB2 detection
Fix Turris MOX not detecting USB2 devices by explicitly adding all USB3
PHYs and PHY names to Turris MOX device-tree.

Link: https://lore.kernel.org/all/20260707210830.3708-1-tomas.macholda@nic.cz/
Signed-off-by: Tomáš Macholda <tomas.macholda@nic.cz>
Link: https://github.com/openwrt/openwrt/pull/24138
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-09 10:27:28 +02:00
Fil DunskyandJonas Jelonek 6487cc9a1f mediatek: add support for Hiveton H5000M
Hardware specification:
SoC: MediaTek MT7987A
Flash: 8GB eMMC
RAM: 1GB DDR4
Ethernet: 2x 2.5GbE (RTL8221B PHY + Internal PHY)
WiFi: MediaTek MT7992 / 2+3 antenna variant
Interface: M.2 USB for 5G module
LED: Power (hw-controlled), 2.5G WAN (user-definable),
5G Module (hw-controlled), LED-3 (user-definable),
LED-4 (user-definable)
Button: Reset, WPS
Power: USB Type-C PD
Other: PWM Fan control

MAC address assignment is unconventional: the board has no Factory
partition with pre-programmed MACs. Instead, all addresses are
derived from the eMMC CID at runtime:

  LAN : macaddr_generate_from_mmc_cid mmcblk0
  WAN : LAN + 1 (label_mac)
  phy0: LAN + 2
  phy1: LAN + 3

This matches the vendor firmware behaviour and ensures stable,
unique addresses across reboots without a dedicated EEPROM region
for MACs.

Flash instructions:

Factory `mmcblk0p2` partition is empty,
stock ImmortalWrt-798x-mt799x-6.6-mtwifi from PadavanOnly firmware
uses `MT7991_MT7976_EEPROM_BE5040_iPAiLNA.bin`.
Flashing this eeprom before flashing OpenWrt will make OpenWrt read eeprom:
```
dd if=/lib/firmware/MT7991_MT7976_EEPROM_BE5040_iPAiLNA.bin of=/dev/mmcblk0p2 bs=1 count=7680
sync
```
But it will have wifi issues for now. It's better to use OpenWrt fallback eeprom for now.

Power off the device.
Press and hold the Reset button.
Power on the device while keeping the Reset button pressed.
Wait for the device to enter U-Boot recovery mode.
Connect to the device via Ethernet (default IP: 192.168.1.1).
Set your PC's IP to 192.168.1.x (e.g., 192.168.1.100).
Open a web browser and navigate to http://192.168.1.1
Upload and flash the OpenWrt firmware
Wait for the flashing process to complete and the device to reboot.

Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21398
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-09 09:41:47 +02:00
Rosen PenevandJonas Jelonek 30a3525cdb treewide: remove fwnode_for_each_available_child_node
It's used in probe to be a generic way to iterate over the children.
Confusingly, device_for_each_child_node_scoped internally calls the
available loop despite not mentioning it.

Avoid pointless variables.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24120
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-09 09:33:41 +02:00
Rosen PenevandJonas Jelonek 79b9a36959 gpio-button-hotplug: use device and fwnode
Upstream prefers these instead of OF functions.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24120
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-09 09:33:41 +02:00
Rosen PenevandJonas Jelonek c6006b0447 kernel: replace strcpy/strcat with strscpy/strlcat
Replace deprecated strcpy/strcat calls with strscpy/strlcat for
bounds-checked string operations in swconfig_leds, clk-rtl83xx,
and UML pseudo-random MAC patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24132
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-09 09:31:24 +02:00
Harin LeeandJonas Jelonek b664ec8ab1 wifi-scripts: fix macaddr lookup in utils.uc
This fixes a simple logic error of the macaddr lookup in utils.uc.
It read from the wrong sysfs file and compared it without trimming.

Signed-off-by: Harin Lee <me@harin.net>
Link: https://github.com/openwrt/openwrt/pull/24070
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-09 09:28:08 +02:00
Tianling Shen 4cafb73e88 Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2026-07-09 10:32:05 +08:00
Jonas Jelonek b519bc3b76 realtek: add support for Ubiquiti UniFi USW Pro Max 24 PoE
Add support for RTL9302B-based Ubiquiti UniFi USW Pro Max 24 PoE switch
with 16x GbE and 8x 2.5G RJ45 ports, 2x SFP+, and a front display.

Hardware
========

  - RTL9302B switch SoC
  - 512 MiB RAM
  - 32 MiB SPI-NOR flash
  - 16x 100M/1G RJ45 ports via 2x RTL8218E
  - 8x 100M/1G/2.5G RJ45 ports via 2x RTL8224
  - PoE:
      - 400W total budget
      - 8x 802.3at, 32W per port (ports 1-8)
      - 16x 802.3bt, 60W per port (ports 9-24)
  - 2x SFP+ ports
  - Buttons: 1x Reset
  - LEDs: RGBW LED per port (Etherlighting)
  - Front touch display via USB ACM (see below)
  - Console: TTL 3.3V, 115200 8N1 (internal pin header close to SoC;
    layout front to back: VCC RX TX GND)
  - Etherlighting feature (lighting patterns and color control)
  - Vendor firmware: U-Boot + LEDE-based Ubiquiti OS

MAC address
===========

Single MAC address in EEPROM partition, applied to all ports.

Front touch display
===================

The unit has a touch-capable front display, driven by a dedicated
STM32-based MCU. Unlike other Ubiquiti switches where the MCU is
connected to the SoC via UART directly, here it is exposed as a USB
CDC-ACM serial device through an on-board Genesys Logic GL850G USB hub.
The MCU runs Ubiquiti's LCM firmware and exposes a high-level JSON
protocol (page selection, button-press events, etc.); arbitrary
pixel-level control is not possible without replacing the MCU firmware.
Display support therefore depends on both USB host support and a driver
for the LCM protocol, neither of which is currently available.

Known issues
============

  - PoE not available, depends on WIP Realtek PSE MCU driver
  - Etherlighting not controllable, driver WIP. Port LEDs for link work
    though. By default, the controller keeps the LEDs in a breathing
    state, gated by the link state delivered by the Realtek SoC.

Disclaimer
==========

Stock firmware uses a dual-bank layout (kernel0/kernel1, ~15 MiB each).
OpenWrt replaces both banks with a single contiguous firmware partition.
Flashing OpenWrt overwrites both stock kernel slots; U-Boot remains
intact and can be used for recovery.

Installation
============

1. Enable SSH on the stock UniFi OS and log in with user account.

2. Copy the OpenWrt sysupgrade image to /tmp on the switch (e.g. via
   scp).

3. Adjust IMG below to point at the copied file, then run the block as a
   whole. It writes kernel0, splits into kernel1 if the image is larger
   than that slot (otherwise invalidates kernel1 so U-Boot cannot pick
   a stale bank), and reboots:

   IMG=/tmp/openwrt-realtek-rtl930x-ubnt_usw-pro-max-24-poe-squashfs-sysupgrade.bin
   K0_BLOCKS=$((0xec0000 / 0x10000))

   dd if="$IMG" of=/dev/mtdblock2 bs=64k count=$K0_BLOCKS conv=fsync
   if [ "$(wc -c < "$IMG")" -gt $((0xec0000)) ]; then
       dd if="$IMG" of=/dev/mtdblock3 bs=64k skip=$K0_BLOCKS conv=fsync
   else
       dd if=/dev/zero of=/dev/mtdblock3 bs=64k count=1 conv=fsync
   fi
   sync
   reboot

   The switch comes up in OpenWrt after reboot.

4. It is recommended to modify the bootcmd to speed up the boot and
   prevent any issues due to the dual-boot selection. Since U-Boot by
   default uses bootubnt which does a lot of (unneeded) RTK
   initialization, quite some time passes until Linux is started.
   Additionally, the U-Boot logic fiddles with some bits on flash which
   causes JFFS2 errors in OpenWrt. While this doesn't seem to cause
   issues yet, be defensive and set the bootcmd to:

     bootm 0xb4150000

   This directly boots the uImage from flash, without doing all the
   initialization. OpenWrt is able to bootstrap the networking
   completely on its own.

It does not matter which bank stock booted from when the dd block
runs: both banks are touched in the same pass (kernel0 written, kernel1
either written or invalidated). With kernel1 invalidated, U-Boot's
internal fallback kicks in and permanently switches to kernel0 on the
next boot, so the device stays on OpenWrt as long as kernel0 is
bootable.

Recovery
========

Since the installation procedure invalidates or partially overwrites
the second bank, recovery requires serial console access (see Hardware
above for pinout).

1. Interrupt U-Boot autoboot by spamming a key during early boot to
   drop into the U-Boot prompt.

2. Bring up networking:

   rtk network on

3. Transfer an OpenWrt initramfs image via TFTP and boot it:

   tftpboot 0x82000000 <server>:<initramfs.bin>
   bootm 0x82000000

4. From the running initramfs OpenWrt, do a sysupgrade to reflash
   OpenWrt or whatever you want to recover. There is no need for the
   complicated procedure from installation since OpenWrt sees the
   firmware partition already as a whole.

Return to stock firmware
========================

There is no fully-supported revert path. The stock firmware blob is a
Ubiquiti UBNT archive (header + parts, see firmware-utils' fw.h) that
embeds a u-boot and a kernel0 uImage payload; only the latter is
relevant when writing back to the kernel partitions.

The snippet below extracts the kernel0 uImage from such a blob by
locating the uImage magic and using the size carried in the uImage
header itself, without parsing any UBNT framing. It is provided as a
best-effort starting point; verify the result before flashing,
otherwise you're on your own:

   BLOB=<firmware.bin>
   OFF=$(grep -aboF $'\x27\x05\x19\x56' "$BLOB" | head -1 | cut -d: -f1)
   SIZE=$(( $(dd if="$BLOB" bs=1 skip=$((OFF + 12)) count=4 2>/dev/null \
               | hexdump -e '1/4 "%u"') + 64 ))
   dd if="$BLOB" of=kernel0.uImage bs=1 skip="$OFF" count="$SIZE"

Once you have a clean uImage, write it to the kernel partition from
within OpenWrt. If you adjusted the bootcmd during installation, make
sure to restore it to the default "bootcmd=bootubnt". After a reboot,
Ubiquiti's firmware should boot.

Or, if you made backups of the flash before installation, just write
the backup back to flash.

Link: https://github.com/openwrt/openwrt/pull/24110
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-08 23:17:13 +02:00
Rosen PenevandJonas Jelonek 0cce5275b6 treewide: convert ranges to new syntax
Same as e1c2f02325 but for ranges.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24133
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-08 22:15:47 +02:00
Rosen PenevandRobert Marko bc42f9759f qoriq: use libdeflate for gzip
Shrinks size slightly. Tested on WatchGuard Firebox M300

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24119
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-08 19:13:25 +02:00
Rosen PenevandRobert Marko b13e9be1a1 apm821xx: nand: reenable PCI_DISABLE_COMMON_QUIRKS
This is a size reduction symbol that appears to have been disabled as a
result of wndr4700 enablement. There's a patch for that.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24129
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-08 19:11:58 +02:00
Marius DinuandRobert Marko bfa2d2f7c6 kernel-packages: multiplexer: fix menuconfig
One of the drivers appeared outside it's submenu. Fixed.

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
2026-07-08 19:08:21 +02:00
Felix Fietkau 79d2cf8820 udebug: update to Git HEAD (2026-07-08)
91591e698dac lib-ucode: fix heap buffer overflow in trace ring allocation
7530cc1d2bb2 lib-ucode: open kernel trace_pipe non-blocking
2fcb035141da lib-ucode: grow trace fetch buffer to fit oversized lines
c670cc4f9acc lib-ucode: close trace_pipe fd on trace ring error path
7690e66e6e08 udebug-cli: handle kernel trace buffer open failure
75843a1bfcc9 lib-ucode: avoid infinite loop on oversized trace lines

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-08 16:10:54 +02:00
Felix Fietkau c5854d65f2 netifd: update to Git HEAD (2026-07-08)
c0abf80df1c1 config: fix NULL pointer dereference when typed device creation fails
4a19d2568c0b device: migrate alias users when replacing a device
e2f28e5ec0a8 interface: defer interface removal to avoid use-after-free
34760f2aec34 interface: fix alias handling when the parent interface does not exist
0bab70f05296 bridge: cancel the member retry timer on teardown and free
a562a8eca41d bridge: fix memory leak of hotplug member vlan ranges
4c7b3f7caf88 proto-ext: clear the proto task kill flag when starting a new task
8a38aecd84de system-linux: include the priority when deleting ip rules
844c0fe78eed device: remove unused __devlock counter
dbdf0d0e5830 system-linux: initialise FMR prefix lengths before parsing
fb456b5e65df iprule: keep unchanged rules installed on reload
7d8f9900c273 vrf: sync changes with bonding.c/bridge.c
f0db4101c1ea vrf: remove incorrect IPv6 disable on VRF ports
9dfea5b242b2 vrf: remove unused vrf_empty field
6f6bf8bec23b vrf: rename vrf_state_type to vrf_device_type
37c770a6b86d vrf: add license header
35171a157516 system-linux: fix system_vrf_addif retry loop
6cbcc107e984 bonding: cancel the port retry timer on teardown and free
787848926a19 extdev: fix invalid frees and unwind order on handler registration failure
2a8ed44dc613 interface-ip: fix address family check when removing offlink null-routes
576e1f3de154 interface-ip: preserve subnet route state when keeping an address
10f25df801c1 bridge: fix parsing of the stp_kernel option
3132f007ebf0 bonding: skip present toggle in bonding_free_port() when device is active
24950e564fff bonding: fix stale primary_port pointer after port enable failure
4c8374dc0f79 interface: fix zone string leak on config reload
65e96ba990b2 ubus: fix netns fd leak in netns_updown error path
fa9ee5efd4b2 utils: fix out-of-bounds fallback in uci_get_validate_string
6ccbf71d7a97 utils: fix false positives and dead branch in check_pid_path
3ec503831ebd iprule: default src/dest masks to the host prefix length
9a520edc3be4 system-linux: implement the neighbour flush in system_if_clear_entries
62b6256bf95c system-linux: fix vxlan link creation with gbp disabled
6c0a837f10fc system-linux: fix rtnl socket desync when clearing kernel entries
d1a0ceb71991 macvlan: fix NULL dereference when dumping a device without parent
937c3aa801af vlandev: fix NULL dereference when dumping a device without parent
89025924ba51 vlan: fix device chain lookup for names with a non-vlan separator
c961d1e16814 vlan: fix rejection of maximum length vlan device names
1cbf89e3108c vlandev: fix type of vlan alias lookup result
08a4a7b33056 proto-ext: fix stuck state machine when the setup script fails to launch
c8c8b79a5bcb proto-ext: queue restart requests while a script task is running
0c990ce2ca09 ubus: report failure from the interface restart method
e6af4a5bf6f2 interface: fix undefined shift when computing the ip6hint mask
67f8107fb21c interface-ip: fix undefined shifts in prefix assignment arithmetic
903bd1c3daa5 interface-ip: fix out-of-bounds access in clear_if_addr for zero masks
56ffff895672 system-linux: fix ethtool feature block count
bbc818a6527f system-linux: fix EINTR retry in read_string_file
9c2970832d8f system-linux: fix off-by-one in vxlan VNI validation
c5b5d54ce2f9 bridge: validate the upper bound of hotplug vlan ranges
1595cd7b25da main: handle execvp failure on restart
24b2703171fe handler: guard against zero-length lines when parsing handler dumps
c2b760fc7cc5 handler: free glob results in netifd_init_extdev_handlers
60e3243bdcd8 handler: reject negative parameter types in handler descriptions
274b1594e0ca interface-ip: tear down the ULA prefix on an invalid prefix length
e692ec77d51b interface-ip: expire config routes with a valid option
684dc2d50902 device: fix error handling in device_create
c02101330247 interface: fully clean up partially constructed interfaces on free
1db485d6a39c handler: clear parameter list pointers on parse failure
5694c49f964f system-linux: stop receive loops on netlink errors
d108c504df4e system-linux: fix bogus master ifindex result for non-DSA devices
d6f609170f1e system-linux: fix swapped rx/tx in negotiated pause reporting
8a19380586ef extdev: fix NULL pointer dereference when parsing stats params
a1cc96488c02 extdev: fix memory leaks on device free
d2085a59abbc extdev: fix bridge config leak on no-op reload
4d1a4ae487b6 ucode: close pipe read end in spawned child processes
6c407410259c config: validate bridge vlan port and alias attributes
8afd58bead2f bridge: fix pvid clearing leaking to other vlan members
e8edb3f78652 bonding: fix port failure accounting in bonding_enable_port
6088f7b3b9d7 system-dummy: fix metric clobbering device name in route debug output

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-08 10:48:43 +02:00
Felix Fietkau 2fb1afa761 libubox: update to Git HEAD (2026-07-08)
e2fa9dcf67a8 uloop: fix use-after-free when cancelling interval timers
329d823294a0 uloop: keep signal handler installed while other watchers remain
3362b39a1c03 kvlist: fix use-after-free when updating an entry in place
b33f74af02b2 list: define list_prev_entry used by list_for_each_entry_continue_reverse
65f62583c236 udebug: check hdr before dereferencing it in set_start_time
9d7fb82530b5 udebug: reject non-power-of-two ring metadata from a peer
2e0e7f0f4d38 udebug: verify shared-memory fd size before mapping
dda814a9750a usock: retry poll() on EINTR in usock_wait_ready()
72e2b396bd9a ustream: reset byte and buffer counters when freeing buffers
be161d0320da utils: guard cbuf_order against zero and one
08081477ad6c uloop: fix kevent() eventlist size argument in register_kevent
0c3eec553828 uloop: fix kqueue timer interval arithmetic
a9ab90bd1d5d uloop: fix use-after-free in signal_consume when a callback deletes a watcher
c08a4ab53129 uloop: fix use-after-free in uloop_handle_processes when a callback deletes a process
7677b7a4f3a4 vlist: pass the tree as comparator context in VLIST_TREE_INIT

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-08 10:48:43 +02:00
Rosen PenevandJonas Jelonek c2a758b16a apm821xx: enable PM
There's support for sleep in several drivers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24075
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 23:02:03 +02:00
Rosen PenevandJonas Jelonek 72f6415ef7 mvebu: wt61p803: use fwnode for LED driver
Upstream prefers fwnode nowadays.

Also clean up the code a little bit with dev_err_probe and _scoped
helpers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24094
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 22:58:56 +02:00
Rosen PenevandJonas Jelonek f2851263c7 mvebu: move wt61p803 drivers to files
It seems that this was last attempted to be upstreamed in 2021. No
progress since then. Move to files as with many other local drivers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24094
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 22:58:56 +02:00
Rosen PenevandJonas Jelonek b8a70a1539 ramips: i2c: move local driver to files
Seems like this was last attempted to be upstreamed in 2014. Move to
files as with other local drivers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24097
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 22:58:03 +02:00
Robert MarkoandRobert Marko 273b186ac3 mac80211: ath12k: fix regulatory range for wideband radios
Currently, trying to start a 5GHz radio on 8devices Kiwi will fail as
despite the phy listing the 5GHz channels in iw phy dump, no radio actually
claims the 5GHz range.

This is because driver assumes that if radio supports 6GHz then it cannot
be used for 5Ghz, this is however not correct for wideband radios.

So, similar to the 103-wifi-ath12k-fix-5GHz-operation-on-wideband-QCN.patch
patch ath12k_regd_update() so that 5Ghz range is listed as well.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link: https://github.com/openwrt/openwrt/pull/24106
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-07 10:52:39 +02:00
Felix Fietkau 7987b1f799 ucode: fix two compiler issues
- When working with deeply nested imports, compile errors led to long
  error messages or complete hangs by compiling the same module over
  and over again.
- Fix for a function expression scope issue.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-07 10:46:12 +02:00
Felix Fietkau 8bbaad10e0 build: support git-src override for host builds
Extend the git-src source tree override to host builds. It is opt-in via
HOST_USE_GIT_SRC, since by default the host build keeps using the tarball.

Move the git-src detection and checkout recipe into unpack.mk so both the
target and host build reuse the same code.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-07 10:46:12 +02:00
OrbisAI SecurityandJonas Jelonek 37fad8b07e ixp4xx-microcode: use snprintf in IxNpeMicrocode.h
Replace sprintf() calls with snprintf() to bound writes into the
fixed-size filename[] and slnk[] stack buffers. While the current
inputs are hash-pinned firmware images, snprintf provides defense
in depth against buffer overflows if the format string output ever
exceeds buffer capacity.

Signed-off-by: OrbisAI Security <mediratta01.pally@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23172
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 09:10:02 +02:00
Ryan LeungandJonas Jelonek 4b2e7031b2 scripts: feeds: don't refresh .config upon update
Feeds update does not make updated packages available to compile; they must be installed.
Despite this, update refreshes the .config, deleting selections in the .config which have not been
installed yet. The deleted selections are not restored with `./scripts/feeds install` nor with
`make defconfig` because these steps cannot conjure up already deleted selections.

Change update to not modify the .config and leave it to `./scripts/feeds install -d <y|m|n>` or
`make defconfig` or other *config options.

Signed-off-by: Ryan Leung <untilscour@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/23241
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 09:03:33 +02:00
Joshua CovingtonandJonas Jelonek 7c69452c6a kernel: add Kconfig options for ARM64_BRBE and THP enhancements on 6.18
Introduce new kernel configuration options for memory management
and hardware-profiling features:

- KERNEL_ARM64_BRBE: Enables support for the Branch Record Buffer
  Extension (FEAT_BRBE) on ARM64 architectures when perf events are active.
- KERNEL_PERSISTENT_HUGE_ZERO_FOLIO: Allows allocating a PMD-sized
  folio for zeroing, optimizing Transparent Hugepage (THP) allocation
  performance.
- KERNEL_NO_PAGE_MAPCOUNT: Adds experimental support for bypassing
  per-page mapcount tracking to reduce memory accounting overhead under THP.

These options map directly to their respective kernel options and are
applicable on 6.18 and later.

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:42 +02:00
Joshua CovingtonandJonas Jelonek fa65dfa9d5 bcm27xx-gpu-fw: update to 20260521
Update to Git HEAD as of 2026-05-21

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:42 +02:00
Joshua CovingtonandJonas Jelonek a296a5adf7 bcm27xx-utils: update to 20260621, add rpi-fw-crypto and piolib
Update to the latest Git HEAD (2026-06-21)

bcm27xx-utils:
Separate rpi-fw-crypto and piolib into separate packages
Update required dependencies

rpi-fw-crypto:
switch from GnuTLS to OpenSSL

piolib:
build as a separate lib. Update the CMakeLists.txt file

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:42 +02:00
Joshua CovingtonandJonas Jelonek 2935c748f7 bcm27xx-gpu-fw: remove dependency for bcm2712
bcm2712 uses a dedicated eeprom chip with closed-source blobs
provided via rpi-eeprom which is part of the bcm27xx-utils.
No need to install the old firmware files on this target.

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:41 +02:00
Joshua CovingtonandJonas Jelonek 5b01351ad6 bcm27xx: do not install bcm27xx-gpu-fw on bcm2712
bcm2712 uses a dedicated eeprom chip with closed-source blobs
provided via rpi-eeprom which is part of the bcm27xx-utils.
No need to install the old firmware files on this target.

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:41 +02:00
Joshua CovingtonandJonas Jelonek c73408035d bcm27xx: enable 6.18 testing kernel
Enable testing kernel 6.18

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:41 +02:00
Joshua CovingtonandJonas Jelonek 11de7145c9 kernel: i2c-designware: disable core on 32-bit bcm27xx targets on 6.18
The bcm27xx/bcm2708 all-kmods CI build fails when modpost reaches the
DesignWare I2C core module:

  ERROR: modpost: "__aeabi_uldivmod"
  [drivers/i2c/busses/i2c-designware-core.ko] undefined!

This is triggered by CONFIG_ALL_KMODS=y. The old 32-bit Raspberry Pi
subtargets do not normally select this driver for runtime use, but all-kmods
forces the kmod package to be built anyway. On 32-bit ARM, raw 64-bit
division in a module can cause GCC to emit the ARM EABI helper
__aeabi_uldivmod, which is not available as a kernel module symbol.

The failing reference comes from i2c-designware-master.c, where clock_calc()
uses raw u64 division for SCL timing calculations (introduced with commit
3805d13c3ead21494f7d00aa44f10e3656363d4c in rpi-6.18.y / "i2c: designware:
Support non-standard bus speeds"). That is a kernel-side portability issue,
but these old bcm27xx subtargets do not use DesignWare I2C hardware. They
use the Broadcom I2C controller instead.

The failure is emitted for i2c-designware-core.ko, so guard the hidden core
package itself rather than only guarding the platform or PCI frontend package.
This prevents CONFIG_ALL_KMODS from selecting the failing core module directly
on the affected 32-bit bcm27xx subtargets.

DesignWare I2C is relevant for newer Raspberry Pi 5 / RP1 based systems, so
keep it available for bcm2712.

A similar issue was reported by NixOS for Raspberry Pi ARM builds, where
i2c-designware-core.ko failed with the same unresolved __aeabi_uldivmod symbol.
Their workaround was to disable the DesignWare I2C symbols for older Raspberry
Pi targets that do not need them.
Link: https://github.com/NixOS/nixpkgs/issues/464515

Until the underlying ARM32 kernel-side issue is fixed, avoid building
the DesignWare core package on bcm2708, bcm2709 and bcm2710.

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:40 +02:00
Joshua CovingtonandJonas Jelonek a085410bc0 bcm27xx: adapt RP1 and media kernel modules for 6.18
kmod-rp1:
kmod-rp1-mailbox:
RP1 is the I/O controller on the BCM2712 SoC. The RP1 drivers are compiled
directly into the kernel, granting access to peripherals at early boot.
Consequently, separate packages are no longer required for 6.18 on bcm2712.

kmod-rp1-cfe:
Adapt kmod-rp1-cfe packaging for Linux 6.18 kernel changes,
by updating module paths and dependencies for the upstream driver.

kmod-rp1-cfe-downstream:
kmod-rp1-hevc-dec:
Package downstream CFE and HEVC decoder drivers for bcm2712 on 6.18.

kmod-vc4:
Add a conditional dependency on kmod-drm-exec for 6.18 builds
and move DRM helper modules to their corresponding helper kmods.

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:40 +02:00
Joshua CovingtonandJonas Jelonek cedb7bbfe3 bcm27xx: update device definitions for 6.18
Synchronize the device definitions with the current rpi-6.18.y kernel tree.

Add newly introduced DTBs, update supported device identifiers, and
refresh the displayed model names to reflect the supported hardware.

Retain legacy SUPPORTED_DEVICES aliases where necessary to preserve
sysupgrade compatibility.

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:40 +02:00
Joshua CovingtonandJonas Jelonek 53b070fc8c bcm27xx: update configs for 6.18
Common options are moved to the general config file.
Additional updates for the RP1 southbridge on RP5.

done with:
`make kernel_oldconfig` and `make kernel_menuconfig`

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:39 +02:00
Joshua CovingtonandJonas Jelonek fafc2e5925 bcm27xx: refresh default configs for 6.18
done with:
yes "" | make kernel_oldconfig CONFIG_TARGET=subtarget

add new symbols to target/linux/generic/config-6.18

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:39 +02:00
Joshua CovingtonandJonas Jelonek 2c03d933d5 bcm27xx: add configs for 6.18 based on 6.12
config-6.12 -> config-6.18

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:39 +02:00
Joshua CovingtonandJonas Jelonek 41ab1ae610 bcm27xx: refresh patches
Refresh patches

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:38 +02:00
Joshua CovingtonandJonas Jelonek 348fe4f652 bcm27xx: add 6.18 patches from the RPi repo up to 6.18.37
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.18.y
Patches were generated from the diff between linux kernel branch linux-6.18.y
and rpi-6.18.y from raspberry pi kernel source:

git format-patch -N linux-6.18.y..rpi-6.18.y (HEAD)
(HEAD -> 9df439fbf76c0cb9f1a9282a7bf44b3405d51690) as of 20260701
"Commit: Merge remote-tracking branch 'stable/linux-6.18.y' into rpi-6.18.y"

Exceptions:
- github workflow patches
- applied and reverted patches
- README patches
- (def)configs
- patches merged upstream

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23703
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:48:37 +02:00
Rosen PenevandJonas Jelonek 6e5b0f352c ramips: spi: move rt2800 driver to files
This is a local only driver. Move it to files as with others.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24096
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:43:00 +02:00
Rosen PenevandJonas Jelonek 9055f4ebe8 apm821xx: disable RTC
No device in apm821xx has an RTC. Remove support to slim down the
kernel.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24114
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-07 08:41:08 +02:00