Currently this boolean in ocelot_fdb_dump will always be set to false:
is_static = (entry.type == ENTRYTYPE_LOCKED);
Fix it by ensuring the entry type is always read from hardware.
Fixes: 64bfb05b74ad ("net: mscc: ocelot: break out fdb operations into abstract
implementations")
Signed-off-by: Vladimir Oltean <[email protected]>
---
drivers/net/ethernet/mscc/ocelot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/mscc/ocelot.c
b/drivers/net/ethernet/mscc/ocelot.c
index 70bf8c67d7ef..860cd2390670 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -647,6 +647,8 @@ static int ocelot_mact_read(struct ocelot *ocelot, int
port, int row, int col,
if (dst != port)
return -EINVAL;
+ entry->type = ANA_TABLES_MACACCESS_ENTRYTYPE_X(val);
+
/* Get the entry's MAC address and VLAN id */
macl = ocelot_read(ocelot, ANA_TABLES_MACLDATA);
mach = ocelot_read(ocelot, ANA_TABLES_MACHDATA);
--
2.25.1