Commit Graph

68027 Commits

Author SHA1 Message Date
Jonas Jelonek 40fa81433b realtek: pcs: rtl930x: break up fiber config sequences
The patch/config sequences we took over from the SDK are partially
redundant, i.e. they share common parts which can be separated per
speed. For example, the config for 10GR contains the one for 2500Base-X
but we have a dedicated one for 2500Base-X. This is a first step to
modularize and reverse-engineer those sequences, and decrease the size
they claim.

The sequences are nearly exclusive ordered by ascending pages. This
suggests that those register/writes do not have a hidden function of
performing inline resets but rather are just configuration values.
Likely, they may be applied in rather arbitrary order. Splitting up the
sequences here assumes this is true and does some minor order changes.
Testing shows no behavioral change. Looking at [1] there are no relevant
reset or trigger bits affected by that. Suspiciously ordered writes have
mostly been kept though.

USXGMII setup needs to be adjusted too due to shared sequence parts.

[1] https://github.com/plappermaul/realtek-doc/blob/82af3a36b7f65dbe2158fef3a9b71e7aab94315e/sources/rtk-dms1250/include/hal/phy/rtl8295_reg_def.h

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-26 10:53:46 +01:00
Jonas Jelonek bab2bcd9d8 realtek: pcs: rtl930x: move EEE to USXGMII configuration
The patch/config sequences for USXGMII modes contain a register write
which is explicitly labelled as "enable eee". To clean the sequences and
reduce duplication, move this specific write to the USXGMII
configuration function.

While at it, demystify this register write. From [1] we can see that
only a single bit needs to be set for controlling EEE instead of the
whole register. From testing it was seen that the register has a default
value of 0x445C after reset. Thus, there is no other operation hidden in
this write and we're safe to reduce it to setting just the EEE enable
bit.

[1] https://github.com/plappermaul/realtek-doc/blob/82af3a36b7f65dbe2158fef3a9b71e7aab94315e/sources/rtk-dms1250/include/hal/phy/rtl8295_reg_def.h

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-26 10:53:46 +01:00
Jonas Jelonek 206190fdd5 realtek: pcs: rtl930x: improve USXGMII configuration
USXGMII configuration is currently only performed via the patching
sequences although there's a dedicated function which configures several
parameters and assigns meaningful names to some register fields. It was
introduced in dca20f91ea ("realtek: add serdes patch for 10G_QXGMII")
but somewhat abandoned later due to a partial revert.

To improve the situation, prioritize usage of the function for USXGMII
variants and remove some parts from the patch sequences which seem to be
exclusive for USXGMII and thus can be covered by this function. Writes
to registers [0x6, 0xE], [0x6, 0x13] and [0x6, 0x14] can be dropped
completely because they are redundant. The bits really affected by
these writes (compared to the default register values aquired from a
dump) are overwritten below again. Testing on real hardware and USXGMII
supports this.

While at it, improve the style a bit and add comments explaining some of
the fields a bit more. Additionally, fix the call situation which
currently is dead code due to early exit. Provide two calls to the
mentioned functions but comment one of them to remain current
functionality. Names and meaning of fields is inferred from [1].

[1] https://github.com/plappermaul/realtek-doc/blob/82af3a36b7f65dbe2158fef3a9b71e7aab94315e/sources/rtk-dms1250/include/hal/phy/rtl8295_reg_def.h

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-26 10:53:46 +01:00
Jonas Jelonek 0fd1a3840a realtek: pcs: rtl930x: carve out common writes
Start deconstructing the patch/config sequences by carving out two
specific writes which are common for non-USXGMII and are special because
they are not in analog SerDes pages.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-26 10:53:46 +01:00
Jonas Jelonek f0665cb06b realtek: pcs: rtl930x: handle QSGMII config early
Handle QSGMII config earlier within the configuration function as a
preparation for subsequent patches in this area. Those will target
splitting up the config sequences and 5G-QSGMII is special there.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-26 10:53:46 +01:00
Jonas Jelonek f213e88576 realtek: pcs: rtl930x: rename patching function
Rename the function that currently "applies patches" so that it covers
everything it does (and will do). It doesn't only apply patches but in
general performs configuration of a SerDes for a particular hardware
mode.

