Commit graph

32958 commits

Author SHA1 Message Date
Zhu Yujie
dc9436728a
kernel/siflower: Restore kernel files for v6.6
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Zhu Yujie <libriunc@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20555
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-19 20:57:30 +01:00
Zhu Yujie
e67017d489
kernel/siflower: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Zhu Yujie <libriunc@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20555
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-19 20:57:30 +01:00
Christian Marangi
00a166d065
siflower: switch to .remove_new for downstream driver
Switch to .remove_new for downstream driver that still use the old
.remove to reduce patch delta for 6.12 bump.

Suggested-by: Zhu Yujie <libriunc@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-19 11:26:55 +01:00
David Bauer
4afaacdd7f mpc85xx: relocate AP3825i simpleImage loader
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
The initramfs images beginning 24.10 do not boot on the AP3825i. The
space available for decompression preceeding the compressed image is not
enough, crashing the system.

To make existing installation instructions continue to work, link the
loader at an address following the loadaddress of the U-Boot image.

Signed-off-by: David Bauer <mail@david-bauer.net>
2025-11-18 21:41:35 +01:00
David Bauer
d91d4b0a74 mpc85xx: drop Kernel 6.6
Signed-off-by: David Bauer <mail@david-bauer.net>
2025-11-18 21:41:35 +01:00
David Bauer
80ba925d02 mediatek: add uqmi to RUTC50 default packages
Teltonika RUTC50 has a 5G modem. Install uqmi by default to control the
modem with the default package set.

Signed-off-by: David Bauer <mail@david-bauer.net>
2025-11-18 20:42:09 +01:00
David Senoner
68f0988205 ramips: Add support for TP-Link Archer A5 v6 (EU)
According to the TP-Link websites the Archer C50 v6 EU is the same model
as the Archer A5 v6 EU. Installation method is the same as the C50 v6, as
they are basically the same hardware.
The commit is based on e9ac1b1.

Signed-off-by: David Senoner <seda18@rolmail.net>
2025-11-18 20:42:08 +01:00
Nick Hainke
e867131a20 qoriq: enable 6.12 testing kernel
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Add testing kernel support.

Signed-off-by: Nick Hainke <vincent@systemli.org>
Link: https://github.com/openwrt/openwrt/pull/18669
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2025-11-18 19:29:27 +02:00
Nick Hainke
0853ffc7f1 qoriq: refresh 6.12 kernel config files
All kernel symbols are automatically refreshed by
`make kernel_oldconfig CONFIG_TARGET=target`.

Signed-off-by: Nick Hainke <vincent@systemli.org>
Link: https://github.com/openwrt/openwrt/pull/18669
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2025-11-18 19:29:27 +02:00
Nick Hainke
0f198be3bf kernel/qoriq: Restore kernel files for v6.6
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
Link: https://github.com/openwrt/openwrt/pull/18669
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2025-11-18 19:29:27 +02:00
Nick Hainke
21fcb093a6 kernel/qoriq: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Nick Hainke <vincent@systemli.org>
Link: https://github.com/openwrt/openwrt/pull/18669
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2025-11-18 19:29:27 +02:00
Tianling Shen
0ccb7c9100 rockchip: backport eMMC CQE support
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
Build host tools / Build host tools for linux and macos based systems (push) Waiting to run
Backport eMMC Command Queuing support for RK3576/RK3588.

As the RK3576 device-tree has been upstreamed with the 'supports-cqe;'
property set by default, the kernel already tried to use CQE, which
results in system hang during suspend. This fixes the issue.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/20780
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-18 17:26:45 +01:00
Rosen Penev
dc420acc77
apm821xx: fix pcie node numbers
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
The values provides are correct if after the @ it would be the bus
number and then device number. But it's actually, device and then
function for pcie devices.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19425
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 13:15:12 +01:00
Rosen Penev
66a7e04e9e
apm821xx: rename pciex to pcie
Fixes:

