]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: dsa: rtl93xx: avoid LAG transmission on down link 22382/head
authorSven Eckelmann <se@simonwunderlich.de>
Wed, 11 Mar 2026 17:49:44 +0000 (18:49 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 25 Mar 2026 20:02:46 +0000 (21:02 +0100)
commit1a09f84110ff77e7836b774c59b2a9321bcaee26
tree156c4e4bd64f5046bbc7c650ef5bd55431a48235
parenta4e8abe2193c516d61dccd7aa452fc19f9da9fee
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: 89322b4d69a7 ("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>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c