]> git.ipfire.org Git - thirdparty/openwrt.git/log
thirdparty/openwrt.git
3 days agoramips: mt76x8: add support for Wodesys WD-R1208U 19535/head
Rani Hod [Sat, 19 Apr 2025 16:44:02 +0000 (19:44 +0300)] 
ramips: mt76x8: add support for Wodesys WD-R1208U

This commit adds support for a dual-band AC1200 wall plug
manufactured by Shenzhen Century Xinyang Tech Co., Ltd.

SoC:     Mediatek MT7628AN (MIPS 24KEc single core, 580 MHz)
RAM:     128 MiB DDR2 (Hynix HY5PS1G1631C)
ROM:     8 MiB SPI NOR (Zbit ZB25VQ64ASIG)
Wired:   one FE RJ45 port (+ an unpopulated footprint for a 2nd)
WiFi:    Mediatek MT7612E
Ant.:    four 2 dBi external antennas (two 2.4GHz, two 5 GHz)
LEDs:    - Power    (green, always on)
         - 2.4G     (green, controlled by MT7628)
         - 5G       (green, controlled by MT7612)
         - Extender (green, GPIO 37, used as status LED)
         - LAN      (green/yellow, controlled by RT3050 ESW)
Buttons: WPS and reset (both connected to GPIO 38)
Power:   5V 2-pin JST-XH on main PCB
         110/220V AC to 5V 1.5A DC on auxiliary PCB
UART:    57600 8n1 3.3v, holes available on the PCB as J5
         pinout is (Gnd) (Tx) (Rx)
MAC:     1C:BF:CE:xx:xx:xx       (2.4 GHz, label)
         1C:BF:CE:xx:xx:xx + 1   (LAN)
         1C:BF:CE:xx:xx:xx + 2   (WAN, not in use)
         1C:BF:CE:xx:xx:xx + 3   (5 GHz)

Original firmware is Chaos Calmer 15.05.01 (kernel 3.10.108)
with a few custom packages and a non-LuCI web interface.
Telnet is enabled, requiring an unknown root password [1].
Root password is also needed to access the router via UART console,
but passwordless telnet can be enabled via a trivial web exploit [2]
and then the root password can be removed by editing `/etc/shadow`.

Installation: Upload `sysupgrade` binary via web interface at
  `http://192.168.188.1/settings.shtml`. Alternatively, remove
  root password and use u-boot menu to flash image via TFTP.

Notes:
- Device model in Chaos Calmer is "mtk-apsoc-demo".
- It is sold under several brands, e.g., Fenvi and Linkavenir.
  It is available in two colors: white and black.
- PCB is marked "WD206AD v1.0".
- Instead of a standard ethernet transformer, the PCB has a few tiny
  SMD coils.
- The housing is identical to the one used by a 2020 model,
  WD-R1203U, which is RTL8812-based. The older model has an FCC
  listing with external and internal images: ZNPWD-R1203U.
  The FCC listing contains a letter [3] claiming WD-R1203U and
  WD-R1208U are internally identical, but evidently they are not.

[1] root:$1$7rmMiPJj$91iv9LWhfkZE/t7aCBdo.0:18388:0:99999:7:::
    This is the same hash as in Wodesys WD-R1802U.
    There are other root password hashes in `/etc/shadow_sf` and
    `/etc/shadow_yn`.
[2] curl -X POST http://192.168.188.1/cgi-bin/adm.cgi \
    -d page=Lang -d langType="en;killall telnetd;telnetd -l /bin/sh"
[3] https://fcc.report/FCC-ID/ZNPWD-R1203U/4767033

Signed-off-by: Rani Hod <rani.hod@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19535
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: rtl93xx: Add GPIO access register definitions 19574/head
Harshal Gohel [Mon, 7 Jul 2025 15:58:19 +0000 (15:58 +0000)] 
realtek: rtl93xx: Add GPIO access register definitions

mach-rtl83xx.h contained the required register definitions for older SoC
families but was missing it for RTL930x and RTL931x.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19574
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: rtl931x: Fix size of TRK_MBR_CTRL group block
Sven Eckelmann [Wed, 29 Jan 2025 18:23:33 +0000 (19:23 +0100)] 
realtek: rtl931x: Fix size of TRK_MBR_CTRL group block

Each MBR ctrl block has 64 bits to store the 56 possible ports. The offsets
between the groups is therefore also 64 bit.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19574
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: rtl931x: Add smi_poll_ctrl
Harshal Gohel [Mon, 7 Jul 2025 17:18:17 +0000 (17:18 +0000)] 
realtek: rtl931x: Add smi_poll_ctrl

The comment incorrectly stated that RTL931X doesn't have smi_poll_ctrl. But
there is actually a register for using it.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19574
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: rtl931x: Sync family parameters with RTL930x
Harshal Gohel [Mon, 14 Jul 2025 09:11:47 +0000 (11:11 +0200)] 
realtek: rtl931x: Sync family parameters with RTL930x

Some of the parameters added to RTL9300_FAMILY_ID are missing for
RTL9310_FAMILY_ID. Simply add the missing ones to keep sharing code between
the two SoCs.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19574
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: rtl931x: Fix VLAN tagging and untagging 19576/head
Harshal Gohel [Tue, 17 Jun 2025 12:46:42 +0000 (12:46 +0000)] 
realtek: rtl931x: Fix VLAN tagging and untagging

* In RTL931x, bit 31 of the (4th column) of 802_1Q_VLAN_QINQ table
  indicates the validity of l2 tunnel. Before bit 63 (3rd column)
  was being checked for validity of l2 tunnel.

* The untagged_ports requires 64 bits to represent 56 ports. Do not
  store u64 in u32 variable

* First 24 ports are represented in the 2nd register not just first 20

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19576
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agomediatek: add support for OpenFi 6C 19512/head
Jiasheng Zhu [Thu, 24 Jul 2025 13:09:30 +0000 (21:09 +0800)] 
mediatek: add support for OpenFi 6C

OpenFi 6C is a portable Wi-Fi 6 travel router based on MediaTek MT7981B+MT7976CN.

Two slightly different versions have been sold. The V1 board has a green color and lacks the modem LED. The V2 board is black and has a LED for the modem. The firmware should work on both of them.

Specifications:
- SoC: MediaTek MT7981B (Filogic 820) 1.3GHz dual-core ARM Cortex-A53
- RAM: 1GB DDR4
- Flash: 256MB SPI NAND
- Wireless: 2.4GHz/5GHz 802.11ax
- Ethernet: 1x 10/100/1000M LAN
- USB: 1x USB 3.0 Type-A port
- Expansion: M.2 slot for 5G modem
- Cooling: PWM-controlled fan
- Buttons: Reset, Mode switch
- LEDs: System, Ethernet, 5G WiFi, Modem status

**Installation via U-Boot web page**

1. Set static IP 192.168.21.2/255.255.255.0 on your computer.
2. Connect to the Ethernet port and hold the reset button while booting the device. Wait for 6-8 seconds, and release the reset button.
3. Open U-boot web page on your browser at http://192.168.21.1
4. Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
5. Wait for automatic reboot.

**Installation via sysupgrade**

Flash the sysupgrade file via LuCI upgrade page without saving the settings.

Signed-off-by: Jiasheng Zhu <newbanyaya@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19512
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agouboot-envtools: ramips: add env config for SIM SIMAX1800U 19455/head
Shiji Yang [Wed, 16 Jul 2025 14:30:26 +0000 (22:30 +0800)] 
uboot-envtools: ramips: add env config for SIM SIMAX1800U

This newly supported device has the same env partition size and
offset as SIMAX1800T.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19455
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agoramips: add support for SIM SIMAX1800U
Shiji Yang [Wed, 16 Jul 2025 14:30:26 +0000 (22:30 +0800)] 
ramips: add support for SIM SIMAX1800U

SIM SIMAX1800U has the similar hardware design as the SIMAX1800T. The
only difference is the Ethernet portmap.

Specification
-------------
- SoC       : Mediatek MT7621
- RAM       : 256 MiB DDR3
- Flash     : 128 MiB NAND Flash
- WLAN      : Mediatek MT7905 DBDC
  - 2.4 GHz : 2x2 MIMO WiFi6
  - 5 GHz   : 2x2 MIMO WiFi6
- Ethernet  : MT7621 built-in 10/100/1000 Mbps 1x WAN; 3x LAN
- UART      : 3.3V, 115200n8
- Buttons   : 1x RESET; 1x WPS/MESH
- LEDs      : 1x Multi-Color(Blue;Green;Red)
- Power     : DC 12V1A
- CMIIT ID  : 2022AP7163
- TFTP IP   :
  - server  : 192.168.1.254
  - router  : 192.168.1.28

TFTP Installation(recommend)
------------
1. Set local tftp server IP "192.168.1.254" and NetMask "255.255.255.0".
2. Rename initramfs-kernel.bin to "factory.bin" and put it in the root
   directory of the tftp server. tftpd64 is a good choice for Windows.
3. Remove all Ethernet cables and WiFi connections from the PC, except
   for the one connected to the SIMAX1800U. Start the TFTP server, plug
   in the power adapter and wait for the OpenWrt system to boot.
4. Backup "firmware" partition and rename it to "firmware.bin". We need
   it to back to the stock firmware.