While at it, remove a print above that call because it is both placed
wrong and redundant due to what the generic pcs_config prints.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-26 10:53:45 +01:00
Jonas Jelonek 143407c6d3 realtek: pcs: rtl930x: adjust patch application facilities
Change how patches are applied to reduce redundancy and make the code
more readable. Define a generic function that applies any patch. Within
the RTL930x patch application, define a local macro that helps to get
rid of repeated even/odd checks. While making the code cleaner, it is
also a preparation for further refactoring here.

This adds a local helper macro intended to be only temporary but keeps
the style of the code clean by avoiding a lot of if-else clauses.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-26 10:53:45 +01:00
Markus Stockhausen d52f7a4ca5 realtek: dts: new SWITCH_PORT_LED() macro
Several devices (including the upcoming DGS-1250) need a fully
featured port definition that includes:

- port number
- label
- led-set
- pcs-handle
- phy-handle
- phy-mode

Provide a new macro for that and make the Zyxel XGS-1210 series
the first consumer of it.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22591
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-26 10:53:05 +01:00
Anthony Sepa 52063ff831 ipq40xx: fix art partition name WHW03 V1
In the blamed commit, the wrong partition name for ART was used.

It was later discovered that the partition table uses "0:ART" instead of
"art" for the ART partition name thus breaking caldata extraction.

So, fix the partition name.

Fixes: ee5999cf78 ("treewide: linksys: use nvmem MAC for hw_mac_addr")
Signed-off-by: Anthony Sepa <protectivedad@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 21:13:43 +01:00
Markus Stockhausen eb171568a9 realtek: hwmon: add LM75 alert pin polarity swap patch
Allow to configure the LM75 alert pin to active-high instead
of its default active-low. This patch is needed for the D-Link
DGS-1250 series where the alert pin steers the fan speed
between low and high.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22589
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-25 21:10:45 +01:00
Sven Eckelmann 1a09f84110 realtek: dsa: rtl93xx: avoid LAG transmission on down link
When the link goes down on the other end of a bond, it was noticed that the
switch was still trying to send data over this link.

Problem here is that net_lag_port_dev_txable() uses
bond_is_active_slave_dev() to look the state up. But this is actually
showing if a link is a NOT a backup - not if the link should be really be
TX enabled or not.

As a DSA driver, it is important to consume the DSA information.
dp->lag_tx_enabled must therefore be used for DSA .port_lag_change events.
This variable contains two information from the
struct netdev_lag_lower_state_info:

    tx_enabled = linfo->link_up && linfo->tx_enabled;

