Re: [PATCH] can: esd_usb: Add support for CAN_CTRLMODE_BERR_REPORTING

From: Marc Kleine-Budde
Date: Tue Apr 04 2023 - 02:15:26 EST


On 30.03.2023 20:44:46, Frank Jungclaus wrote:
> Announce that the driver supports CAN_CTRLMODE_BERR_REPORTING by means
> of priv->can.ctrlmode_supported. Until now berr reporting always has
> been active without taking care of the berr-reporting parameter given
> to an "ip link set ..." command.
>
> Additionally apply some changes to function esd_usb_rx_event():
> - If berr reporting is off and it is also no state change, then
> immediately return.
> - Unconditionally (even in case of the above "immediate return") store
> tx- and rx-error counters, so directly use priv->bec.txerr and
> priv->bec.rxerr instead of intermediate variables.
> - Not directly related, but to better point out the linkage between a
> failed alloc_can_err_skb() and stats->rx_dropped++:
> Move the increment of the rx_dropped statistic counter (back) to
> directly behind the err_skb allocation.
>
> Signed-off-by: Frank Jungclaus <frank.jungclaus@xxxxxx>

Applied to linux-can-next

Thanks,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |

Attachment: signature.asc
Description: PGP signature