5. Use "fw_printenv" command to list envs. If "firmware_select=2" is
   observed then set u-boot env variable via command:
   `fw_setenv firmware_select 1`
6. Apply sysupgrade.bin in OpenWrt LuCI.

Web UI Installation
------------
1. Apply update by uploading initramfs-factory.bin to the web UI.
2. Use "fw_printenv" command to list envs. If "firmware_select=2" is
   observed then set u-boot env variable via command:
   `fw_setenv firmware_select 1`
3. Apply squashfs-sysupgrade.bin in OpenWrt LuCI.

Return to Stock Firmware
----------------------------
  Restore the backup firmware partition in the installation step 4.

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LABEL   | 98:xx:xx:xx:xx:b2 |
| LAN     | 98:xx:xx:xx:xx:b5 |
| WAN     | 98:xx:xx:xx:xx:b2 |
| WLAN2G  | 98:xx:xx:xx:xx:b4 |
| WLAN5G  | 9a:xx:xx:xx:xx:b4 |
+---------+-------------------+

Tips:
-----------
  User can use `TFTP Installation` method to recover a brick device.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19455
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agoath79: fix LED GPIOs for COMFAST CF-EW71 v2 19665/head
Felix Golatofski [Mon, 4 Aug 2025 14:59:39 +0000 (16:59 +0200)] 
ath79: fix LED GPIOs for COMFAST CF-EW71 v2

The vendor DTS defined incorrect GPIOs for the LEDs, which caused them
to not function properly. Initially, the WAN, WLAN LEDs appeared to
work, but further testing showed that they were non-functional.

This patch corrects the GPIO assignments in the DTS, restoring full LED
functionality including blinking, except the power LED which cannot be
software controlled.

Tested on a CF-EW71 v2 unit.

Fixes: ee3a6adc6c22 ("ath79: add support for Comfast CF-EW71 v2")
Signed-off-by: Felix Golatofski <git@xdfr.de>
Link: https://github.com/openwrt/openwrt/pull/19665
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: dsa: rtl83xx: flush scheduled work on removal 19570/head
Issam Hamdi [Thu, 20 Feb 2025 15:06:00 +0000 (16:06 +0100)] 
realtek: dsa: rtl83xx: flush scheduled work on removal

The workqueue items don't need to be processed directly when they are
scheduled. It can happen that they are simply processed at a much later
time. It is therefore necessary to ensure that all workqueue items of a
driver are no longer being processed before the driver (or structures of
this driver) are destroyed.

When skipping this step, the driver driver can cause a kernel Oops on
reboot.

Unfortunately, it is not recommended [1] to flush items out of the system
workqueue - simply because this can cause deadlocks. The driver itself must
have a private workqueue which is then flushed.

[1] https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp

Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19570
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agokernel: Add kmod-w1-slave-ds2438 19694/head
Andres Heinloo [Wed, 6 Aug 2025 14:44:29 +0000 (16:44 +0200)] 
kernel: Add kmod-w1-slave-ds2438

This patch adds support for building the ds2438 one-wire kernel module.

Signed-off-by: Andres Heinloo <andres@gfz.de>
Link: https://github.com/openwrt/openwrt/pull/19694
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agodropbear: relax path permission checks for authorized keys 19611/head
Konstantin Demin [Thu, 31 Jul 2025 13:24:09 +0000 (16:24 +0300)] 
dropbear: relax path permission checks for authorized keys

Check permissions of correct folder for certificates too.

Fixes: bbe4d6ddb2a9 ("dropbear: bump to 2025.88")
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19611
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agodropbear: fix FTBFS when CONFIG_DROPBEAR_SVR_PUBKEY_OPTIONS is not enabled
Konstantin Demin [Thu, 31 Jul 2025 11:21:01 +0000 (14:21 +0300)] 
dropbear: fix FTBFS when CONFIG_DROPBEAR_SVR_PUBKEY_OPTIONS is not enabled

While this is discouraged to disable this option, both upstream and OpenWrt allows one to do it.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19611
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agodropbear: fix typos in path configuration
Konstantin Demin [Thu, 31 Jul 2025 12:09:49 +0000 (15:09 +0300)] 
dropbear: fix typos in path configuration

Replace _FILE with _PATH

Fixes: d8ff2d8cba7c ("dropbear: refactor configuration")
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19611
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: rtl931x: Fix link status get not fetching correct status 19578/head
Harshal Gohel [Tue, 8 Apr 2025 10:46:15 +0000 (10:46 +0000)] 
realtek: rtl931x: Fix link status get not fetching correct status

Just like rtl930x, rtl931x also requires two reads to fetch current link
status.

While at it, rename the function to a proper naming scheme.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Co-developed-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Co-developed-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19578
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: rtl930x: Fetch link status for all ports in switch IRQ
Harshal Gohel [Thu, 6 Mar 2025 07:47:18 +0000 (07:47 +0000)] 
realtek: rtl930x: Fetch link status for all ports in switch IRQ

Link status needs to be read twice, and a single register value is
enough for determining link status for all the ports

It is not necessary to go through each potential port separately and later
actually identify for which ports the interrupt actually was. The helper
for_each_set_bit() directly iterate through all set bits.

While at it, rename the function to a proper naming scheme.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Co-developed-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19578
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: dsa: enhance pcs_get_state() for RTL93xx 19575/head
Harshal Gohel [Mon, 14 Jul 2025 08:37:28 +0000 (10:37 +0200)] 
realtek: dsa: enhance pcs_get_state() for RTL93xx

Currently the SerDes driven SFP ports give strange ethtool readings
on RTL93xx devices. Especially duplex and speed are shown even if
no link is up and running. That leads to confusion because the MAC
reports arbitrary values.

Enhance the readout by refactoring the pcs_get_state() function.
Calculate speed/duplex/pause only if link is detected.

Suggested-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: rtl93xx: Do not use media register to get link status
Harshal Gohel [Thu, 3 Jul 2025 13:28:22 +0000 (13:28 +0000)] 
realtek: rtl93xx: Do not use media register to get link status

The media_sts register only shows type of link, fiber/copper,
and has nothing to do with the link status

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agoprocd: update to Git HEAD (2025-08-07)
Felix Fietkau [Thu, 7 Aug 2025 13:44:56 +0000 (15:44 +0200)] 
procd: update to Git HEAD (2025-08-07)

84372dab89a8 hotplug: switch to using avl tree for hotplug subsystems
4d023b8a8c51 hotplug: send event notifications
467800980021 hotplug: ensure that the button subsystem is always registered

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 days agox86: add board mapping for Sophos XG 210r3 19647/head
Steve Wavler [Sun, 3 Aug 2025 19:59:16 +0000 (15:59 -0400)] 
x86: add board mapping for Sophos XG 210r3

Sophos XG 210r3 is a rackmounted x86 based firewall with 6 RJ-45 gigabit
ethernet ports (eth0-5) and 2 SFP gigabit ethernet ports (eth6, eth7)
all running Intel NICs supported by igb driver. This board update maps
eth0 (left most RJ-45 port) as wan and eth1-7 as lan.

Signed-off-by: Steve Wavler <trenchcoatjedi@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19647
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agokernel: Add kmod-sfc-siena for Solarflare SFN5000/6000 series NICs
Steve Wavler [Sun, 3 Aug 2025 13:02:55 +0000 (09:02 -0400)] 
kernel: Add kmod-sfc-siena for Solarflare SFN5000/6000 series NICs

kmod-sfc should add support for Solarflare SFC9000 series based cards.
However after kernel 5.19, support for the 'Siena' subclass of
SFN5000/6000 devices has been separated out since they went EOL as they
are no longer being actively developed. As kmod-sfc no longer provides
driver support for these cards and hasn't since kernel 5.2, a new kernel
module is needed to support these 10Gb Ethernet cards. More info here:
https://cateee.net/lkddb/web-lkddb/SFC_SIENA.html and here:
https://www.phoronix.com/news/Solarflare-SFC-Siena-Linux-5.19

The module can be compiled in separately and works if kernel is custom
compiled;

OpenWRT has made these changes already with the SFC 'falcon' subclass of
drivers already. See 3c5d70a and e5ba6e9

This is building on excellent work by @ynezz and @nasbdh9

Signed-off-by: Steve Wavler <trenchcoatjedi@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19647
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorealtek: use consistent definition in DTS for SFP(+) ports 19648/head
Markus Stockhausen [Sun, 3 Aug 2025 15:05:36 +0000 (11:05 -0400)] 
realtek: use consistent definition in DTS for SFP(+) ports

We are slowly getting to the point where the mdio driver will be
carved out from the ethernet driver. Since the beginning it had
the feature to hand out SFP serdes as phys. So one can access
them from the phy driver. This will be kept during the final
migration and it even will provide a consistent interface for the
phy/serdes registers.

With this being done we need to identify how to handle the affected
ports in a generic way for all targets. Doing first things first,
this starts with a consistent DTS. Currently we have:

for RTL838x + Zyxel XGS1210:
  phy-mode = "1000base-x"
  managed = "in-band-status"
  phy-handle = ...

for all other RTL93x devices:
  phy-mode = "10gbase-r"
  managed = "in-band-status"
  pseudo-phy-handle = ...

Looking at the phylink kernel code one can see a nifty detail.
There is dynamic phy bringup depending on the mode.

