net: dsa: microchip: ksz8: fix ksz8_fdb_dump() to extract all 1024 entries
authorOleksij Rempel <o.rempel@pengutronix.de>
Fri, 24 Mar 2023 08:06:04 +0000 (09:06 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 Mar 2023 11:17:32 +0000 (11:17 +0000)
commit5d90492dd4ff50ad65c582c76c345d0b90001728
treeaea59f54ebe15d2840df005b7767b554918ac6eb
parent88e943e83827a349f70c3464b3eba7260be7461d
net: dsa: microchip: ksz8: fix ksz8_fdb_dump() to extract all 1024 entries

Current ksz8_fdb_dump() is able to extract only max 249 entries on
the ksz8863/ksz8873 series of switches. This happened due to wrong
bit mask and offset calculation.

This commit corrects the issue and allows for the complete extraction of
all 1024 entries.

Fixes: 4b20a07e103f ("net: dsa: microchip: ksz8795: add support for ksz88xx chips")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_common.c