• Vincent Mailhol's avatar
    can: do not increase rx_bytes statistics for RTR frames · 8e674ca7
    Vincent Mailhol authored
    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: default avatarVincent 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: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
    8e674ca7
usb_8dev.c 23.7 KB