summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann2025-11-09 08:32:03 +0000
committerHauke Mehrtens2025-11-11 00:06:49 +0000
commit14095ab268dd9a29006a100116822e398244d389 (patch)
tree9bf85b45c27a791acd179e8eef0b83ad25827b81
parente9bb1debb7f6e57b7c70480afc62c562b00a0cbf (diff)
downloadblocktrron-14095ab268dd9a29006a100116822e398244d389.tar.gz
realtek: dsa: Drop LAG checks already handled by DSA handlers
There is no need to check conditions in rtl83xx_lag_add()/rtl83xx_lag_del() when they are already checked in rtl83xx_port_lag_join()/rtl83xx_port_lag_leave(). Signed-off-by: Sven Eckelmann <se@simonwunderlich.de> Link: https://github.com/openwrt/openwrt/pull/20707 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
index dc588d40d4..59abba7807 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
@@ -452,21 +452,6 @@ int rtl83xx_lag_add(struct dsa_switch *ds, int group, int port, struct netdev_la
u32 algomsk = 0;
u32 algoidx = 0;
- if (info->tx_type != NETDEV_LAG_TX_TYPE_HASH) {
- pr_err("%s: Only mode LACP 802.3ad (4) allowed.\n", __func__);
- return -EINVAL;
- }
-
- if (group >= priv->ds->num_lag_ids) {
- pr_err("%s: LAG %d invalid.\n", __func__, group);
- return -EINVAL;
- }
-
- if (port >= priv->cpu_port) {
- pr_err("%s: Port %d invalid.\n", __func__, port);
- return -EINVAL;
- }
-
for (i = 0; i < priv->ds->num_lag_ids; i++) {
if (priv->lags_port_members[i] & BIT_ULL(port))
break;
@@ -518,11 +503,6 @@ int rtl83xx_lag_del(struct dsa_switch *ds, int group, int port)
return -EINVAL;
}
- if (port >= priv->cpu_port) {
- pr_err("%s: Port %d invalid.\n", __func__, port);
- return -EINVAL;
- }
-
if (!(priv->lags_port_members[group] & BIT_ULL(port))) {
pr_err("%s: Port %d not member of LAG %d.\n", __func__, port, group);
return -ENOSPC;