int phylink_fwnode_phy_connect(struct phylink *pl,
                               const struct fwnode_handle *fwnode,
                               u32 flags)
{
        struct fwnode_handle *phy_fwnode;
        struct phy_device *phy_dev;
        int ret;

        /* Fixed links and 802.3z are handled without needing a PHY */
        if (pl->cfg_link_an_mode == MLO_AN_FIXED ||
            (pl->cfg_link_an_mode == MLO_AN_INBAND &&
             phy_interface_mode_is_8023z(pl->link_interface)))
                return 0;
        ...
}

Where 802.3z means 1000base-x or 2500base-x. Aligning this with
IEEE specs it means essentially:

- 10gbase-r defined ports with phy-handle must statically bring up
  a phylink from the beginning that immediately depends on a
  phy read_status() implementation.

- 1000base-x/2500base-x defined ports will dynamically bringup a
  phylink during link detection regardless of a phy-handle. So
  it usually runs at the moment when a SFP has been plugged in.

We currently still rely on a phy-handle but do not want to bring
up the phy immediately. Commit 4457c1eee49 ("realtek: rtl93xx:
support SFPs with phys") tried to fix exactly that error for
10gbase-r definied ports. Kernel shows "sfp sfp-p8: sfp_add_phy
failed: -EBUSY" in that case.

But it did it in the wrong way. It implemented a workaround by
introducing a DTS property "pseudo-phy-handle". Instead it
should have simply converted the DTS nodes to 1000base-x.

Revert the commit and fix the DTS with wrong definitions. From
now on we have a consistent SFP definition throughout all DTS
and targets.

Aside from the positive effect this setting has it is more or
less an arbitrary speed definition. When plugging in the SFP the
real speed will be choosen dynamically.

Fixes: 4457c1eee49 ("realtek: rtl93xx: support SFPs with phys")
Tested-By: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19648
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agolantiq: replace patches with upstream version 19675/head
Aleksander Jan Bajkowski [Mon, 4 Aug 2025 13:35:47 +0000 (15:35 +0200)] 
lantiq: replace patches with upstream version

Patches 12 and 13 have been superseded by patch 12. Other patches
have no significant changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/19675
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 days agolantiq: use nvmem for bthomehub v5a 17289/head
Rosen Penev [Tue, 17 Dec 2024 00:55:55 +0000 (16:55 -0800)] 
lantiq: use nvmem for bthomehub v5a

Userspace handling of both calibration and mac addresses is deprecated.

Also fixed calibration size for ath9k. AR9287 uses 3d8 for its size.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17289
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agoltq-ptm: add NVMEM MAC support
Rosen Penev [Mon, 10 Feb 2025 00:52:51 +0000 (16:52 -0800)] 
ltq-ptm: add NVMEM MAC support

This will be used in the following commit to move MAC assignment of the
DSL interface to NVMEM.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17289
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agokernel/modules: add MCP342x I2C ADCs kernel module support 19619/head
Ondrej Kolar [Fri, 1 Aug 2025 13:12:39 +0000 (15:12 +0200)] 
kernel/modules: add MCP342x I2C ADCs kernel module support

This commit adds kernel module support for Microchip MCP342x family of I2C ADCs.

Tested on a custom board based on Hi-Link HLK-7628N.

Signed-off-by: Ondrej Kolar <ondrej@kolarovo.cz>
Link: https://github.com/openwrt/openwrt/pull/19619
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agorealtek: rtl930x: convert Hasivo S1100W to lzma only. 19669/head
Markus Stockhausen [Mon, 4 Aug 2025 19:34:23 +0000 (15:34 -0400)] 
realtek: rtl930x: convert Hasivo S1100W to lzma only.

The current build recipe creates a lzma based initramfs and
a gzip based sysupgrade (installation) image. No need to
use different compression methods. Use lzma for both.

Tested-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19669
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agorealtek: extend SoC information 19653/head
Jan Hoffmann [Sat, 2 Aug 2025 18:31:39 +0000 (20:31 +0200)] 
realtek: extend SoC information

Add SoC revision, CPU part number, and a flag for engineering samples to
the rtl83xx_soc_info structure.

Also extend the system type string to include this information.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/19653
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agorealtek: move and clean up CHIP_INFO register definitions
Jan Hoffmann [Tue, 5 Aug 2025 00:41:32 +0000 (02:41 +0200)] 
realtek: move and clean up CHIP_INFO register definitions

Move the definitions to mach-rtl83xx.h, so they can be used during init
to read more detailed SoC information. Also rename the RTL931X register,
as it has the same address on all RTL93xx.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/19653
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agorealtek: simplify SoC detection
Jan Hoffmann [Sat, 2 Aug 2025 18:28:50 +0000 (20:28 +0200)] 
realtek: simplify SoC detection

Read model name from the register instead of using hard-coded values.

Also remove detection of the unsupported Realtek ESW/SSW SoCs. The Fast
Ethernet variants of the Maple and Cypress series stay for now, but are
moved to the RTL8380/RTL8390 families.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/19653
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agonetifd: update to Git HEAD (2025-08-06)
Felix Fietkau [Wed, 6 Aug 2025 10:29:03 +0000 (12:29 +0200)] 
netifd: update to Git HEAD (2025-08-06)

964c9aa3ec2b ucode: fix passing network vlan on handle_link
3d140ec0b834 examples: sync scripts with openwrt

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 days agomac80211: estimate expected throughput if not provided by driver/rc
Felix Fietkau [Wed, 6 Aug 2025 09:09:57 +0000 (11:09 +0200)] 
mac80211: estimate expected throughput if not provided by driver/rc

Estimate the tx throughput based on the expected per-packet tx time.
This is useful for mesh implementations that rely on expected throughput,
e.g. 802.11s or batman-adv.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 days agomac80211: backport upstream fixes
Felix Fietkau [Mon, 4 Aug 2025 17:19:29 +0000 (19:19 +0200)] 
mac80211: backport upstream fixes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 days agorealtek: use lzma recipe for TP-Link TL-ST1008F v2.0 19657/head
Jonas Jelonek [Mon, 4 Aug 2025 09:17:55 +0000 (09:17 +0000)] 
realtek: use lzma recipe for TP-Link TL-ST1008F v2.0

Use the lzma recipe for the device for both initramfs and sysupgrade to
save some flash space due to smaller image. U-Boot build on this device
has native lzma support.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19657
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agorealtek: rtl930x: move serdes functions over to mdio bus 19662/head
Markus Stockhausen [Mon, 4 Aug 2025 13:52:54 +0000 (09:52 -0400)] 
realtek: rtl930x: move serdes functions over to mdio bus

The migration of the RTL930x mdio/serdes access functions over to the
mdio bus is a little more complicated than for RTL83xx. There are several
places where the serdes is accessed directly. So do it in two steps. With
this first step:

- use the rtmdio prefix for the serdes reader/writer functions
- move the functions over to the bus (inside the ethernet driver)
- Adapt all callers.

This is not only a copy/paste but the serdes access will be hardened too.
For this:

- put a mutex around the read/write functions because we have only
  indirect register access through a mdio style bus.
- Verify input values to avoid data mess.

Tested-by: Bjørn Mork <bjorn@mork.no>
Tested-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19662
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agoead: replace legacy RETSIGTYPE with void in signal handler 19681/head
Nick Hainke [Tue, 5 Aug 2025 16:21:55 +0000 (18:21 +0200)] 
ead: replace legacy RETSIGTYPE with void in signal handler

The RETSIGTYPE macro was historically used for signal handler return types,
defaulting to int on some legacy systems. This is no longer needed,
so we now use void as the return type.

Fixes a compiler error:
  error: assignment to 'void (*)(int)' from incompatible pointer type 'int (*)()' [-Wincompatible-pointer-types]

Link: https://github.com/openwrt/openwrt/pull/19681
Signed-off-by: Nick Hainke <vincent@systemli.org>
5 days agolantiq: remove 6.6 support 19682/head
Aleksander Jan Bajkowski [Tue, 5 Aug 2025 16:59:29 +0000 (18:59 +0200)] 
lantiq: remove 6.6 support

Since 6.12 is now default, drop 6.6 support.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/19682
Signed-off-by: Nick Hainke <vincent@systemli.org>
5 days agolantiq: switch to kernel 6.12
Aleksander Jan Bajkowski [Tue, 5 Aug 2025 16:58:54 +0000 (18:58 +0200)] 
lantiq: switch to kernel 6.12

Let's switch the lantiq target to use kernel 6.12 by default.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/19682
Signed-off-by: Nick Hainke <vincent@systemli.org>
6 days agotools: lz4: update to 1.10.0 19560/head
Nick Hainke [Sun, 27 Jul 2025 16:49:43 +0000 (18:49 +0200)] 
tools: lz4: update to 1.10.0

Changelog:
https://github.com/lz4/lz4/blob/08bfdbe222fe2681600bdbef6fea885745583e61/NEWS

Switch the lz4 source from codeload to git.

Link: https://github.com/openwrt/openwrt/pull/19560
Signed-off-by: Nick Hainke <vincent@systemli.org>
6 days agomvebu: switch to kernel 6.12 19666/head
Stefan Kalscheuer [Mon, 4 Aug 2025 16:04:11 +0000 (18:04 +0200)] 
mvebu: switch to kernel 6.12

Update default kernel version to 6.12 and drop configs and patches for
kernel 6.6.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/19666
Signed-off-by: Nick Hainke <vincent@systemli.org>
6 days agorealtek: rtl930x: enable SMP 19624/head
Markus Stockhausen [Fri, 1 Aug 2025 20:02:54 +0000 (16:02 -0400)] 
realtek: rtl930x: enable SMP

Like RTL839x the RTL930x SoCs have multithreading built in.
Activate it in the kernel configuration.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19624
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agowifi-scripts: set rsn_overriding for client mode interfaces
Felix Fietkau [Mon, 4 Aug 2025 10:39:23 +0000 (12:39 +0200)] 
wifi-scripts: set rsn_overriding for client mode interfaces

Unless HE/EHT is enabled, the client should not process the RSN override IE.
This prevents picking up unsupported ciphers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 days agowifi-scripts: add support for passing wifi-device settings via procd
Felix Fietkau [Mon, 4 Aug 2025 10:08:27 +0000 (12:08 +0200)] 
wifi-scripts: add support for passing wifi-device settings via procd

Allows either overriding individual device settings, or passing complete devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 days agowifi-scripts: fix handling changes to the wifi device disabled flag
Felix Fietkau [Mon, 4 Aug 2025 09:46:05 +0000 (11:46 +0200)] 
wifi-scripts: fix handling changes to the wifi device disabled flag

Allow toggling autostart even for disabled devices
When switching from enabled to disabled, call teardown instead of setup

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 days agowifi-scripts: make wifi/utils.uc available in the legacy scripts variant
Felix Fietkau [Mon, 4 Aug 2025 09:31:05 +0000 (11:31 +0200)] 
wifi-scripts: make wifi/utils.uc available in the legacy scripts variant

It can be used to look up the phy name from uci data in ucode scripts

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 days agorealtek: RTL839x: reorganize mdio functions and SerDes register layout 19634/head
Markus Stockhausen [Sat, 2 Aug 2025 14:22:39 +0000 (10:22 -0400)] 
realtek: RTL839x: reorganize mdio functions and SerDes register layout

The RTL839x mdio functions are scattered around the code. Relocate
them to the bus (still inside the ethernet driver).

Additionally provide a consistent SerDes register access through the
mdio bus. Until now when a SerDes directly drives a SFP module there
is no clear rule of how to handle its register set that consists of
two parts:

- c22 phy registers 0-15 live in the fiber page (2) of the SerDes
- other SerDes specific registers exist in pages before and after

The mdio bus and other SerDes functions are a wild mix of directly
looking into page 2 or just using self defined methods to access
data.

Adapt the bus to the new consistent phy interface that mixes the
SerDes register set like classic Realtek phys do it.

- Use register 31 as page select (already in the bus)
- Always keep the common registers 0-15 in place and read fiber page
- Map the SerDes internal registers into the upper vendor specific
  registers 16-23 according to the page select register (31).

That gives a register mapping as follows:

+-----------------------+-----------------------+---------------+-------------+
| reg 0x00-0x0f         | reg 0x10-0x17         | reg 0x18-0x1e | reg 0x1f    |
+-----------------------+-----------------------+---------------+-------------+
| SerDes fiber page (3) | real SerDes registers | zero          | SerDes page |
| registers 0 - 15      | in packages of 8      |               | select reg  |
+-----------------------+-----------------------+---------------+-------------+

Example to make it as clear as possible.

SerDes registers on a RTL839x show

Page / Reg   | 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B ...
-------------+----------------------------------------------------------------
0 - SDS      | 0C03 0F00 7060 7106 074D 0EBF 0F0F 0359 5248 0000 0F80 0000 ...
1 - SDS_EXT  | 0000 0000 85FA 8C6D 5CCC 0000 20D8 0003 79AA 8C64 00C3 1482 ...
2 - FIB      | 1140 6189 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
3 - FIB_EXT  | 1140 6109 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...

This translates to this phy layout

             | SerDes fiber registers  normal SerDes registers  zero     p.sel
Page / Reg   | 0x00 0x01 0x02 0x03 ... 0x10 0x11 0x12 0x13 ...  0x18 ... 0x1f
-------------+---------------------------------------------------------------
0            | 1140 6189 001C CA40 ... 0C03 0F00 7060 7106 ...  0000 ... 0000
1            | 1140 6189 001C CA40 ... 5248 0000 0F80 0000 ...  0000 ... 0001
...
4            | 1140 6189 001C CA40 ... 0000 0000 85FA 8C6D ...  0000 ... 0004
...

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19634
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agowifi-scripts: fix handling hotplug-added wireless vifs
Felix Fietkau [Sun, 3 Aug 2025 19:52:06 +0000 (21:52 +0200)] 
wifi-scripts: fix handling hotplug-added wireless vifs

Pass the correct ifname and state

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agowifi-scripts: fix setup of vifs on multi-radio devices
Felix Fietkau [Sun, 3 Aug 2025 19:45:11 +0000 (21:45 +0200)] 
wifi-scripts: fix setup of vifs on multi-radio devices

Ensure that the vlan name check is bypassed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agowifi-scripts: ucode: remove leftover debug comment
Felix Fietkau [Sun, 3 Aug 2025 16:37:21 +0000 (18:37 +0200)] 
wifi-scripts: ucode: remove leftover debug comment

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agowifi-scripts: ucode: enforce MFP for SAE connections
Felix Fietkau [Sun, 3 Aug 2025 16:36:22 +0000 (18:36 +0200)] 
wifi-scripts: ucode: enforce MFP for SAE connections

Avoids connection failures

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 days agoipq40xx: Refresh kernel patches 19602/head
Hauke Mehrtens [Sun, 3 Aug 2025 13:44:57 +0000 (15:44 +0200)] 
ipq40xx: Refresh kernel patches

Make the patches apply cleanly again.

Fixes: 991dd403d3f7 ("kernel: improve pppoe performance")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 days agouboot-envtools: gs1900-48: set fw_env/sys.config 19596/head
Joe Holden [Wed, 30 Jul 2025 12:18:28 +0000 (12:18 +0000)] 
uboot-envtools: gs1900-48: set fw_env/sys.config

GS1900-48 is missing from package/boot/uboot-tools/uboot-envtools/files/realtek, so add it to be consistent.

Signed-off-by: Joe Holden <jwh@zorins.us>
Link: https://github.com/openwrt/openwrt/pull/19596
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 days agorealtek: Zyxel GS1900-48 dts fixes
Joe Holden [Tue, 29 Jul 2025 19:19:22 +0000 (19:19 +0000)] 
realtek: Zyxel GS1900-48 dts fixes

 * Use SDS for phy 48/49
 * Use correct link/phy settings for SFP ports
 * Remove read-only flag from u-boot env so fw_setenv actually works

Signed-off-by: Joe Holden <jwh@zorins.us>
Link: https://github.com/openwrt/openwrt/pull/19596
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 days agohostapd: add missing MLO check on ucode bss stop
Felix Fietkau [Sun, 3 Aug 2025 04:50:23 +0000 (06:50 +0200)] 
hostapd: add missing MLO check on ucode bss stop

Fixes a crash on some config reload types

Fixes: 816c2d86e749 ("hostapd: add support for MLO interfaces in ucode")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agonetifd: update to Git HEAD (2025-08-03)
Felix Fietkau [Sun, 3 Aug 2025 04:20:41 +0000 (06:20 +0200)] 
netifd: update to Git HEAD (2025-08-03)

b563d7b2e65a ucode: add missing return code checks for fchdir/chdir
c3cfd8df02af system-linux: add variable initialization to avoid compiler warnings on older gcc

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agokernel: improve pppoe performance
Felix Fietkau [Tue, 15 Jul 2025 10:56:57 +0000 (12:56 +0200)] 
kernel: improve pppoe performance

- drop tx qdisc
- implement rx GRO support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agotools: firmware-utils: update to Git HEAD (2025-08-03)
Hauke Mehrtens [Sat, 2 Aug 2025 23:07:33 +0000 (01:07 +0200)] 
tools: firmware-utils: update to Git HEAD (2025-08-03)

3346d77 build: add mkqdimg
950f834 iptime-crc32: add support for ipTIME AX7800M-6E

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 days agotools: gnulib: do not cache C standard option test results 19627/head
Michael Pratt [Sat, 2 Aug 2025 08:12:17 +0000 (04:12 -0400)] 
tools: gnulib: do not cache C standard option test results

After eliminating the possibility of automake having a bug
by testing a revert to the recent updates to automake,
the problems regarding autoreconf with some packages
was bisected to the gnulib update instead, through aclocal macros.

With the new module, std-gnu23, some packages are failing build
due to both the host compiler and cross compiler being tested for
availability of C23 standard features with the configure script.
The results of one is being cached and used for the other,
while the two compilers are different versions and may or may not
both support C23 options and would otherwise have conflicting results.

A similar patch may have to be done
for the next release of Autoconf
if upstream GNU does not accept this solution.

Reported-by: Georgi Valkov <gvalkov@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/19627
Signed-off-by: Nick Hainke <vincent@systemli.org>
8 days agowifi-scripts: ucode: fix ssid handling
Felix Fietkau [Sat, 2 Aug 2025 15:43:26 +0000 (17:43 +0200)] 
wifi-scripts: ucode: fix ssid handling

Add proper escaping for ssid values.
Use it to fix multi-ap backhaul ssid.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agohostapd: fix bss config reload while in DFS state
Felix Fietkau [Sat, 5 Jul 2025 18:45:48 +0000 (20:45 +0200)] 
hostapd: fix bss config reload while in DFS state

Only start a BSS after a config change if it was started before.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agowifi-scripts: ucode: add MLO interface support
Felix Fietkau [Fri, 27 Jun 2025 20:42:30 +0000 (22:42 +0200)] 
wifi-scripts: ucode: add MLO interface support

MLO can be enabled by configuring a wifi-iface section with multiple
radios, like this:

  config wifi-iface
    list radio 'radio0'
    list radio 'radio1'
    option mlo '1'
    option ssid 'OpenWrt'
    option mode 'ap'
    option network 'lan'
    ...

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agohostapd: add support for MLO interfaces in ucode
Felix Fietkau [Sun, 6 Jul 2025 16:50:00 +0000 (18:50 +0200)] 
hostapd: add support for MLO interfaces in ucode

MLO interface config is provided in a separate ubus call before
adding regular per-phy interfaces.
Preparation for full MLO support.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agohostapd: remove unnecessary ucv_gc calls
Felix Fietkau [Thu, 26 Jun 2025 12:36:10 +0000 (14:36 +0200)] 
hostapd: remove unnecessary ucv_gc calls

They should not be needed, since the code doesn't use circular references

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agohostapd: maintain ucode hostapd.bss list per interface
Felix Fietkau [Thu, 26 Jun 2025 10:54:36 +0000 (12:54 +0200)] 
hostapd: maintain ucode hostapd.bss list per interface

Preparation for MLO support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agonetifd: update to Git HEAD (2025-08-02)
Felix Fietkau [Sat, 2 Aug 2025 14:45:39 +0000 (16:45 +0200)] 
netifd: update to Git HEAD (2025-08-02)

3a7878065829 system-dummy: add missing vrf functions
471d9d6abb6d CMakeLists.txt: bump minimum required version
c3a0255e2150 scripts: fix dummy mode on systems where libubox is in /usr/local
7a3b281230e4 update example mac80211 script and wireless config
d9f2dd2614f2 wireless: replace with ucode scripts
74c22601baad wireless: add MLO support to example scripts

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agobuild: stricter hash validation on download
Felix Fietkau [Mon, 21 Jul 2025 16:32:50 +0000 (18:32 +0200)] 
build: stricter hash validation on download

Check the hash after packing the checkout and fail the build if it
does not match.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 days agorealtek: mdio: RTL838x: create new SerDes phy register layout 19604/head
Markus Stockhausen [Wed, 30 Jul 2025 10:41:28 +0000 (06:41 -0400)] 
realtek: mdio: RTL838x: create new SerDes phy register layout

When a SerDes directly drives a SFP module there is no clear rule of
how to handle its register set that consists of two parts:

- c22 phy registers 0-15 live in the fiber page (2) of the SerDes
- other SerDes specific registers exist in pages before and after

The mdio bus and other SerDes functions are a wild mix of directly
looking into page 2 or just using self defined methods to access
data.

Provide a consistent phy interface that mixes the SerDes register
set like classic Realtek phys do it.

- Use register 31 as page select (already in the bus)
- Always keep the common registers 0-15 in place and read fiber page
- Map the SerDes internal registers into the upper vendor specific
  registers 16-23 according to the page select register (31).

That gives a register mapping as follows:

+-----------------------+-----------------------+---------------+-------------+
| reg 0x00-0x0f         | reg 0x10-0x17         | reg 0x18-0x1e | reg 0x1f    |
+-----------------------+-----------------------+---------------+-------------+
| SerDes fiber page (3) | real SerDes registers | zero          | SerDes page |
| registers 0 - 15      | in packages of 8      |               | select reg  |
+-----------------------+-----------------------+---------------+-------------+

Example to make it as clear as possible.

SerDes registers on a RTL838x show

Page / Reg   | 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B ...
-------------+----------------------------------------------------------------
0 - SDS      | 0C03 0F00 7060 7106 074D 0EBF 0F0F 0359 5248 0000 0F80 0000 ...
1 - SDS_EXT  | 0000 0000 85FA 8C6D 5CCC 0000 20D8 0003 79AA 8C64 00C3 1482 ...
2 - FIB      | 1140 6189 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
3 - FIB_EXT  | 1140 6109 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...

This translates to this phy layout

             | SerDes fiber registers  normal SerDes registers  zero     p.sel
Page / Reg   | 0x00 0x01 0x02 0x03 ... 0x10 0x11 0x12 0x13 ...  0x18 ... 0x1f
-------------+---------------------------------------------------------------
0            | 1140 6189 001C CA40 ... 0C03 0F00 7060 7106 ...  0000 ... 0000
1            | 1140 6189 001C CA40 ... 5248 0000 0F80 0000 ...  0000 ... 0001
...
4            | 1140 6189 001C CA40 ... 0000 0000 85FA 8C6D ...  0000 ... 0004

For now just do it for RTL838x devices.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19604
Signed-off-by: Robert Marko <robimarko@gmail.com>
9 days agouboot-mvebu: update to version 2025.07 19621/head
Stefan Kalscheuer [Fri, 1 Aug 2025 12:57:27 +0000 (14:57 +0200)] 
uboot-mvebu: update to version 2025.07

Update package to the latest stable version.
All patches automatically refreshed.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/19621
Signed-off-by: Nick Hainke <vincent@systemli.org>
9 days agohostapd: fix logging of configuration content 17718/head
Christian Korber [Wed, 21 May 2025 12:36:00 +0000 (14:36 +0200)] 
hostapd: fix logging of configuration content

As discussed in openwrt#17517, there are contents of hostapd's configuration file logged in syslog.
This includes critical information like `passphrase`. To circumvent this condition,
this commit logs only "inline" if config_fname is inline data.

Otherwise the upstream logic of hostapd applies.

Fixes: openwrt#14049
Signed-off-by: Christian Korber <ck@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/17718
Signed-off-by: Robert Marko <robimarko@gmail.com>
9 days agoutil-linux: add last util 19586/head
John Audia [Mon, 28 Jul 2025 19:18:01 +0000 (15:18 -0400)] 
util-linux: add last util

Add a package for the last util needed to query /var/log/wtmp

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19586
Signed-off-by: Nick Hainke <vincent@systemli.org>
9 days agorockchip: Add Realtek RTL8821CU support for the Radxa ROCK Pi E v3
FUKAUMI Naoki [Fri, 1 Aug 2025 07:43:33 +0000 (07:43 +0000)] 
rockchip: Add Realtek RTL8821CU support for the Radxa ROCK Pi E v3

There is a variant of the Radxa ROCK Pi E v3 equipped with the Realtek
RTL8821CU. Add the kmod-rtw88-8821cu package for it.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/18310
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
9 days agotools: util-linux: allow building with 32-bit time 19617/head
Michael Pratt [Fri, 1 Aug 2025 04:20:48 +0000 (00:20 -0400)] 
tools: util-linux: allow building with 32-bit time

Similar to several GNU tools, util-linux when built using meson
is configured by default to error when 64-bit time is not supported.

To solve this in the same way as standard configure scripts,
check for 64-bit time support ahead of time,
and allow 32-bit time when not supported.

In the future, the YEAR_2038 variable
can be used as a build prerequisite
instead of being used for configuration.

Ref: 39e8ef33bf ("build: add test for 64-bit time support")
Fixes: e15d5cf752 ("tools/util-linux: build with meson")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/19617
Signed-off-by: Nick Hainke <vincent@systemli.org>
10 days agogettext-full: fix m4 path after gettextize update 19614/head
Nick Hainke [Thu, 31 Jul 2025 16:05:07 +0000 (18:05 +0200)] 
gettext-full: fix m4 path after gettextize update

Recent changes to gettextize altered the default path for .m4 files from
$datadir/aclocal to $datadir/gettext/m4 [0]. This caused build issues when
compiling gettext-full in OpenWrt.

This patch, originally provided by @nxhack [1], updates the OpenWrt
Makefile accordingly to ensure compatibility with the new path.

[0] https://gitweb.git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=fa98427c774aad9dade7702becc2c3eef5a8434d
[1] https://github.com/openwrt/openwrt/commit/da541f7acd62bc33e7b0a891cf65a39d4bfe0b96#commitcomment-163048847

Fixes: da541f7acd62 ("gettext-full: update to 0.24.1")
Link: https://github.com/openwrt/openwrt/pull/19614
Signed-off-by: Nick Hainke <vincent@systemli.org>
10 days agorealtek: dsa: do not open code PHY access 19548/head
Markus Stockhausen [Sun, 27 Jul 2025 11:31:11 +0000 (07:31 -0400)] 
realtek: dsa: do not open code PHY access

The DSA has a link to the MDIO bus and already uses the read/write functions
that are provided. In parallel the dsa_switch_ops structure provides an
interface for phy_read and phy_write. These are still open-coded and sadly
circumvent the bus. Simplify the implementation and avoid inconsistencies by
reusing the existing bus infrastructure.

Additionally, remove two unused MMD header definitions as a quick win.

Reported-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19548
Signed-off-by: Robert Marko <robimarko@gmail.com>
10 days agorealtek: rtl931x: Fix printing of port matrix 19572/head
Harshal Gohel [Tue, 15 Jul 2025 17:05:12 +0000 (19:05 +0200)] 
realtek: rtl931x: Fix printing of port matrix

The function rtl93xx_setup() is called by both RTL930x and RTL931x. But
only the RTL930x specific function to print port matrix was called.
Unfortuntaly, RTL931x needs a different function to access the correct
registers to retrieve the port matrix information.

It is therefore necessary differentiate in rtl93xx_setup between the
SoC families before calling the appropriate function.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19572
Signed-off-by: Robert Marko <robimarko@gmail.com>
10 days agorealtek: rtl931x: Update irq mask to cover all ports
Harshal Gohel [Mon, 14 Jul 2025 08:56:33 +0000 (10:56 +0200)] 
realtek: rtl931x: Update irq mask to cover all ports

The RTL931x has 56 (0-55) non-CPU ports. To receive updates about the port
state, it is therefore necessary to enable the interrupts for all these
ports.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19572
Signed-off-by: Robert Marko <robimarko@gmail.com>
10 days agorealtek: rtl931x: Fix traffic on upper ports
Harshal Gohel [Wed, 18 Jun 2025 11:35:15 +0000 (11:35 +0000)] 
realtek: rtl931x: Fix traffic on upper ports

* traffic isolation tables are different between rtl930x and rtl931x
* traffic_enable/disable/get/set functions span multiple columns in the
  rtl931x as a result, previous implementation would only enable traffic
  in some ports.

traffic_enable/disable and traffic_set/get should now work on all ports and
not just the initial 32

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19572
Signed-off-by: Robert Marko <robimarko@gmail.com>
10 days agorealtek: rtl930x: Fix bringup of SFP modules 19582/head
Harshal Gohel [Fri, 25 Jul 2025 11:50:36 +0000 (13:50 +0200)] 
realtek: rtl930x: Fix bringup of SFP modules

The commit d2108c2c5896 ("realtek: enhance RTL930x SerDes/PLL/CMU
interoperability") removed a couple of commands for the bringup code.
One of these commands was necessary to bring up SFP modules correctly. This
one can also be found in the RTLSDK [1].

It is currently not 100% clear what this command does. But if it works
similar to the RTL8295 [2,3] (RTL8295_SDS0_ANA_MISC_REG00_REG), we could
assume that it could be the RX_ON and RX_EN bits.

[1] https://gitlab.com/olliver/openwrt/realtek_sdk/-/blob/0e2e45341a268147e3e935a8d0276b60787c1f57/loader/u-boot-2011.12/board/Realtek/switch/sdk/src/dal/longan/dal_longan_sds.c#L1104
[2] https://svanheule.net/realtek/mango/register/serdes_indrt_access_ctrl
[3] https://github.com/plappermaul/realtek-doc/blob/54589ff0afa70045abfdc71a3133aa55c76257bc/sources/rtk-dms1250/include/hal/phy/rtl8295_reg_def.h#L7726

Reported-by: Jan Fuchs <jf@simonwunderlich.de>
Fixes: d2108c2c5896 ("realtek: enhance RTL930x SerDes/PLL/CMU interoperability")
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Co-developed-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19582
Signed-off-by: Robert Marko <robimarko@gmail.com>
10 days agokernel: add backport to fix broken PHY LEDs
Daniel Golle [Thu, 31 Jul 2025 18:48:32 +0000 (19:48 +0100)] 
kernel: add backport to fix broken PHY LEDs

A commit which broke netdev trigger LEDs offloaded to PHYs recently made
it all the way down to the Linux 6.6 stable branch. The revert has been
accepted to linux-next, however, a backport to the various -stable trees
is still pending.

Import the backported revert commit to fix in OpenWrt in the meantime
until the revert also gets picked to linux-stable.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=26f732791f2bcab18f59c61915bbe35225f30136
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
10 days agoucode-mod-bpf: add support for passing classid for tc attached programs
Felix Fietkau [Thu, 31 Jul 2025 15:31:13 +0000 (17:31 +0200)] 
ucode-mod-bpf: add support for passing classid for tc attached programs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 days agolibbpf: add support for passing classid for tc attached programs
Felix Fietkau [Thu, 31 Jul 2025 15:30:58 +0000 (17:30 +0200)] 
libbpf: add support for passing classid for tc attached programs

Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 days agotools/util-linux: build with meson 19598/head
Rosen Penev [Tue, 29 Jul 2025 20:46:18 +0000 (13:46 -0700)] 
tools/util-linux: build with meson

Simplifies Makefile by quite a bit.

Added an upstream backport fixing compilation with older OS.

Added a curses patch so -Dauto_features=disabled can work properly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19598
Signed-off-by: Nick Hainke <vincent@systemli.org>
11 days agoqualcommax: ipq6018: remove unused reserved memory 19300/head
Coia Prant [Sat, 5 Jul 2025 07:53:09 +0000 (07:53 +0000)] 
qualcommax: ipq6018: remove unused reserved memory

Deleted useless content, since it is the same as the mainline kernel

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19300
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agobuild: use --no-print-directory for dumping subtargets 19326/head
Sven Wegener [Sun, 6 Jul 2025 17:28:36 +0000 (19:28 +0200)] 
build: use --no-print-directory for dumping subtargets

Or else we end up with "Entering directory" and "Leaving directory" from make in tmp/.targetinfo

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Link: https://github.com/openwrt/openwrt/pull/19326
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agoqualcommax: cleanup device tree for GL-B3000 19400/head
Chukun Pan [Tue, 8 Jul 2025 14:20:19 +0000 (22:20 +0800)] 
qualcommax: cleanup device tree for GL-B3000

Remove extra blank lines.
Fixes typo for label and status.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/19400
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agorealtek: add NAND hardware description to RTL93xx 19583/head
Markus Stockhausen [Mon, 28 Jul 2025 14:16:24 +0000 (10:16 -0400)] 
realtek: add NAND hardware description to RTL93xx

Include the NAND specs into the DTS. It is unclear which devices
really need it. Keep it disabled for now. As the SoC register area
is defined too small until now, increase the size to an appropriate
value.

If enabled one can see the following log messages (e.g. Linksys
LGS328C or LGS352C).

[    1.206600] spi-nand spi1.0: Macronix SPI NAND was found.
[    1.212795] spi-nand spi1.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.222217] 3 fixed-partitions partitions found on MTD device spi1.0
[    1.229466] OF: Bad cell count for /soc/spi@1a400/flash@0/partitions
[    1.236617] OF: Bad cell count for /soc/spi@1a400/flash@0/partitions
[    1.244164] Creating 3 MTD partitions on "spi1.0":
[    1.249620] 0x000000000000-0x000004000000 : "ubifs"
[    1.423593] 0x000004000000-0x000005e00000 : "firmware"
[    1.738268] mtdsplit_uimage: no uImage found in "firmware"
[    1.744577] 0x000005e00000-0x000007c00000 : "runtime2"

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19583
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agorealtek: backport NAND driver for RTL93xx
Markus Stockhausen [Mon, 28 Jul 2025 14:13:26 +0000 (10:13 -0400)] 
realtek: backport NAND driver for RTL93xx

RTL93xx devices have a NAND controller built in. Upstream already
has a driver in place. Include it downstream. Activate it in the
RTL93xx builds and disable it for the RTL83xx builds.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19583
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agotools: bison: do not install or uninstall macros 19606/head
Michael Pratt [Wed, 30 Jul 2025 18:44:16 +0000 (14:44 -0400)] 
tools: bison: do not install or uninstall macros

There is a clobbering between bison and gnulib for installing
the macro file bison-i18n.m4 where gnulib has a newer version
while bison will replace it with an outdated version if built afterward.

Other builds depend on the changes made to the bison-i18n.m4 file and are
only included using aclocal unless other modifications are made in each case
in order to force imported macros from gnulib to override aclocal macros.

Gnulib is integrated within bison, however it is not with a bootstrap script
and there is already a reverse dependency between the two, where bison
is indirectly required for gnulib to start building. Therefore, do not allow
the building or cleaning of bison to install or uninstall m4 files.

Reported-by: Tianling Shen <cnsztl@immortalwrt.org>
Fixes: d19f8bc199 ("tools/gnulib: update to branch stable-202501")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/19606
Signed-off-by: Nick Hainke <vincent@systemli.org>
11 days agorealtek: rtl931x: Support enable/disable SMI Polling for SerDes ports 19603/head
Harshal Gohel [Tue, 17 Jun 2025 13:03:47 +0000 (13:03 +0000)] 
realtek: rtl931x: Support enable/disable SMI Polling for SerDes ports

During PHY matching, the SMI polling must be disabled to avoid conflicts
during the complex detection routine. Only after this finished, SMI polling
is allowed again.

This was implemented for all realtek families besides RTL931x.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19603
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agorealtek: rtl931x: Fix SDS field modifications
Harshal Gohel [Mon, 14 Jul 2025 09:35:00 +0000 (11:35 +0200)] 
realtek: rtl931x: Fix SDS field modifications

A RTL930x function to read the value from an SDS register must not used on
an RTL931x SoC. Doing it with rtl930x_read_sds_phy() would corrupt the
written results when only parts of the bits are written.

Fixes: 7026084066fb ("realtek: Add SDS configuration routines for the RTL93XX platforms")
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19603
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agotools: util-linux: refresh patches
Robert Marko [Wed, 30 Jul 2025 08:56:57 +0000 (10:56 +0200)] 
tools: util-linux: refresh patches

util-linux needs to be refreshed, so do so.

Fixes: 4fd61171294d ("tools/util-linux: fix libuuid linking")
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agorealtek: convert RTL838x toolchain to 24kc 19117/head
Markus Stockhausen [Fri, 13 Jun 2025 06:42:39 +0000 (02:42 -0400)] 
realtek: convert RTL838x toolchain to 24kc

The Realtek RTL838x devices have a MIPS 4Kec core. This has a very simple pipeline.
OpenWrt uses CPU_TYPE:=4kec to honour this and adds a dedicated toolchain with
some GB of extra space. There would be no problem if that toolchain would do what
it is expected to do. Looking at the build process one can see:

during kernel builds:
  ps -ef | grep mtune
  ... -march=mips32r2 -mtune=34kc ...

during package builds
  ps -ef | grep mtune
  ... -mips32r2 -mtune=4kec ...

So the kernel is optimized for the wrong cpu type while the applications fit fine.
Explanation for this is the generic/308-mips32r2_tune.patch. This forces kernel
builds to -mtune=34kc. Nevertheless everything runs fine since years on the RTL838x
targets.

It does not make sense to provide a dedicated 4kec toolchain for this mess. So
change the setup as follows:

- switch CPU type to mips24kc for RTL838x -> This drops one toolchain and saves space
- Add a RTl838x specific mtune=4kec patch -> Builds kernel with the proper setting

Downside is packages will be built with -mtune=24kc. So a look at a simple benchmark
should give insight if this has really a big impact. See numbers attached. To sum it
up in two sentences

- All non RSA benchmarks are within expectation
- RSA benchmarks show large deviations (before and after)

The normal usecase for these switches is definetly not a CPU intensive workload
so this is ok for now.

Before: kernel 6.12 (mtune=34kc) + apps (mtune=4kec)

root@OpenWrt:/usr/bin# ./wolfssl-benchmark
------------------------------------------------------------------------------
 wolfSSL version 5.7.6
------------------------------------------------------------------------------
wolfCrypt Benchmark (block bytes 1048576, min 1.0 sec each)
RNG                          5 MiB took 1.426 seconds,    3.507 MiB/s
AES-128-CBC-enc              5 MiB took 1.178 seconds,    4.243 MiB/s
AES-128-CBC-dec              5 MiB took 1.171 seconds,    4.270 MiB/s
AES-192-CBC-enc              5 MiB took 1.307 seconds,    3.824 MiB/s
AES-192-CBC-dec              5 MiB took 1.311 seconds,    3.815 MiB/s
AES-256-CBC-enc              5 MiB took 1.447 seconds,    3.455 MiB/s
AES-256-CBC-dec              5 MiB took 1.421 seconds,    3.519 MiB/s
AES-128-GCM-enc              5 MiB took 3.772 seconds,    1.325 MiB/s
AES-128-GCM-dec              5 MiB took 3.756 seconds,    1.331 MiB/s
AES-192-GCM-enc              5 MiB took 3.939 seconds,    1.269 MiB/s
AES-192-GCM-dec              5 MiB took 3.932 seconds,    1.272 MiB/s
AES-256-GCM-enc              5 MiB took 4.043 seconds,    1.237 MiB/s
AES-256-GCM-dec              5 MiB took 4.033 seconds,    1.240 MiB/s
GMAC Default                 2 MiB took 1.056 seconds,    1.895 MiB/s
AES-128-CTR                  5 MiB took 1.195 seconds,    4.185 MiB/s
AES-192-CTR                  5 MiB took 1.319 seconds,    3.791 MiB/s
AES-256-CTR                  5 MiB took 1.460 seconds,    3.425 MiB/s
AES-CCM-enc                  5 MiB took 2.279 seconds,    2.194 MiB/s
AES-CCM-dec                  5 MiB took 2.273 seconds,    2.200 MiB/s
ARC4                        20 MiB took 1.226 seconds,   16.315 MiB/s
CHACHA                      15 MiB took 1.001 seconds,   14.982 MiB/s
CHA-POLY                    15 MiB took 1.440 seconds,   10.416 MiB/s
3DES                         5 MiB took 4.364 seconds,    1.146 MiB/s
MD5                         25 MiB took 1.034 seconds,   24.173 MiB/s
POLY1305                    35 MiB took 1.015 seconds,   34.467 MiB/s
SHA                         25 MiB took 1.127 seconds,   22.183 MiB/s
SHA-256                     10 MiB took 1.104 seconds,    9.056 MiB/s
SHA-384                      5 MiB took 1.324 seconds,    3.775 MiB/s
SHA-512                      5 MiB took 1.325 seconds,    3.774 MiB/s
SHA-512/224                  5 MiB took 1.319 seconds,    3.791 MiB/s
SHA-512/256                  5 MiB took 1.333 seconds,    3.751 MiB/s
AES-128-CMAC                 5 MiB took 1.145 seconds,    4.366 MiB/s
AES-256-CMAC                 5 MiB took 1.413 seconds,    3.539 MiB/s
HMAC-MD5                    25 MiB took 1.034 seconds,   24.186 MiB/s
HMAC-SHA                    25 MiB took 1.122 seconds,   22.272 MiB/s
HMAC-SHA256                 10 MiB took 1.104 seconds,    9.059 MiB/s
HMAC-SHA384                  5 MiB took 1.329 seconds,    3.762 MiB/s
HMAC-SHA512                  5 MiB took 1.323 seconds,    3.778 MiB/s
PBKDF2                       1 KiB took 1.018 seconds,    1.136 KiB/s
RSA     2048  key gen         1 ops took 15.547 sec, avg 15547.322 ms, 0.064 ops/sec
RSA     3072  key gen         1 ops took 66.131 sec, avg 66131.134 ms, 0.015 ops/sec
RSA     4096  key gen         1 ops took 563.611 sec, avg 563611.230 ms, 0.002 ops/sec
RSA     2048   public       200 ops took 1.403 sec, avg 7.015 ms, 142.542 ops/sec
RSA     2048  private       100 ops took 39.099 sec, avg 390.991 ms, 2.558 ops/sec
DH      2048  key gen        14 ops took 1.009 sec, avg 72.094 ms, 13.871 ops/sec
DH      2048    agree       100 ops took 15.714 sec, avg 157.139 ms, 6.364 ops/sec
ECC   [      SECP256R1]   256  key gen       100 ops took 5.590 sec, avg 55.901 ms, 17.889 ops/sec
ECDHE [      SECP256R1]   256    agree       100 ops took 5.555 sec, avg 55.554 ms, 18.001 ops/sec
ECDSA [      SECP256R1]   256     sign       100 ops took 5.705 sec, avg 57.048 ms, 17.529 ops/sec
ECDSA [      SECP256R1]   256   verify       100 ops took 4.396 sec, avg 43.963 ms, 22.746 ops/sec
CURVE  25519  key gen       320 ops took 1.000 sec, avg 3.127 ms, 319.841 ops/sec
CURVE  25519    agree       400 ops took 1.214 sec, avg 3.034 ms, 329.546 ops/sec
Benchmark complete

After: kernel 6.12 (mtune=4kec) + apps (mtune=24kc)

root@OpenWrt:~# wolfssl-benchmark
------------------------------------------------------------------------------
 wolfSSL version 5.7.6
------------------------------------------------------------------------------
wolfCrypt Benchmark (block bytes 1048576, min 1.0 sec each)
RNG                          5 MiB took 1.428 seconds,    3.501 MiB/s
AES-128-CBC-enc              5 MiB took 1.174 seconds,    4.258 MiB/s
AES-128-CBC-dec              5 MiB took 1.162 seconds,    4.301 MiB/s
AES-192-CBC-enc              5 MiB took 1.307 seconds,    3.826 MiB/s
AES-192-CBC-dec              5 MiB took 1.313 seconds,    3.809 MiB/s
AES-256-CBC-enc              5 MiB took 1.432 seconds,    3.491 MiB/s
AES-256-CBC-dec              5 MiB took 1.426 seconds,    3.506 MiB/s
AES-128-GCM-enc              5 MiB took 3.761 seconds,    1.329 MiB/s
AES-128-GCM-dec              5 MiB took 3.748 seconds,    1.334 MiB/s
AES-192-GCM-enc              5 MiB took 3.918 seconds,    1.276 MiB/s
AES-192-GCM-dec              5 MiB took 3.922 seconds,    1.275 MiB/s
AES-256-GCM-enc              5 MiB took 4.019 seconds,    1.244 MiB/s
AES-256-GCM-dec              5 MiB took 4.014 seconds,    1.246 MiB/s
GMAC Default                 2 MiB took 1.052 seconds,    1.900 MiB/s
AES-128-CTR                  5 MiB took 1.189 seconds,    4.205 MiB/s
AES-192-CTR                  5 MiB took 1.315 seconds,    3.804 MiB/s
AES-256-CTR                  5 MiB took 1.455 seconds,    3.436 MiB/s
AES-CCM-enc                  5 MiB took 2.257 seconds,    2.215 MiB/s
AES-CCM-dec                  5 MiB took 2.269 seconds,    2.204 MiB/s
ARC4                        15 MiB took 1.062 seconds,   14.124 MiB/s
CHACHA                      15 MiB took 1.008 seconds,   14.880 MiB/s
CHA-POLY                    15 MiB took 1.461 seconds,   10.266 MiB/s
3DES                         5 MiB took 4.347 seconds,    1.150 MiB/s
MD5                         25 MiB took 1.029 seconds,   24.291 MiB/s
POLY1305                    35 MiB took 1.024 seconds,   34.181 MiB/s
SHA                         25 MiB took 1.115 seconds,   22.418 MiB/s
SHA-256                     10 MiB took 1.154 seconds,    8.664 MiB/s
SHA-384                      5 MiB took 1.345 seconds,    3.718 MiB/s
SHA-512                      5 MiB took 1.343 seconds,    3.723 MiB/s
SHA-512/224                  5 MiB took 1.350 seconds,    3.703 MiB/s
SHA-512/256                  5 MiB took 1.345 seconds,    3.718 MiB/s
AES-128-CMAC                 5 MiB took 1.143 seconds,    4.376 MiB/s
AES-256-CMAC                 5 MiB took 1.405 seconds,    3.559 MiB/s
HMAC-MD5                    25 MiB took 1.027 seconds,   24.334 MiB/s
HMAC-SHA                    25 MiB took 1.112 seconds,   22.490 MiB/s
HMAC-SHA256                 10 MiB took 1.096 seconds,    9.125 MiB/s
HMAC-SHA384                  5 MiB took 1.344 seconds,    3.721 MiB/s
HMAC-SHA512                  5 MiB took 1.347 seconds,    3.712 MiB/s
PBKDF2                       1 KiB took 1.012 seconds,    1.142 KiB/s
RSA     2048  key gen         1 ops took 27.136 sec, avg 27136.046 ms, 0.037 ops/sec
RSA     3072  key gen         1 ops took 39.922 sec, avg 39922.464 ms, 0.025 ops/sec
RSA     4096  key gen         1 ops took 519.483 sec, avg 519482.959 ms, 0.002 ops/sec
RSA     2048   public       200 ops took 1.398 sec, avg 6.989 ms, 143.073 ops/sec
RSA     2048  private       100 ops took 40.412 sec, avg 404.121 ms, 2.475 ops/sec
DH      2048  key gen        14 ops took 1.033 sec, avg 73.764 ms, 13.557 ops/sec
DH      2048    agree       100 ops took 16.401 sec, avg 164.009 ms, 6.097 ops/sec
ECC   [      SECP256R1]   256  key gen       100 ops took 5.583 sec, avg 55.830 ms, 17.912 ops/sec
ECDHE [      SECP256R1]   256    agree       100 ops took 5.555 sec, avg 55.549 ms, 18.002 ops/sec
ECDSA [      SECP256R1]   256     sign       100 ops took 5.703 sec, avg 57.032 ms, 17.534 ops/sec
ECDSA [      SECP256R1]   256   verify       100 ops took 4.203 sec, avg 42.030 ms, 23.792 ops/sec
CURVE  25519  key gen       315 ops took 1.001 sec, avg 3.176 ms, 314.822 ops/sec
CURVE  25519    agree       400 ops took 1.244 sec, avg 3.110 ms, 321.579 ops/sec
Benchmark complete

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19117
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agotoolchain: glibc: Update glibc 2.41 to recent HEAD 19543/head
Konstantin Demin [Sun, 27 Jul 2025 08:36:39 +0000 (11:36 +0300)] 
toolchain: glibc: Update glibc 2.41 to recent HEAD

1e16d0096d80 posix: Fix double-free after allocation failure in regcomp (bug 33185) [CVE-2025-8058]
e7c419a29575 iconv: iconv -o should not create executable files (bug 33164)

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19543
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 days agotools/util-linux: fix libuuid linking 19597/head
Rosen Penev [Tue, 29 Jul 2025 19:46:00 +0000 (12:46 -0700)] 
tools/util-linux: fix libuuid linking

The pkgconfig file that autotools uses is wrong for static libraries.
meson does the right thing but for static libraries, .private entries
need to move to non .private.

Fixes compilation with at least mtd-utils.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19597
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agotools/expat: fix compilation with ccache 19594/head
Rosen Penev [Sun, 27 Jul 2025 18:37:27 +0000 (11:37 -0700)] 
tools/expat: fix compilation with ccache

Even though expat is a C library, the configure script tests both C and
C++ compilers so a fix is needed for the latter.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19594
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agotools: automake: fix MAINTAINERCLEANFILES warnings 19593/head
Michael Pratt [Tue, 29 Jul 2025 17:56:10 +0000 (13:56 -0400)] 
tools: automake: fix MAINTAINERCLEANFILES warnings

It seems that, for whatever reason in this case,
the function "vardef ($var, $cond)" does not work
while "$var->def ($cond)" does work for conditionals.

Also, do not define it conditionally when defined unconditionally.
Even though the reordering patch would make that functionally sound,
it still throws a warning which can cause a build to fail
when warnings are treated as errors.

Instead, just add BUILT_SOURCES to every existing case
rather than only when BUILT_SOURCES is defined.

Fixes: 6d2bfe50d3 ("tools/automake: control all cleaning with clean variables")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/19593
Signed-off-by: Robert Marko <robimarko@gmail.com>
13 days agorealtek: add support for Vimin VM-S100-0800MS 19477/head
Colton Pawielski [Thu, 15 May 2025 01:07:15 +0000 (20:07 -0500)] 
realtek: add support for Vimin VM-S100-0800MS

Vimin VM-S100-0800MS is an 8 port Multi-Gig switch, based on RTL9303.
Ported from XikeStor SKS8300-8X with changes to support different u-boot
build.

Specification:

- SoC             : Realtek RTL9303
- RAM             : DDR3 512 MiB
- Flash           : SPI-NOR 16 MiB (Winbond W25Q128JVSQ)
- Ethernet        : 8x 1/2.5/10 Gbps (SFP+)
- LEDs/Keys (GPIO): 0x/1x
- UART            : "Console" port on the front panel
  - type          : RS-232C
  - connector     : RJ-45
  - settings      : 115200n8
- Power           : AC100-240V 50/60Hz

Flash instruction using initramfs image:

 1. Prepare TFTP server with an IP address "192.168.1.111"
 2. Connect your PC to Port1 on VM-S100-0800MS
 3. Power on VM-S100-0800MS and interrupt boot by pressing Esc
 4. Enable Port1 with the following commands

    rtk 10g 0 fiber1g (or fiber10g if 10GBase-*R, dac300cm for DAC cable)
    rtk ext-devInit 0
    rtk ext-pinSet 2 0

    Note: the last command sets tx-disable to low

 7. Download initramfs image from TFTP server

    tftpboot 0x82000000 <image name>

 8. Boot with the downloaded image

    bootm

 9. On the initramfs image, backup the stock firmware if needed
10. Upload (or download) sysupgrade image to the device
11. Erase "firmware" partition to cleanup JFFS2 of stock FW

    mtd erase firmware

12. Perform sysupgrade with the sysupgrade image
13. Wait ~120 sec to complete flashing

Reverting to stock firmware:
 1. Prepare by downloading the stock firmware. Vimin doesn't have
    the firmware on their website, tested using firmware for shared
    hardware Nicgiga S100-0800S-M.
    Filename: vmlinux-nicgiga-S100-0800S-M-241126EN.bix

 2. Prepare TFTP server with an IP address "192.168.1.111"
 3. Connect your PC to Port1 on VM-S100-0800MS
 4. Power on VM-S100-0800MS and interrupt boot by pressing Esc
 5. Enable Port1 with the following commands

    rtk 10g 0 fiber1g (or fiber10g if 10GBase-*R, dac300cm for DAC cable)
    rtk ext-devInit 0
    rtk ext-pinSet 2 0

    Note: the last command sets tx-disable to low

 6. Download initramfs image from TFTP server

    tftpboot 0x82000000 <image name>

 7. Boot with the downloaded image

    bootm

 8. Under Management -> Firmware -> Upgrade/Backup, upload bix file.
 9. Reboot device

Signed-off-by: Colton Pawielski <cepawiel@mtu.edu>
Link: https://github.com/openwrt/openwrt/pull/19477
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13 days agouboot-mediatek: fix FORESEE Flash build warning 19506/head
Shiji Yang [Mon, 21 Jul 2025 23:52:21 +0000 (07:52 +0800)] 
uboot-mediatek: fix FORESEE Flash build warning

Remove unused variable to fix the warning:

drivers/mtd/nand/spi/foresee.c: In function 'f35sqa002g_ecc_get_status':
drivers/mtd/nand/spi/foresee.c:56:29: warning: unused variable 'nand' [-Wunused-variable]
   56 |         struct nand_device *nand = spinand_to_nand(spinand);
      |                             ^~~~

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
13 days agouboot-mediatek: fix various environment errors on u-boot v2025.07
Shiji Yang [Mon, 21 Jul 2025 13:53:33 +0000 (21:53 +0800)] 
uboot-mediatek: fix various environment errors on u-boot v2025.07

Fix the crash and warnings for the newly introduced env on mtd
implementation. Also backport an out-of-bound access fix for the
"askenv" command.

Fixes: 41a9c9de66a7 ("uboot-mediatek: update to v2025.07")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>