OSDN Git Service

can: flexcan: add ethtool support to get rx/tx ring parameters
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Sat, 8 Jan 2022 18:16:33 +0000 (19:16 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 8 Jan 2022 20:22:58 +0000 (21:22 +0100)
commit74fc5a452ec3d7c051fed5e97494effb2e747d1d
tree7203c62914519563d66820638cd703f50542165f
parent1c45f5778a3be5a67e8b318ab83664014ffa1f3e
can: flexcan: add ethtool support to get rx/tx ring parameters

This patch adds ethtool support to get the number of message buffers
configured for reception/transmission, which may also depends on
runtime configurations such as the 'rx-rtr' flag state.

Link: https://lore.kernel.org/all/20220108181633.420433-1-dario.binacchi@amarulasolutions.com
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
[mkl: port to net-next/master, replace __sw_hweight64 by simpler calculation]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan/flexcan-ethtool.c