Warning (pci_bridge): /plb/pciex@d00000000: node name is not "pci" or "pcie"

Matches upstream commit: 86bc917d2ac117ec922dbf8ed92ca989bf333281

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19425
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 13:15:12 +01:00
Christian Marangi
e5ad92c588
kernel: mtdsplit: rework and make use of -ENOENT error
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
Rework each affected mtdsplit driver to make use of -ENOENT error
instead of -ENODEV to handle new kernel that checks error from parser on
subpartitions.

The only acceptable error is -ENOENT that skip the parser. This follow
pattern used upstream and also by an mtdsplit parser, mtdsplit_bcm_wfi,
and also by a workaround currently implemented for mtdsplit_mstc_boot.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 13:07:59 +01:00
Christian Marangi
1db7ed390d
Revert "kernel: mtdsplit_fit: always return 0 when partition can't be split"
This reverts commit 627a0e7da0.

A better solution has been accepted upstream that doesn't hide all
unexpected error.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:53:29 +01:00
Christian Marangi
39aa7c77f9
airoha: refresh kernel patches
Refresh kernel patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:51:58 +01:00
Christian Marangi
b7aa0aa9bf
airoha: backport patch fixing offload support with GDM2 present
Backport upstream patch fixing offload support in the presence of GDM2
interface.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:50:50 +01:00
Stefan Kalscheuer
bcae238390
bcm53xx: add 6.12 testing kernel
Add 6.12 testing kernel for bcm53xx target.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20167
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:49:25 +01:00
Stefan Kalscheuer
9fc6c0317e
bcm53xx: 6.12: refresh kernel config
Add new and remove obsolete symbols for Kernel 6.12 by running
make kernel_oldconfig.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20167
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:49:25 +01:00
Stefan Kalscheuer
ce058f2c7b
bcm53xx: 6.12: refresh patches
Drop upstreamed patches:
030-v6.7-0001-ARM-dts-BCM5301X-Set-MACs-for-D-Link-DIR-885L.patch
030-v6.7-0002-ARM-dts-BCM5301X-Set-MAC-address-for-Asus-RT-AC87U.patch
030-v6.7-0003-ARM-dts-BCM5301X-Relicense-Felix-s-code-to-the-GPL-2.patch
030-v6.7-0004-ARM-dts-BCM5301X-Relicense-Vivek-s-code-to-the-GPL-2.patch
030-v6.7-0005-ARM-dts-BCM5301X-Explicitly-disable-unused-switch-CP.patch
030-v6.7-0006-ARM-dts-BCM5301X-Set-fixed-link-for-extra-Netgear-R8.patch
030-v6.7-0007-ARM-dts-BCM5301X-Set-switch-ports-for-Linksys-EA9200.patch
040-v6.11-ARM-dts-broadcom-convert-NVMEM-content-to-layout-syntax.patch

All other patches automatically refreshed.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20167
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:49:24 +01:00
Stefan Kalscheuer
9e3c242992
kernel/bcm53xx: Restore kernel files for v6.6
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20167
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:49:24 +01:00
Stefan Kalscheuer
fc6cdb7ba1
kernel/bcm53xx: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20167
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:49:24 +01:00
Christian Marangi
2434ad8b08
generic: 6.12: backport fix for mtd parser error handling
Backport a trivial patch that half restore original functionality of MTD
parser for subpartition by ignoring if the parser returns -ENOENT.

This fix parsing and booting of some brcm devices.

Link: https://github.com/openwrt/openwrt/pull/20822
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:48:38 +01:00
Stefan Kalscheuer
23f9fa72b2
zynq: add 6.12 testing kernel
Add 6.12 testing kernel for zynq target.

