From 17ae6555406a345c7d4096c4c274447e869e9384 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Wed, 26 Jun 2019 02:39:40 +0300 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/dsa/sja1105/sja1105_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net/dsa/sja1105/sja1105_main.c') 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; skip_finding_an_index: @@ -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; } -- cgit v1.2.3-59-g8ed1b