net: dsa: microchip: fix KSZ87xx family structure wrt the datasheet
authorPieter Van Trappen <pieter.van.trappen@cern.ch>
Tue, 13 Aug 2024 14:27:39 +0000 (16:27 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 16 Aug 2024 17:25:02 +0000 (10:25 -0700)
commit0d3edc90c4a0ac77332a25e1e6b709a39b202de9
treec9dc23dd89edb3d31242bf0456727299ca07c50f
parent90b06ac06529b4c90af97763e57cf38d96999827
net: dsa: microchip: fix KSZ87xx family structure wrt the datasheet

The KSZ87xx switches have 32 static MAC address table entries and not
8. This fixes -ENOSPC non-critical errors from ksz8_add_sta_mac when
configured as a bridge.

Add a new ksz87xx_dev_ops structure to be able to use the
ksz_r_mib_stat64 pointer for this family; this corrects a wrong
mib->counters cast to ksz88xx_stats_raw. This fixes iproute2
statistics. Rename ksz8_dev_ops structure to ksz88x3_dev_ops, in line
with ksz_is_* naming conventions from ksz_common.h.

Signed-off-by: Pieter Van Trappen <pieter.van.trappen@cern.ch>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Link: https://patch.msgid.link/20240813142750.772781-6-vtpieter@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz_common.c