Commit graph

67595 commits

Author SHA1 Message Date
Hauke Mehrtens
bfd57eab3d iwcap: add CPPFLAGS
Forward the OpenWrt CPPFLAGS to the compile process. This fixes fortify
sources support.

Link: https://github.com/openwrt/openwrt/pull/22056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 22:25:09 +01:00
Hauke Mehrtens
53e6935960 libcap: add CPPFLAGS
Forward the OpenWrt CPPFLAGS to the compile process. This fixes fortify
sources support.

Allow to extend the CPPFLAGS and not only overwrite.

Link: https://github.com/openwrt/openwrt/pull/22056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 22:25:09 +01:00
Hauke Mehrtens
cd1fda5c8b bzip2: add CPPFLAGS
Add the OpenWrt CPPFLAGS to the CFLAGS. bzip2 does not support CPPFLAGS.
This fixes fortify sources support.

Link: https://github.com/openwrt/openwrt/pull/22056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 22:25:05 +01:00
Hauke Mehrtens
b497c3f68f 6rd: add CPPFLAGS
Forward the OpenWrt CPPFLAGS to the compile process. This fixes fortify
sources support.

Link: https://github.com/openwrt/openwrt/pull/22056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 22:16:58 +01:00
Hauke Mehrtens
2ca7c2b846 464xlat: add CPPFLAGS
Forward the OpenWrt CPPFLAGS to the compile process. This fixes fortify
sources support.

Link: https://github.com/openwrt/openwrt/pull/22056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 22:16:58 +01:00
Hauke Mehrtens
39e5f11631 gdb: add CPPFLAGS
Forward the OpenWrt CPPFLAGS to the compile process. This fixes fortify
sources support.

Link: https://github.com/openwrt/openwrt/pull/22056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 22:16:58 +01:00
Hauke Mehrtens
35939e4db9 binutils: add CPPFLAGS
Forward the OpenWrt CPPFLAGS to the compile process. This fixes fortify
sources support.

Link: https://github.com/openwrt/openwrt/pull/22056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 22:16:58 +01:00
Maxim Anisimov
fc109d1df0 mediatek: dts: drop wrong sgmiisys0 node override
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
The sgmiisys0 override uses

  /delete-node/ mediatek,pnswap;

but mediatek,pnswap is a property, not a child node. The correct
directive would be /delete-property/. As a result, this statement never
had any effect and the property was never removed.

Drop the incorrect override.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22046
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-17 21:02:51 +01:00
Markus Stockhausen
2d779bf271 realtek: rtl930x: add memory mapping documentation
No code changes. Just some explanation how these devices
work with physical and logical memory.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22054
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-17 21:00:42 +01:00
Rosen Penev
27a673916c ath79: mr18: use nvmem for MACs
NVMEM in UBI support has been present for a while. Use it to get the
MACs. Seems caldata needs to continue to be obtained through userspace.

This fixes label-mac-device as it needs a mac-address nvmem cell.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17068
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-17 20:56:27 +01:00
Robert Marko
77a7d1ce67 qualcommax: move CMCC MR3000D-CI DTS to the DTS dir
Follow the recent change where all DTS files were moved to a dedicated dir.

