path: root/drivers/net/dsa/sja1105/sja1105_main.c
diff options
authorVladimir Oltean <olteanv@gmail.com>2019-06-26 02:39:40 +0300
committerDavid S. Miller <davem@davemloft.net>2019-06-27 11:03:21 -0700
commit17ae6555406a345c7d4096c4c274447e869e9384 (patch)
treef681f424b1411d58d7b86a837b05edc0b9ea65d3 /drivers/net/dsa/sja1105/sja1105_main.c
parentnet: dsa: sja1105: Add a high-level overview of the dynamic config interface (diff)
net: dsa: sja1105: Populate is_static for FDB entries on P/Q/R/S
The reason why this wasn't tackled earlier is that I had hoped I understood the user manual wrong. But unfortunately hacks are required in order to retrieve the static/dynamic nature of FDB entries on SJA1105 P/Q/R/S, since this info is stored in the writeback buffer of the dynamic config command. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_main.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index 80d8d2f5c472..ed0b721c794e 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -1070,6 +1070,7 @@ int sja1105pqrs_fdb_add(struct dsa_switch *ds, int port,
dev_err(ds->dev, "FDB is full, cannot add entry.\n");
return -EINVAL;
+ l2_lookup.lockeds = true;
l2_lookup.index = i;
@@ -1205,7 +1206,7 @@ static int sja1105_fdb_dump(struct dsa_switch *ds, int port,
if (!dsa_port_is_vlan_filtering(&ds->ports[port]))
l2_lookup.vlanid = 1;
- cb(macaddr, l2_lookup.vlanid, false, data);
+ cb(macaddr, l2_lookup.vlanid, l2_lookup.lockeds, data);
return 0;