Tested-by: Luis Araneda <luaraneda@gmail.com> # Zybo Z7-20
Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20166
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:47:54 +01:00
Stefan Kalscheuer
ef25e165cf
zynq: 6.12: refresh kernel config
Add new and remove obsolete symbols for Kernel 6.12 by running
make kernel_oldconfig.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20166
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:47:54 +01:00
Stefan Kalscheuer
ef49247b54
kernel/zynq: Restore kernel files for v6.6
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20166
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:47:53 +01:00
Stefan Kalscheuer
c55173ac54
kernel/zynq: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20166
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:47:53 +01:00
Lorenzo Bianconi
28a710885e
airoha: backport kernel part of WiFi MT76 offload patch
Backport the kernel parf of the WiFi MT76 offload patch. This is needed
as we have a dedicated package that only have mt76 related changes.

Add missing include in airoha_offload.h in order to enable MT76 NPU
offloading (and fix compilation error)

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
[ improve commit title/description and use proper patch ]
Link: https://github.com/openwrt/openwrt/pull/20807
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:45:30 +01:00
Daniel Golle
1c3b32c45a mediatek: fix uart clocks in MT7987 infracfg clock driver
MediaTek has applied a fix for the MT7987 infracfg clock driver in their
SDK, pick it.

Link: fe98d04c60/master/files/target/linux/mediatek/patches-6.12/999-clk-01-clk-mediatek-fix-mt7987-infracfg-clk-driver.patch
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-11-18 11:28:37 +00:00
Andy Chiang
93cfbc7d1f
mediatek: add support for EROFS
Enable EROFS support for Mediatek targets.

Build system: x86/64
Run-tested: mediatek/filogic GL-MT3000

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20792
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-18 12:18:02 +01:00
Stefan Kalscheuer
9d2882f3c0
bcm4908: add 6.12 testing kernel
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Add 6.12 testing kernel for bcm4908 target.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20169
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-17 21:50:53 +01:00
Stefan Kalscheuer
705f7adb34
bcm4908: 6.12: refresh kernel config
Add new and remove obsolete symbols for Kernel 6.12 by running
make kernel_oldconfig.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20169
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-17 21:50:52 +01:00
Stefan Kalscheuer
aec7153f14
bcm4908: 6.12: refresh patches
Drop upstreamed patches:
* 130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch

All other patches automatically refreshed.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20169
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-17 21:50:52 +01:00
Stefan Kalscheuer
8a8fb241f7
kernel/bcm4908: Restore kernel files for v6.6
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20169
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-17 21:50:52 +01:00
Stefan Kalscheuer
8967a34385
kernel/bcm4908: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
Link: https://github.com/openwrt/openwrt/pull/20169
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-17 21:50:51 +01:00
Kyle Hendry
08c8beec8c
bcm47xx: 6:12: refresh patches
- remove no_llseek in 831-old_gpio_wdt.patch, see
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cb787f4ac0c2e439ea8d7e6387b925f74576bdf8
- refresh remaining patches

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19708
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-17 21:48:55 +01:00
Kyle Hendry
e61b1523bb
bcm47xx: enable 6.12 testing kernel
Allow selecting 6.12 as testing kernel on bcm47xx.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19708
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-17 21:48:54 +01:00
Kyle Hendry
602f12d053
kernel/bcm47xx: Restore kernel files for v6.6
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19708
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-17 21:48:54 +01:00
Kyle Hendry
389653947c
kernel/bcm47xx: Create kernel files for v6.12 (from v6.6)
This is an automatically generated commit.

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

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19708
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-17 21:48:53 +01:00
Shiji Yang
2cce634a9e ramips: disable build TP-Link EAP235-Wall
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
After investigating the EAP235-Wall u-boot GPL code, it was found that
the u-boot of this device directly loads the kernel from the SPI NOR
Flash direct access address. However, due to hardware limitation, MT7621
can only remap the first 4MiB Flash. Excluding some partitions before
the kernel, this device can only boot kernels smaller than 0x360000.
This means that unless you install a modified bootloader, the mainline
OpenWrt will no longer work on this model.