Fixes: 3a39f682df ("qualcommax: ipq50xx: add support for CMCC MR3000D-CI")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-17 20:50:05 +01:00
Mikhail Kshevetskiy
2639c9ce47 uboot-airoha: an7583: fix wrong bits for SPI and SLIC clock
The change was taken from commit
907386ca6c

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/21984
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-17 20:46:36 +01:00
Mikhail Kshevetskiy
052318bc62 uboot-airoha: update to U-Boot v2026.01
Changes:
 * update to v2026.01 (this brings up EN7523 SoC support)
 * drop upstream patches
 * refresh and adapt an7583 support patches (changes based on
   https://github.com/Ansuel/openwrt/commits/main-airoha-6.12/)
 * add ethernet switch mdio support from upstream U-Boot

Notable changes:
 * make an7583 memory initialization similar to an7581 one
 * add an7583 scu/chip_scu helpers to access scu/chip_scu regmaps.
 * fix misprint in an7583 'system-controller@1fb00000' node name
 * always use board dts for nand partitioning

Notes about en7523 support
--------------------------
This set of patches brings up more or less complete support of EN7523 SoC.
Unfortunately, building of en7523 bootloader will require en7523-bl2.bin
and en7523-bl31.bin blobs which is not available at the moment.

This is the only known blocker for adding en7523 bootloader support.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/21984
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-17 20:46:36 +01:00
Mikhail Zhilkin
3a39f682df qualcommax: ipq50xx: add support for CMCC MR3000D-CI
CMCC MR3000D-CI is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
IPQ5000.

Device specification
--------------------
- SoC			: Qualcomm IPQ5018
- RAM			: 512 MiB DDR3L
- Flash			: 128 MiB SPI-NAND (GigaDevice GD5F1GQ5REYIG)
- WLAN			: 2.4/5 GHz 2T2R
- 	2.4 GHz		: Qualcomm IPQ5018 (SoC)
- 	5 GHz		: Qualcomm Atheros QCN6102
- Ethernet		: 4x 10/100/1000 Mbps
- 	Switch		: Qualcomm Atheros QCA8337
- LEDs/Keys (GPIO)	: 2x LEDs, 2x Buttons
- UART			: Through-hole on PCB
- 	Voltage		: 3.3 V
- 	Assignment	: Silkscreened on PCB
- 	Settings	: 115200n8
- Power			: 12 VDC, 1.5 A

Installation
-----------------
1. Telnet method
    a. Enable telnet
    Log in to http://192.168.10.1/ with the password on the sticker
    Modify URL according to example (keep your unique hash after ";stok=")
    and press Enter:
    http://192.168.10.1/cgi-bin/luci/;stok=78becad1b1490e45be2776025cde2b7d/api/NPCnetwork/ping?url=$(telnetd)
    You should get the following in the browser:
    {"link":0}

    b. Run tftp server on IP 192.168.10.254 and put factory image
    'openwrt-qualcommax-ipq50xx-cmcc_mr3000d-ci-squashfs-factory.ubi'
    in the tftp root dir.

    c. Login to 192.168.10.1 with telnet (user: root, pass: from the
    sticker).

    d. Download factory image from the tftp:
    tftp -l factory.ubi -r openwrt-qualcommax-ipq50xx-cmcc_mr3000d-ci-squashfs-factory.ubi -g 192.168.10.254

    e. Flash factory image:
    export rootfs=$(cat /proc/mtd | grep rootfs | grep -v _ | cut -d: -f1)
    ubidetach -f -p /dev/${rootfs}
    ubiformat /dev/${rootfs} -y -f /tmp/factory.ubi

    f. Reboot:
    reboot

2. U-Boot Method using UBI Image (using UART)
    a. Place the factory.ubi file on your TFTP server, enter U-Boot CLI
    and exec these commands:
    tftpboot <your_tftp_server_ip>:factory.ubi
    flash rootfs
    reset

3. U-Boot Method using initramfs Image (using UART)
    a. Place the openwrt-*-initramfs-fit-uImage.itb file on your TFTP
    server and rename it to initramfs.bin

    b. Enable serial console, enter to U-Boot CLI and exec these commands:
    tftpboot <your_tftp_server_ip>:initramfs.bin
    bootm

    c. Once boot completed, upload the sysupgrade.bin file to router's
    /tmp directory (using scp or wget) and execute the following command
    in openwrt shell:
    sysupgrade -n /tmp/sysupgrade.bin

MAC Addresses
-------------
+--------------+-------------------+-------------+
| Interface    | MAC example       | Location    |
+--------------+-------------------+-------------+
| LAN          | 84:7a:xx:xx:xx:dd | 0:ART, 0x6  |
| WAN (label)  | 84:7a:xx:xx:xx:dc | 0:ART, 0x0  |
| WLAN 2.4 GHz | 84:7a:xx:xx:xx:de | 0:ART, 0xc  |
| WLAN 5       | 84:7a:xx:xx:xx:df | 0:ART, 0x12 |
+--------------+-------------------+-------------+

Notes
-----
1. U-Boot is protected by a password (pass: netpower).

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21952
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-17 20:45:18 +01:00
Robert Marko
f5a63c9eda ipq-wifi: update to Git HEAD (2026-02-17)
97af8a2a2dcb ipq6018: add Link NN6000 BDF Link: https://github.com/openwrt/firmware_qca-wireless/pull/124
4b7ccdeadfc0 ipq5018: add BDFs for CMCC MR3000D-CI

Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-17 20:44:48 +01:00
Linus Walleij
33af3a9f7e gemini: add support for Teltonika RUT104
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Add support for Teltonika RUT104 3G HSUPA router.

This has been supported since about 20 years in the upstream Linux
kernel after initial contribution by Paulius Zaleckas from Teltonika.
It has some historical significance because I think it was one of the
first Teltonika Linux-based 3G routers.

Installation from scratch is done using the UART:

- UART soldering instructions with picture are available on the
  Link: (see bottom of committ message).
- First *diet down* your OpenWrt build as minimal as you can,
  I really mean this, delete everything you don't need. There
  is not much RAM to go around.
- Extract the "factory" firmare which is essentially just a tar.gz
  archive:
  tar xvfz openwrt-gemini-generic-teltonika_rut104-squashfs-factory.bin

From the RedBoot menu:

- Do NOT UNDER ANY CIRCUMSTANCE try to use the "upgrade firmare" (Z)
  alternative!
- Extract the three files zImage, rd.gz and hddapp.tgz from the archive.
- Put these three files in the root directory of your TFTP server
  (usually /var/lib/tftpboot)
- Hit 6 and set up the IP address for your device (e.g. 169.254.1.2 if
  you're using local link).
- Hit Y to "Upgrade Kernel", enter TFTP and your hosts IP number and
  type zImage. The kernel should upload and flash.
- Hit R to "Upgrade Ramdisk", enter TFTP and your hosts IP number and
  type rd.gz. The "ramdisk" (i.e. the second part of the kernel)
  should upload and flash.
- Hit A to "Upgrade Application", enter TFTP and your hosts IP number
  and type hddapp.tgz. The "application" (i.e. the root filesystem)
  should upload and flash.

This has a 1024KB Kernel partition, just extend the existing Make
functions to handle also this. The initramfs is 0x500000 instead
of 0x600000 for this one so add a parameter explicitly parameterizing
the initramfs size.

Mark non-default due to the small RAM and flash on this device.

I currently have no idea how to actually talk to the modem on this
thing but it is probably using the high-speed "modem UART" of the
Gemini. I'd be willing to help whoever wants to experiment with
it.

Link: https://dflund.se/~triad/krad/teltonika/
Link: https://github.com/openwrt/openwrt/pull/22045
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-17 11:27:22 +01:00
Edward Chow
625f01cd80 bcm53xx: fix target name of meraki_mx64-a0
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
The target name of meraki_mx64-a0 in
target/linux/bcm53xx/image/Makefile used not to be consistent with the
one defined in target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
and generates warning for "Image check failed" during sysupgrade.

This commit would also make the target name for meraki_mx64-a0 to
conform to the openwrt standard.

Signed-off-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/22034
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 01:38:01 +01:00
Hauke Mehrtens
68a466b698 ath79: add env-size for Sitecom WLR-7100 / WLR-8100 u-boot-env
The Linux kernel assumes that the u-boot environment covers the full
partition, but it only covers 0x1000 bytes. Linux checks the CRC and
does this over the full partition. This fails like this:
```
u-boot-env-layout 1f000000.spi:flash@0:partitions:partition@30000:nvmem-layout: Invalid calculated CRC32: 0xfcac8c41 (expected: 0x14e6335a)
u-boot-env-layout 1f000000.spi:flash@0:partitions:partition@30000:nvmem-layout: probe with driver u-boot-env-layout failed with error -22
```

Define the u-boot environment with a length of 0x1000 bytes to calculate
the CRC only over this area.

When replicating the u-boot environment with these parameters it
generates the same CRC:
```
mkenvimage -p 0 -b -s 0x1000 -o output.bin input.txt
```

Fixes: https://github.com/openwrt/openwrt/issues/21696
Fixes: 5e3a602def ("ath79: sitecom,wlrx100: use nvmem")
Link: https://github.com/openwrt/openwrt/pull/22030
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 01:36:52 +01:00
Hauke Mehrtens
7bf8d568f6 build: pass CPPFLAGS to cmake build
The TARGET_CPPFLAGS contain the include paths used by OpenWrt. This also
contains the including of the fortify sources headers. If they are not
provided, the applications will not use fortify sources headers when
compiled against musl. Add them to cmake builds too. cmake does not
support a special CPPFLGS option [0], just add them to CFLAGS and
CXXFLAGS like we also do it for meson and normal make.
This should fix fortify sources support for cmake builds.

I found this explanation for the flags:
 * CFLAGS: C flags, passed during compile AND link
 * CXXFLAGS: C++ flags, passed during compile AND link
 * CPPFLAGS: pre-processor flags, passed ONLY during compile
 * LDFLAGS: linker flags, passed ONLY during link

[0]: https://gitlab.kitware.com/cmake/cmake/-/issues/12928

Link: https://github.com/openwrt/openwrt/pull/22042
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 01:29:57 +01:00
Hauke Mehrtens
b237266640 fortify-headers: fix -Werror=format-nonliteral in fortify/stdio.h
Some applications might activate -Werror=format-nonliteral when building
their application. This breaks fortify headers build. Tell GCC to ignore
such warnings for this code.

This fixes the libubox and ucode build:
```
/include/fortify/stdio.h: In function 'snprintf':
/include/fortify/stdio.h:101:9: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
  101 |         return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack());
      |         ^~~~~~
/include/fortify/stdio.h: In function 'sprintf':
/include/fortify/stdio.h:110:17: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
  110 |                 __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack());
      |                 ^~~
/include/fortify/stdio.h:114:17: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
  114 |                 __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack());
      |                 ^~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
```

Link: https://github.com/openwrt/openwrt/pull/22042
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 01:29:51 +01:00
Hauke Mehrtens
0f4e4a41b2 fstools: update to Git HEAD (2026-02-15)
8d377aa627be libfstools: Rename PATH_MAX to MTD_PATH_MAX

Link: https://github.com/openwrt/openwrt/pull/22042
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-17 01:28:59 +01:00
Rosen Penev
fb71774232 lantiq: handle EPROBE_DEFER for MAC
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
If nvmem is used for ethernet mac address, we need to defer loading to
get the proper mac.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21955
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-16 21:26:05 +01:00
Markus Stockhausen
bc3b41767d realtek: dsa: move port_ignore constant to config
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Device specific constants belong into the config structure.
No need to initialize them manually during probing within a
family_id switch statement. Although there are lots of constants
that need to be converted start with port_ignore as a simple one.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22026
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-16 15:48:22 +01:00
Markus Stockhausen
6d82a50575 realtek: mdio: simplify phy_info handler
Add return value to function and add an internal pr_warn().
This simplifies the callers and avoids duplicate coding.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22008
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-16 15:44:20 +01:00
Markus Stockhausen
60d90f9017 realtek: mdio: provide for_each_port helper
For better readability provide a macro to loop over all
active ports od the mdio bus.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22008
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-16 15:44:20 +01:00
Markus Stockhausen
afbbf21714 realtek: mdio: use helper for smi topology setup
On RTL930x, RTL931x and even RTL838x the smi topology is
configured very similar. There is a bus mapping (RTL930x
and RTL931x) and a port mapping (all three). Define a
common helper that can take care of this setup and call
it before bus registration.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22008
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-16 15:44:20 +01:00
Jonas Jelonek
4026f8843f realtek: pcs: rtl931x: don't mess with autoneg
Part of the configuration sequence for 1G operation can be identified as
setting autonegotiation to enabled for that mode. Starting from a previous
commit, this is being handled properly in the set_autoneg implementation.
Thus, remove that part from the sequence which doesn't make sense there
anymore and might just cause problems.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22013
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-16 15:43:20 +01:00
Jonas Jelonek
0f4dc19e68 realtek: pcs: adjust autoneg to fix RTL931x issue
The autonegotiation setting might not have been working for RTL931x the
whole time. While there weren't any reports about issues so far, these
issues might just have been hidden behind other circumstances.

While all other variants of the Otto family have the corresponding
settings in [page 0x2 register 0x0] of a SerDes, RTL931x has a special
Front/Background SerDes architecture and actually moved the
autonegotiation settings to a digital Background SerDes. Since we use a
special mapping to have a consistent view on these Background SerDes,
RTL931x needs to write the settings to another page.

To fix this, adjust the autonegotiation setting for all variants. The
generic implementation is kept but uses per-variant register field
definitions. Those are added for all variants here, with the differing
page for RTL931x.

Another static data definition is renamed since it conflicts with a
change introduced here.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22013
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-16 15:43:20 +01:00
Jonas Jelonek
fb0bc84182 realtek: pcs: add SerDes register struct and use it
Slight differences between the variants of the Otto family are handled
so far handled using function indirection by defining per-variant
operations which are called from generic implementations. In several
case, this can still be optimized because the variants only differ in
some register addresses and/or bits while the procedure otherwise is
exactly the same.

To address this, add a new SerDes register struct where register fields
can be described and later used by generic implementations which otherwise
would need to be separate just because of slight differences. Add two
register fields for autonegotiation to that register struct which are
used by a successing patch to address a real issue.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22013
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-16 15:43:20 +01:00
Christian Marangi
6c982c7db4
ipq40xx: move Device DTS to dedicated DTS directory
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Align the ipq40xx target to the pattern already used on other devices where
the device DTS are placed in a dedicated directory separate from the files
directory.

This, while trying to enforce a common pattern for every target, also permits to
do modification to device DTS without having to trigger a recompilation of the
entire kernel (as the files directory is not touched)

Link: https://github.com/openwrt/openwrt/pull/22040
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-02-16 13:15:08 +01:00
Christian Marangi
5e8dde7094
ipq806x: move Device DTS to dedicated DTS directory
Align the ipq806x target to the pattern already used on other devices where
the device DTS are placed in a dedicated directory separate from the files
directory.

This, while trying to enforce a common pattern for every target, also permits to
do modification to device DTS without having to trigger a recompilation of the
entire kernel (as the files directory is not touched)

Link: https://github.com/openwrt/openwrt/pull/22039
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-02-16 13:14:49 +01:00
Christian Marangi
041ef9648d
qualcommbe: move Device DTS to dedicated DTS directory
Align the qualcommbe target to the pattern already used on other devices where
the device DTS are placed in a dedicated directory separate from the files
directory.

This, while trying to enforce a common pattern for every target, also permits to
do modification to device DTS without having to trigger a recompilation of the
entire kernel (as the files directory is not touched)

Link: https://github.com/openwrt/openwrt/pull/22038
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-02-16 13:14:32 +01:00
Christian Marangi
a66e30631c
qualcommax: move Device DTS to dedicated DTS directory
Align the qualcommax target to the pattern already used on other devices where
the device DTS are placed in a dedicated directory separate from the files
directory.

This, while trying to enforce a common pattern for every target, also permits to
do modification to device DTS without having to trigger a recompilation of the
entire kernel (as the files directory is not touched)

Link: https://github.com/openwrt/openwrt/pull/22037
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-02-16 13:14:13 +01:00
Mieczyslaw Nalewaj
313d563664 ramips: remove obsolete SPI flash nodes after kernel fix
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Remove incomplete SPI flash definitions from affected device tree files.
These fragments only defined address-cells and size-cells without any
actual flash configuration (partitions, compatible string, etc.).

After applying openwrt/openwrt#20942 ("kernel: of: fix bad cell count error
for SPI flash node"), the kernel properly handles SPI flash nodes without
requiring these incomplete definitions in device-specific DTS files.

This cleanup eliminates unnecessary code that was likely a workaround for
the previous kernel issue.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22036
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-16 10:47:31 +01:00
Felix Fietkau
8b994ed397 wifi-scripts: netifd: fix null dereference in config_init for missing devices
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Add optional chaining when accessing device config in the wifi-iface
loop to handle cases where a referenced device doesn't exist.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit ebd2fefea5152d032cded1ccc7cf6e731b5bbcc2)
2026-02-16 09:19:37 +01:00
Rany Hany
f012e8d50a wifi-scripts: ucode: fix ieee80211w default
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
This should not be defaulted to anything in the schema.

What seemed like a minor cleanup actually broke this
as the schema defines a default value already. I did
not notice as I had this explictly set in my config.

Fixes: 70ba7512 ("wifi-scripts: ucode: allow sae_pwe to be modified for AP mode")
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/22043
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-16 01:50:53 +01:00
Jonas Jelonek
55120e363e realtek: pcs: rtl930x: drop conditional SerDes setup
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
We can now setup most of the modes for RTL930x, recently XSGMII, QSGMII
and USXGMII-SX have been added. Thus we don't need a big list of allowed
modes anymore in SerDes setup. Drop this without replacement. Other
modes are still rejected in other places or will be rejected later with
a proper SerDes capability handling.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21930
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 14:51:54 +01:00
Jonas Jelonek
afb8a87054 realtek: pcs: rtl930x: add standalone 5G QSGMII setup
Add everything that's needed to setup QSGMII mode on the 5G SerDes. This
includes patch sequences, additions to symbol error reset and read, and
allowing this mode during SerDes setup.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21930
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 14:51:54 +01:00
Jonas Jelonek
956cf4a47c realtek: pcs: rtl930x: add standalone USXGMII-SX setup
Add everything that's needed to setup USXGMII-SX mode (10G single port
USXGMII). This includes patch sequences and adjustments to the symbol
error reset and reading, and allowing it in the SerDes setup.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21930
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 14:51:54 +01:00
Markus Stockhausen
1a1b2d3d36 realtek: mdio: initialize RTL930x mac type control
For each port (or port group) the mdio bus needs to define the
PHY type that is attached to it. There are the following bit
values that need to be set in SMI_MAC_TYPE_CTRL.

- 0x0: 10G/1G Fiber (SerDes)
- 0x1: 10G/2G5 GPHY
- 0x2: FEPHY
- 0x3: GPHY

SerDes ports are out of scope of the mdio driver and are handled
by the PCS driver. So the corresponding bits are untouched. That
is not good as the register default is 0x3 for ports 0-23. To
make it simple: Without proper setup devices that have SerDes
driven fiber ports at address 0-23 do not poll in the right way.
Link detection is broken.

Fix this by initializing the register to zero. This way all ports
that are not setup by the mdio driver default to "SerDes". That
should be a reasonable assumption.

Fixes: b271735 ("realtek: mdio: Simplify RTL930x phy polling setup")
Reported-by: Joe Holden <jwh@zorins.us>
Suggested-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22032
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 14:45:52 +01:00
Felix Fietkau
a570b9cbed unetd: update to Git HEAD (2026-02-15)
35c182b74fa4 host: fix for_each_routed_host macro using wrong variable name
52e504192ea7 host: fix gateway peers getting allowed IPs of unrelated hosts

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-02-15 14:42:03 +01:00
Goetz Goerisch
385b02614e Revert "kernel: revert ip6_tunnel use skb_vlan_inet_prepare() in __ip6_tnl_rcv()"
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
This reverts commit ee0b160acc.

A backport commit was missing which was backported upstream with
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.71&id=4ce768ac429ec1c2d4ba63a408fed454ed12b248

Link: https://lore.kernel.org/all/CANn89iL5ksZZCJr7SK9=4Sw6EejdOzr5_m6pBMM8RVtbLy_ACA@mail.gmail.com/

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22025
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 13:21:44 +01:00
Jan Hoffmann
98e7ed1462 realtek: switch Zyxel XGS1210 to NVMEM
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
These devices contain a single MAC address in the U-Boot environment.
Set it as eth0 and label MAC in device tree.

To maintain the current state, the 02_network script still sets
individual port MAC addresses and the bridge MAC address.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/22024
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-15 12:02:38 +01:00
Aleksander Jan Bajkowski
d22eb0a012 kernel: backport crypto selftests for some ciphersuites
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
FIPS 140-3 recommends that all crypto implementations should be tested
before first use. Testmanager performs initial tests based on existing
test vectors. Not all algorithms have defined test vectors, so to improve
this situation, this commit backports recently added test vectors for
three  cipher suites:
* authenc(hmac(md5),cbc(des3_ede)),
* authenc(hmac(sha224),cbc(aes)),
* authenc(hmac(sha384),cbc(aes)).

These vectors were calculated using a software implementation and then
double-checked on Mediatek MT7981 (safexcel) and NXP P2020 (talitos).
Both platforms passed self-tests.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/21970
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 01:25:54 +01:00
Rany Hany
70ba7512e7 wifi-scripts: ucode: allow sae_pwe to be modified for AP mode
Some Android devices have issues with H2E causing downgrades to PSK
when using WPA2/3. With WPA3 it doesn't work reliably whatsoever.

My Samsung A55/6 for example has the following behavior:

daemon.info hostapd: lan5g: STA <redacted> IEEE 802.11: authenticated
daemon.notice hostapd: SAE: <redacted> indicates support for SAE H2E, but did not use it
daemon.info hostapd: lan2g: STA <redacted> IEEE 802.11: authenticated
daemon.info hostapd: lan2g: STA <redacted> IEEE 802.11: associated (aid 1)
daemon.notice hostapd: lan5g: Prune association for <redacted>
daemon.notice hostapd: lan2g: AP-STA-CONNECTED <redacted> auth_alg=open
daemon.info hostapd: lan2g: STA <redacted> RADIUS: starting accounting session 8234C696AAC1AE7D
daemon.info hostapd: lan2g: STA <redacted> WPA: pairwise key handshake completed (RSN)
daemon.notice hostapd: lan2g: EAPOL-4WAY-HS-COMPLETED <redacted>

This is also brought up in the issue: https://github.com/openwrt/openwrt/issues/9963

Ultimately this allows users to have the option to at the very least
disable H2E.

Unrelated: a minor cleanup was done so that ieee80211w uses set_default instead.
There is no functional change on that front.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/22021
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 01:18:18 +01:00
Ahmed Naseef
be24a13ad5 econet: en7528: add PCIe and WiFi support
Add PCIe controller and PHY support for EN7528 SoC. This includes
a new PCIe PHY driver, EN7528-specific startup in the MediaTek PCIe
controller, and a fix for bogus prefetch window reads on bridges
that do not implement the registers.

Enable WiFi for the DASAN H660GM-A board with MT7603 (2.4 GHz) and
MT7615/MT7663 (5 GHz).

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21326
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 01:12:52 +01:00
Ahmed Naseef
a14d81d465 econet: en7528: add GPIO and LED support for DASAN H660GM-A
Enable the Airoha EN7523 GPIO driver for EN7528 and add GPIO
controller nodes to the EN7528 DTSI. Add LED, button and GPIO
definitions for the DASAN H660GM-A board.

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21326
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 01:12:52 +01:00
Ahmed Naseef
32df0bdf59 econet: en7528: add basic ethernet support
EN7528 shares the same clock/reset controller as EN7523. Enable
COMMON_CLK_EN7523 and RESET_CONTROLLER for ethernet hardware resets.
Update econet-eth driver and add it as default package.

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21326
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 01:12:52 +01:00
Ahmed Naseef
8440e79c9f econet: en7528: add support for DASAN H660GM-A
DASAN H660GM-A is a GPON ONT.

Specification:
- SoC:      EcoNet EN7528
- RAM:      256 MB
- Flash:    256 MB SPI NAND
- Ethernet: 4x 1GbE
- FXS:      1 port
- GPON:     1 port
- USB:      1x USB 2.0

Install via OEM web UI:
1. Login to the factory web UI with username "superuser"
   and password "Dz$!A!r7".
2. Rename the OpenWrt image
   openwrt-econet-en7528-dasan_h660gm-a-squashfs-tclinux.trx
   to G_ONU_openwrt.bin.
3. Upload the renamed image via the firmware upgrade page
   at Maintenance > Firmware Upgrade in the factory web UI.

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21326
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 01:12:52 +01:00
Ahmed Naseef
9ba87609b8 econet: image: add little endian TRX support for EN7528
The EN7528 SoC uses a little endian MIPS architecture, unlike the big
endian EN751221 family. The tclinux TRX firmware format stores multi-byte
fields in the CPU's native byte order, requiring different header layouts
for each architecture:

  - Big endian (EN751221): magic "2RDH", fields in big endian order
  - Little endian (EN7528): magic "HDR2", fields in little endian order

Update tclinux-trx.sh to support both endianness variants:
  - Add --endian parameter to select byte order (default: be)
  - Add --model parameter for optional platform identifier field
  - Convert to named parameters for clarity and extensibility
  - Use hex32() helper for endian-aware 32-bit field output

Move TRX_ENDIAN configuration to subtarget files, allowing each subtarget
to specify its native byte order:
  - en751221.mk: TRX_ENDIAN := be
  - en7528.mk: TRX_ENDIAN := le

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21326
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-15 01:12:52 +01:00