OpenCloudOS-Kernel/drivers/net/can/usb/etas_es58x
Vincent Mailhol 676068db69 can: do not increase rx statistics when generating a CAN rx error message frame
The CAN error message frames (i.e. error skb) are an interface
specific to socket CAN. The payload of the CAN error message frames
does not correspond to any actual data sent on the wire. Only an error
flag and a delimiter are transmitted when an error occurs (c.f. ISO
11898-1 section 10.4.4.2 "Error flag").

For this reason, it makes no sense to increment the rx_packets and
rx_bytes fields of struct net_device_stats because no actual payload
were transmitted on the wire.

This patch fixes all the CAN drivers.

Link: https://lore.kernel.org/all/20211207121531.42941-2-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: 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
..
Makefile can: etas_es58x: add support for the ETAS ES58X_FD CAN USB interfaces 2021-04-13 10:15:43 +02:00
es58x_core.c can: do not increase rx statistics when generating a CAN rx error message frame 2022-01-05 12:09:05 +01:00
es58x_core.h can: etas_es58x: fix three typos in author name and documentation 2021-07-25 11:36:28 +02:00
es58x_fd.c can: bittiming: replace CAN units with the generic ones from linux/units.h 2021-12-08 10:12:58 +01:00
es58x_fd.h treewide: Replace open-coded flex arrays in unions 2021-10-18 12:28:53 -07:00
es581_4.c can: bittiming: replace CAN units with the generic ones from linux/units.h 2021-12-08 10:12:58 +01:00
es581_4.h treewide: Replace open-coded flex arrays in unions 2021-10-18 12:28:53 -07:00