On 1/11/21 11:35 AM, Vincent MAILHOL wrote: > On Mon. 11 Jan 2021 at 18:38, Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote: >> >> On 1/11/21 7:13 AM, Vincent Mailhol wrote: >> [...] >> >>> diff --git a/drivers/net/can/dev/skb.c b/drivers/net/can/dev/skb.c >>> index 568dc28f7a4e..64bd2b60febc 100644 >>> --- a/drivers/net/can/dev/skb.c >>> +++ b/drivers/net/can/dev/skb.c >>> @@ -38,7 +38,7 @@ void can_flush_echo_skb(struct net_device *dev) >>> * priv->echo_skb, if necessary. >>> */ >>> int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, >>> - unsigned int idx) >>> + unsigned int idx, unsigned int frame_len) >>> { >>> struct can_priv *priv = netdev_priv(dev); >>> >>> @@ -62,6 +62,10 @@ int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, >>> skb->ip_summed = CHECKSUM_UNNECESSARY; >>> skb->dev = dev; >>> >>> + /* save frame_len to reuse it when transmission is completed */ >>> + if (frame_len) >>> + can_skb_prv(skb)->frame_len = frame_len; >>> + >> >> I think we can assign it unconditionally? > > Ack, I prepare the v2 right away and post it in answer to this > message. > > Will also rename the patch subject from > "can: dev: extend can_put_echo_skb() to handle frame_len" > to > "can: dev: can_put_echo_skb(): extend to store can frame length". > > This way the name is more aligned with your patch "can: dev: > can_get_echo_skb(): extend to return can frame length". no need to - I'll send v2 in a sec. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: OpenPGP digital signature