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