Closes: https://github.com/openwrt/openwrt/issues/20500
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20509
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-17 10:33:17 +01:00
Shiji Yang
e2d823d068 ramips: fix LZMA decompression error for TP-Link EAP615-Wall
Relocating the kernel load address to avoid the memory overlap issue.

Fixes: https://github.com/openwrt/openwrt/issues/19403
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20509
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-17 10:33:17 +01:00
Shiji Yang
583e401abb ramips: enable LZMA loader for ZIO FREEZIO
Fix the kernel LZMA decompression error issue.

Fixes: https://github.com/openwrt/openwrt/issues/11815
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20509
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-17 10:33:17 +01:00
Andrii Kuiukoff
97256a28fe ramips: add support for EDUP EP-RT2960S
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
EDUP EP-RT2960S has the similar hardware design as the SIMAX1800T.
The main difference is the arrangement of the GPIO pins
and the location of the MAC address.

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 EDUP EP-RT2960S. 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   | 24:D5:1C:xx:xx:xx |
| LAN     | 24:D5:1C:xx:xx:xx |
| WAN     | 24:D5:1C:xx:xx:xx |
| WLAN2G  | 24:D5:1C:xx:xx:xx |
| WLAN5G  | 26:D5:1C:xx:xx:xx |
+---------+-------------------+

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

Signed-off-by: Andrii Kuiukoff <andros.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20600
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-16 21:59:28 +01:00
Sven Eckelmann
501f4edb04 realtek: dsa: Clarify statistic port iterator variable
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
The functions iterating through the port statistic/counter (for
initialization or polling) use the generic name "i" for the iterator. This
makes reading the actual body of the loop cumbersome because it is not
clear that various parameters of functions are about a ports.

Suggested-by: Felix Baumann <felix.bau@gmx.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20631
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-16 00:10:56 +01:00
Sven Eckelmann
e20ab65281 realtek: dsa: rtl931x: Reduce HW counters polling interval
Some SoC families require table access to get the HW counters. A mutex is
required for this access - which will potentially cause a sleep in the
current context. This is not always possible with .get_stats64 because it
is also called in atomic contexts.

For these SoCs, the retrieval of the current counters in .get_stats64 is
skipped and the counters are simply retrieved a lot more often from the HW.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20631
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-16 00:10:56 +01:00
Sven Eckelmann
e76ed39f3b realtek: dsa: Refresh link_stats in .get_stats64
If an architecture doesn't need to sleep for retrieving the current
statistics from the HW, it is possible to directly retrieve the last values
from the HW when .get_stats64 is called. This avoids the stale counters
with the current refresh interval of 60 seconds.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20631
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-16 00:10:56 +01:00
Sven Eckelmann
bd78eeb53f realtek: dsa: Select counter lock based on sleeping behavior
On many architectures, retrieving the HW counters from the switch is not
potentially sleeping. This would potentially allow these architectures to
retrieve the most recent values from the HW when .get_stats64 is called.
But because of the global mutex (which may sleep on lock), this would no
longer be possible.

Reintroduce the per port counters lock which protects from parallel
writes+reads of the non-link_stat counters. The locking is made abstract by
using helpers which identify the correct locking mechanism based on the
used read methods of the SoC.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20631
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-16 00:10:56 +01:00
Harshal Gohel
3c95a60e33 realtek: dsa: rtl931x: add ethtool statistics support
Add MIB data structures and table access routines for the RTL931X family.
These counters can now be exposed through the ethtool statistics interface.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Co-developed-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20631
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-16 00:10:56 +01:00
Sharadanand Karanjkar
fdc424c1e3 realtek: dsa: add table-based statistics infrastructure
Some Realtek SoCs such as the RTL931X store MIB counters in tables rather
than registers. Unlike register reads, table access requires programming
the table control register, setting the command field to determine read or
write, and then polling for completion. This makes it necessary to
implement a separate path for table-based statistics.

Like register-based MIBs, the table-based MIBs also come in two types: STD
and PRIV which will require slightly different implementations.

Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20631
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-16 00:10:56 +01:00