diff options
| author | Marc Kleine-Budde <[email protected]> | 2021-03-19 14:21:32 +0000 |
|---|---|---|
| committer | Marc Kleine-Budde <[email protected]> | 2021-03-30 09:14:28 +0000 |
| commit | f318482a1c57315d0efccd2861f153f55c2117c6 (patch) | |
| tree | 7197d4579a82c7098e3c3af382615138529b7003 /drivers/net/can/usb/usb_8dev.c | |
| parent | can: dev: can_free_echo_skb(): don't crash the kernel if can_priv::echo_skb i... (diff) | |
| download | kernel-f318482a1c57315d0efccd2861f153f55c2117c6.tar.gz kernel-f318482a1c57315d0efccd2861f153f55c2117c6.zip | |
can: dev: can_free_echo_skb(): extend to return can frame length
In order to implement byte queue limits (bql) in CAN drivers, the
length of the CAN frame needs to be passed into the networking stack
even if the transmission failed for some reason.
To avoid to calculate this length twice, extend can_free_echo_skb() to
return that value. Convert all users of this function, too.
This patch is the natural extension of commit:
| 9420e1d495e2 ("can: dev: can_get_echo_skb(): extend to return can
| frame length")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Marc Kleine-Budde <[email protected]>
Diffstat (limited to 'drivers/net/can/usb/usb_8dev.c')
| -rw-r--r-- | drivers/net/can/usb/usb_8dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c index e8c42430a4fc..b6e7ef0d5bc6 100644 --- a/drivers/net/can/usb/usb_8dev.c +++ b/drivers/net/can/usb/usb_8dev.c @@ -691,7 +691,7 @@ nofreecontext: return NETDEV_TX_BUSY; failed: - can_free_echo_skb(netdev, context->echo_index); + can_free_echo_skb(netdev, context->echo_index, NULL); usb_unanchor_urb(urb); usb_free_coherent(priv->udev, size, buf, urb->transfer_dma); |