Fixes: 89322b4d69 ("rtl93xx: dsa: Handle lag_change properly")
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/22382
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-25 21:02:46 +01:00
Damien Dejean a4e8abe219 realtek: phy: backport pair/polarity order support
Backport four patches merged in netdev-next/main to add pair order [1,2]
and pair polarity [3,4] configuration support for the RTL8224. The
configuration is required when the bootloader doesn't set it up.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=c1887257a81bf62f48178d3b9d31e23520d67b2c
[2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=330296ea9e158758aa65631f5ec64aa74806b7e2
[3] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=58ffb5910f32e5b387d4af31ee21851c40eb31b5
[4] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=beed9c0e9b53c98bc66d28d46fbe38c347e9aa74

Signed-off-by: Damien Dejean <dam.dejean@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22608
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 20:57:36 +01:00
Rosen Penev 04328df9b9 realtek: stc8: use flexible array member
Simplifies allocation. Also addeed __counted_by for extra runtime
analysis.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22506
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-25 20:55:38 +01:00
Yanase Yuki 3158f18538 mediatek: filogic: fix devicetree compiler warnings
This commit fixes some dts syntax errors.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/22461
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-25 20:50:57 +01:00
Yanase Yuki 2e30f1667b mediatek: filogic: fix MT7987 dtsi spi nodes
Upstream devicetree bindings marks address-cells and
size-cells "required". (mediatek,spi-mt65xx.yaml)

This change will fix some dtc warnings.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/22513
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-25 20:48:26 +01:00
Zhi-Jun You 0a6683e4ab wifi-scripts: ucode: make he_twt_required depends on he_twt_responder
Doesn't make sense to have he_twt_required enabled without
he_twt_respodner.

Signed-off-by: Zhi-Jun You <hujy652@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/22577
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-25 16:02:23 +01:00
Zhi-Jun You 3b69cf0844 wifi-scripts: ucode: add support for setting he_twt_responder
In hostapd conf this option is set to 1 by default.
Then it's set to 0 if the HE MAC capability bit is not present.

Add an option in wifi-scripts to manually control it.

Signed-off-by: Zhi-Jun You <hujy652@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/22577
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-25 16:02:23 +01:00
Nick Hainke 20d6296141 hostapd: update to 2026-03-23
Remove upstreamed patch:
- 001-RSN-Fix-pmksa_cache_flush-prototype-mismatch-in-non-.patch
  -> https://git.w1.fi/cgit/hostap/commit/?id=f54565c6293d03bf7da5b7c4af496a62c51f0aaf

Tested-By: Daniel Pawlik <pawlik.dan@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22578
Signed-off-by: Nick Hainke <vincent@systemli.org>
2026-03-25 14:00:49 +01:00
Bee Cadorna 51f82c452f ipq40xx: enable LP5521 driver for TP-Link Deco M5
TP-Link Deco M5 v1 and v2 models use a separate LP5521 controller to
control the LEDs on the device.

Signed-off-by: Bee Cadorna <r3usrlnd@gmail.com>
Tested-by: Tan Li Boon <undisputed.seraphim@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17537
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:31:58 +01:00
Bee Cadorna c60be6e983 ipq40xx: add support for TP-Link Deco-M5
Specifications
--------------
- SoC          : Qualcomm IPQ4019
- RAM          : 256 MiB DDR3-1600 (NT5CC128M16IP)
- Flash        : 32 MiB SPI NOR
  - V1, V2     : GigaDevice GD25Q256C
  - V3         : Winbond W25Q256FV, Micron N25Q128A11
  - V320       : EON EN25QH256, XMC XM25QH256BK (with patch included)
- WLAN         : IPQ4019 On-chip
  - 2.4 GHz    : 2x2 MIMO 802.11b/g/n
  - 5 GHz      : 2x2 MIMO 802.11n/ac
- Ethernet     : QCA8072 10/100/1000BASE-T 1x WAN; 1x LAN
- UART         : 3v3 115200n, use pins under heatsink
- Buttons      : 1x Reset
- LEDs         : 1x Combined RGB LED
  - V1         : Driven by LP5521 channels (Channel 0, 1, 2?)
  - V3, V320   : Driven by GPIO Pins (Pin 28, 32, 35 Active Low)
- Bluetooth    :
  - V1, V2, V3 : CSR8811
  - V320       : AC6368A/B
- Power        : DC 12V @ 1.2A
- FCC ID       :
  - V1         : TE7M5
  - V3         : TE7M5V3
  - V320       : TE7M5V32, 2AXJ4M5V3, 2BCGWM5V3
- TFTP ID      :
  - Client     : 192.168.0.66
  - Router     : 192.168.0.11

MAC Addresses
-------------
Label   : OPAQUE partition @ 0x0008
LAN     : Label
WAN     : Label + 1
WLAN 2G : Label + 2
WLAN 5G : Label + 3

Installation
------------
1. Install TFTP server software
2. Rename the factory image to 'M5v1_tp_recovery.bin' and copy it into
   the TFTP folder
3. Connect an interface configured to 192.168.0.66/24 to the LAN port
   - Note: The LAN port is the ethernet port that is furthest away from
     the power plug
4. Press the 'reset' button down before powering up the device, holding
   for at least 10 seconds
5. Router should download the factory image, install it, and then reboot
6. Router will start up with address 192.168.1.1

Known Issues
------------
- Some devices (including some V1 and V2 devices) may have flash chips
  that are not detected, supported by, or have broken SFDP support

Signed-off-by: Bee Cadorna <r3usrlnd@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17537
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:31:58 +01:00
Markus Stockhausen eb7efbe247 realtek: rtl930x: adapt kernel configuration
The RTL93xx based D-Link DGS-1250 series is currently being
prepared for OpenWrt support. These devices have some extras
that are not yet supported by the existing configuration.
Add the following items to the kernel configuration:

- CONFIG_SENSORS_GPIO_FAN: The devices have a simple gpio
  controlled fan (0/1 aka off/on).
- CONFIG_I2C_GPIO_SHARED: The busses of the SFP+ slots are
  not controlled by the built-in SOC I2C controller. Instead
  they are realized by shared SCL bit banged GPIOs.
- CONFIG_EEPROM_AT24: The MAC address and other device data
  is storend in an Atmel EEPROM.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22543
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:28:10 +01:00
Markus Stockhausen 323b75002b realtek: i2c: fix i2c-shared-gpio range check
The i2c-shared-gpio driver is designed to emulate up to four
i2c busses with distinct sda lines and a a shared scl line.
For some reason the check for the number of allowed busses
is one off and the driver can only allocate three busses.
Fix that.

Fixes: acd7ecc9ed ("realtek: add new i2c-gpio-shared driver")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22543
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:28:10 +01:00
Markus Stockhausen 28165ed3d4 realtek: eth: make hw_en_rxtx() a config member
Due to the last refactorings it has become clear that the following
code is wrong.

static void rteth_tx_timeout()
{
  ...
  rteth_838x_hw_en_rxtx(ctrl);

A generic function must not call a device specific function directly.
Make hw_en_rxtx() a config member and call that instead of the
functions directly.

With this change another optimization can take place. hw_init()
currently calls device specific hw_en_rxtx() functions at the start
of the function. This is wrong. Initialize the hardware first before
activating the network rx/tx. Take out the multiple calls and place
the rx/tx setup just before the hw_init() call.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22421
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:26:44 +01:00
Markus Stockhausen 81b193aba8 realtek: eth: drop family_id
The RTL839x notify ring buffer setup is the last consumer
of family_id. Convert it to a device specific callback and
drop family_id from the configuration structure.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22421
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:26:44 +01:00
Markus Stockhausen 210091f5c7 realtek: eth: split rteth_93xx_hw_en_rxtx()
Split rteth_93xx_hw_en_rxtx() into two device specific
functions to avoid family_id checks.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22421
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:26:44 +01:00
Markus Stockhausen 39e2af7ed6 realtek: eth: remove redundant RTL93xx ring setup
RTL93xx sets up the ring counters twice. One location is
inside rteth_93xx_hw_en_rxtx() and the other one is inside
rteth_93xx_hw_reset(). There are slight differences (e.g.
the ring size that is set or how the counters are cleared).
It is currently unclear where to place it best. For now
align this to RTL83xx and remove the coding from function
rteth_93xx_hw_en_rxtx(). Provide a complete & proper setup
in rteth_93xx_hw_reset().

Looking at the different old implementations one can see
that one initialized the ring counters with offset "-2".
This headroom is not needed. The old comment " Some SoCs
have issues with missing underflow protection" was only
regarding the way the counters are being resetted and not
how large they are setup.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22421
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:26:44 +01:00
Markus Stockhausen d3f23e9602 realtek: eth: provide device specific hw_init()
Remove another family check inside rteth_open() and split it
out into device specific hw_init() helper functions.

RTL93xx still use a common rteth_93xx_hw_en_rxtx() helper.
That will be split later.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22421
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:26:44 +01:00
Markus Stockhausen a090dd7fba realtek: eth: convert hw_en_rxtx() to new prefix
The hw_en_rxtx() functions still use the old prefix. Rename
them to align with the rest of the code. This refactoring
makes clear that there is a bug in rteth_tx_timeout(). A
generic function should not call a device specific function
directly. The bug will be fixed separately.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22421
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:26:44 +01:00
Markus Stockhausen 483759419a realtek: eth: provide device specific hw_stop() helper
The hw_stop() function uses multiple family checks to determine
what needs to be done. Split that into device specific helpers
to simplify the code.

For further simplification common parts of the stop functions
have been kept in rteth_hw_stop().

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22421
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:26:44 +01:00
Markus Stockhausen cc4e1dcd07 realtek: eth: adapt prefix of hw_stop()
rtl838x_hw_stop() still uses the old prefix. Change it "rteth"
and make clear that this is a generic function for all targets.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22421
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:26:44 +01:00
Markus Stockhausen b2899eec9b realtek: dts: fix SKS8300-8T i2c0 cells
The build system currently issues the following warnings.

../dts/rtl9303_xikestor_sks8300-8t.dts:57.4-17: Warning (reg_format):
/switchcore@1b000000/i2c@36c/i2c@0/temperature-sensor@48:reg: property
has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)

Fix that by providing proper cell data.

Fixes: c63433acd ("add support for XikeStor SKS8300-8T")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22593
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:24:29 +01:00
Markus Stockhausen a756611c7a realtek: dts: fix SKS8310-8X i2c0 cells
The build system currently issues the following warnings.

../dts/rtl9303_xikestor_sks8310-8x.dts:141.4-17: Warning (reg_format):
/switchcore@1b000000/i2c@36c/i2c@0/sensor@48:reg: property has invalid
length (4 bytes) (#address-cells == 2, #size-cells == 1)

Fix that by providing proper cell data.

Fixes: 4a73f72a2 ("add monitor IC node for XikeStor SKS8310-8X")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22593
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-25 10:24:29 +01:00
Marco von Rosenberg 17784ad785 ath79: fix initramfs boot for Huawei AP5030DN and AP6010DN
Fix execution of initramfs image on Huawei AP5030DN and AP6010DN by
increasing available memory for LZMA extraction by the loader.

The default leaves only ~23.6 MB between the decompression target
and the running loader code. Extracting images with built-in
packages lead to overwriting the loader code. This causes
the decompression to produce garbage output and hang.

Fix this by overwriting LZMA_TEXT_START to increase the
available memory for LZMA extraction to ~39.6 MB.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
Link: https://github.com/openwrt/openwrt/pull/22581
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-24 22:21:56 +01:00
Florian Maurer b1713d623b ramips-mt7621: fix xiaomi mi ac2100 mac address
The Xiaomi Redmi/Mi Router AC2100 does have the correct label mac on the WAN interface.
This MAC is available as gmac1.

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/22567
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-24 22:19:11 +01:00
Markus Stockhausen 4eee4c29ea realtek: dts: add Netgear GS110TPP serdes for port 9/10
The Netgear GS110TPP uses an RTL8214C to drive ports 9 and 10. The
DTS is missing the corresponding serdes assignment. From looking at
[1] it seems to be connected to pins 82-85 (serdes 2). Add that
definition. With that the last improper use of SWITCH_PORT() macro
is sorted out.

Remark: I do not own this device. The patch just resembles what
the picture [1] shows.

[1] https://svanheule.net/switches/_media/wiki/gs110tpp-top.jpg

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22232
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-24 22:00:55 +01:00
Christian Marangi 25de25827e airoha: backport additional rework in preparation for multi-serdes support
Backport additional upstream patch in preparation for multi-serdes and
proper PCS support.

Automatically refresh all affected patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-24 19:35:02 +01:00
Robert Marko 0a82d6054c microchipsw: add MTU change support
Add the MTU change support ported from Microchip BSP kernel.
It will be sent upstream as well.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-03-24 18:42:52 +01:00
Robert Marko c5455f60ab microchipsw: lan969x: use upstreamed DTS
LAN969x DTS was finally merged upstream, so lets backport the backported
DTS instead of keeping a local copy.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-03-24 18:04:29 +01:00
Robert Marko 593b448455 microchipsw: lan969x: tactical-1000: describe RS0 pins
Tactical 1000 has per per port RS0 and RS1 pins, however internally they
are tied together.

So, model them as RS0 at least.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-03-24 17:17:10 +01:00
Aleksander Jan Bajkowski 05e6148310 kernel: backport crypto selftests for some ciphersuites
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
following cipher suites:
* authenc(hmac(md5),cbc(des))
* authenc(hmac(md5),cbc(aes))
* authenc(hmac(sha1),rfc3686(ctr(aes)))
* authenc(hmac(sha224),rfc3686(ctr(aes)))
* authenc(hmac(sha256),rfc3686(ctr(aes)))
* authenc(hmac(sha384),rfc3686(ctr(aes)))
* authenc(hmac(sha512),rfc3686(ctr(aes)))

These vectors were calculated using a software implementation and then
double-checked on Mediatek MT7981/MT7986 (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/22409
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-24 01:33:48 +01:00
Aleksander Jan Bajkowski a9413e764b kernel: add support for authenc(hmac(md5),*) on safexcel
This patch adds support for the following AEAD ciphersuites:
- authenc(hmac(md5),cbc(aes))
- authenc(hmac(md5),cbc(des)))
- authenc(hmac(md5),cbc(des3_ede))
- authenc(hmac(md5),rfc3686(ctr(aes)))

These algorithms are used mainly for backward compatibility with some
older equipment. This is enhanced version of the patch found in the
mtk-openwrt-feeds repo.

All cipher suites were tested using test vectors on the MediaTek MT7981,
MT7986, and MT7988.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/22410
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-24 01:30:49 +01:00
Hauke Mehrtens ced84f697d github: switch claude-code-action to hauke/claude-code-action v1.0.77-fixed
Use a patched fork while waiting for
https://github.com/anthropics/claude-code-action/pull/963 to be
merged and released upstream.

Version v1.0.77 contains many improvments over 1.0.49 which was used
before. It uses Sonnet 4.6 instead of Sonnet 4.5.

Fixes: c0e75c9de6 ("github: add Claude code review workflow triggered by /claude comment")
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-24 01:23:10 +01:00
Andreas Böhler 41d6584d9b realtek: fix D-Link fan control script
When the fan control script was first implemented, a variable was wrongly
named. The fan probably never turns on - fix that.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/22531
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-23 11:27:26 +01:00
Markus Stockhausen 9afc499d1e realtek: mdio: adjust naming of smi_bus_is_c45
Rename smi_bus_isc45 to smi_bus_is_c45 for better readability.
Upstream uses same naming convention.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22565
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-23 11:18:04 +01:00
Markus Stockhausen 0fbf80b4c8 realtek: mdio: add duplicated port detection
Harden the mdio driver probing by checking for duplicate port
definitions. Now that the driver has a valid_port mask this
is just a simple bit check. This is the same as upstream does.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22565
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-23 11:18:03 +01:00
Markus Stockhausen 48a75a179f realtek: mdio: add valid_port bitmask to structure
Until now the driver determines the validity of a phy (or port)
by checking "smi_bus[] < 0". That is somehow confusing. Align
with upstream and add a valid_port bitmask that can be used for
this check with common kernel bit operations.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22565
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-23 11:18:03 +01:00
Markus Stockhausen 6c6f3296ce realtek: mdio: drop debugging information
The mdio driver has come a long way. The code is
quite stable now and whenever bugs are analyzed
one can look at the registers with devmem from
command line. Drop unneeded debugging information.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22565
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-23 11:18:03 +01:00
Felix Fietkau befa61b1b6 bridger: update to Git HEAD (2026-03-23)
de7e00a5a673 flow: Fix vlan forwarding check with vlan filtering disabled

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-23 10:57:16 +01:00
Felix Fietkau 6c12207ff0 mt76: update to Git HEAD (2026-03-21)
a665659dee50 wifi: mt76: fix beacon monitor for MBSSID nontransmitted BSS
1b26f5f63d42 wifi: mt76: mt7996: Decrement sta counter removing the link in mt7996_mac_reset_sta_iter()
0c1dedac48c3 wifi: mt76: mt7996: Switch deflink to seclink only if link lookup does not fail
7fa21be01b97 wifi: mt76: mt7996: Rely on msta_link link_id in mt7996_vif_link_remove()
492a407111c3 wifi: mt76: mt7996: Account active links in valid_links fields
ade83e44eda0 wifi: mt76: mt7996: Move mlink deallocation in mt7996_vif_link_remove()
efebeea5c058 wifi: mt76: mt7996: Destroy vif active links in mt7996_remove_interface()
a4c790aef40d wifi: mt76: mt7996: Add mcu APIs to enable/disable vif links.
018f60316d4d wifi: mt76: mt7996: Destroy active sta links in mt7996_mac_sta_remove()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-23 10:57:16 +01:00
Felix Fietkau 68a35447d9 ucode: nl80211: fix HE MCS parsing
Do not parse an u8 array as u16.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-23 10:57:16 +01:00