Skip to content

Commit 492606c

Browse files
oleremdavem330
authored andcommitted
net: dsa: microchip: ksz8: ksz8_fdb_dump: avoid extracting ghost entry from empty dynamic MAC table.
If the dynamic MAC table is empty, we will still extract one outdated entry. Fix it by using correct bit offset. Fixes: 4b20a07 ("net: dsa: microchip: ksz8795: add support for ksz88xx chips") Signed-off-by: Oleksij Rempel <[email protected]> Acked-by: Arun Ramadoss <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b3177aa commit 492606c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ static const u32 ksz8863_masks[] = {
408408
[STATIC_MAC_TABLE_OVERRIDE] = BIT(20),
409409
[STATIC_MAC_TABLE_FWD_PORTS] = GENMASK(18, 16),
410410
[DYNAMIC_MAC_TABLE_ENTRIES_H] = GENMASK(1, 0),
411-
[DYNAMIC_MAC_TABLE_MAC_EMPTY] = BIT(7),
411+
[DYNAMIC_MAC_TABLE_MAC_EMPTY] = BIT(2),
412412
[DYNAMIC_MAC_TABLE_NOT_READY] = BIT(7),
413413
[DYNAMIC_MAC_TABLE_ENTRIES] = GENMASK(31, 24),
414414
[DYNAMIC_MAC_TABLE_FID] = GENMASK(19, 16),

0 commit comments

Comments
 (0)