openwrt/target/linux/generic/pending-6.1/712-net-dsa-qca8k-enable-assisted-learning-on-CPU-port.patch
John Audia f89904ad78 kernel: bump 6.1 to 6.1.77
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.77

Removed upstreamed:
	generic/backport-6.1/707-v6.8-01-net-phy-at803x-fix-passing-the-wrong-reference-for-c.patch[1]
	generic/backport-6.1/796-v6.8-ipmr-fix-kernel-panic-when-forwarding-mcast-packets.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.77&id=7dc0fefd37dd5fb03fdac6e3e01b1c2291148ccb
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.77&id=d2f1b7fe74afd66298dbb3c7b39e7b62e4df1724

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-02-08 18:35:42 +01:00

58 lines
1.8 KiB
Diff

From 0f6599167c126ce32c85d4f8a1f3d1775a268572 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Fri, 6 Oct 2023 12:44:00 +0200
Subject: [PATCH] net: dsa: qca8k: enable assisted learning on CPU port
Enable assisted learning on CPU port.
It has been verified that there is a problem in packet roaming
from one BSS to another in the same security settings from one
physical R7800 to another physical R7800 where they are in the
same L2 broadcast domain backhauled/linked together via one
of the ethernet ports.
DHCP will fail to complete and traffic cannot flow for around 300
seconds.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/net/dsa/qca/qca8k-8xxx.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
--- a/drivers/net/dsa/qca/qca8k-8xxx.c
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
@@ -2013,6 +2013,12 @@ qca8k_setup(struct dsa_switch *ds)
dev_err(priv->dev, "failed enabling QCA header mode on port %d", dp->index);
return ret;
}
+
+ /* Disable learning by default on all ports */
+ ret = regmap_clear_bits(priv->regmap, QCA8K_PORT_LOOKUP_CTRL(dp->index),
+ QCA8K_PORT_LOOKUP_LEARN);
+ if (ret)
+ return ret;
}
/* Forward all unknown frames to CPU port for Linux processing */
@@ -2042,11 +2048,6 @@ qca8k_setup(struct dsa_switch *ds)
if (ret)
return ret;
- ret = regmap_clear_bits(priv->regmap, QCA8K_PORT_LOOKUP_CTRL(port),
- QCA8K_PORT_LOOKUP_LEARN);
- if (ret)
- return ret;
-
/* For port based vlans to work we need to set the
* default egress vid
*/
@@ -2098,6 +2099,9 @@ qca8k_setup(struct dsa_switch *ds)
/* Set max number of LAGs supported */
ds->num_lag_ids = QCA8K_NUM_LAGS;
+ /* HW learn on CPU port is limited and require manual setting */
+ ds->assisted_learning_on_cpu_port = true;
+
return 0;
}