OpenCloudOS-Kernel/drivers/net/can
Vincent Mailhol 8e674ca742 can: do not increase rx_bytes statistics for RTR frames
The actual payload length of the CAN Remote Transmission Request (RTR)
frames is always 0, i.e. no payload is transmitted on the wire.
However, those RTR frames still use the DLC to indicate the length of
the requested frame.

As such, net_device_stats::rx_bytes should not be increased for the
RTR frames.

This patch fixes all the CAN drivers.

Link: https://lore.kernel.org/all/20211207121531.42941-5-mailhol.vincent@wanadoo.fr
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Yasushi SHOJI <yashi@spacecubics.com>
Cc: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Cc: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Stephane Grosjean <s.grosjean@peak-system.com>
Tested-by: Jimmy Assarsson <extja@kvaser.com> # kvaser
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Acked-by: Stefan Mätje <stefan.maetje@esd.eu> # esd_usb2
Tested-by: Stefan Mätje <stefan.maetje@esd.eu> # esd_usb2
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-01-05 12:09:05 +01:00
..
c_can can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
cc770 can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
dev can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
ifi_canfd can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
m_can can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
mscan can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
peak_canfd can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
rcar can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
sja1000 can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
softing can: softing: Remove redundant variable ptr 2021-05-27 09:42:22 +02:00
spi can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
usb can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
Kconfig can: flexcan: update Kconfig to enable coldfire 2021-07-25 11:36:29 +02:00
Makefile can: dev: move driver related infrastructure into separate subdir 2021-01-13 09:42:58 +01:00
at91_can.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
flexcan.c can: flexcan: Use struct_group() to zero struct flexcan_regs regions 2021-09-25 08:20:48 -07:00
grcan.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
janz-ican3.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
kvaser_pciefd.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
led.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pch_can.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
slcan.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
sun4i_can.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
ti_hecc.c can: ti_hecc: ti_hecc_probe(): use platform_get_irq() to get the interrupt 2022-01-05 12:08:19 +01:00
vcan.c net: introduce CAN specific pointer in the struct net_device 2021-02-24 14:32:15 -08:00
vxcan.c net: introduce CAN specific pointer in the struct net_device 2021-02-24 14:32:15 -08:00
xilinx_can.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00