Signed-off-by: Kurt Van Dijck <dev.kurt@xxxxxxxxxxxxxxxxxxxxxx> --- drivers/net/can/c_can/c_can.c | 8 +++++--- drivers/net/can/c_can/c_can.h | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index 0357ee8..ee528d6 100644 --- a/drivers/net/can/c_can/c_can.c +++ b/drivers/net/can/c_can/c_can.c @@ -481,7 +481,6 @@ static netdev_tx_t c_can_start_xmit(struct sk_buff *skb, * transmit as we might race against do_tx(). */ c_can_setup_tx_object(dev, IF_TX, frame, idx); - priv->dlc[idx] = frame->can_dlc; can_put_echo_skb(skb, dev, idx); /* Update the active bits */ @@ -731,6 +730,8 @@ static void c_can_do_tx(struct net_device *dev) struct c_can_priv *priv = netdev_priv(dev); struct net_device_stats *stats = &dev->stats; u32 idx, obj, pkts = 0, bytes = 0, pend, clr; + struct sk_buff *skb; + u8 len; clr = pend = priv->read_reg(priv, C_CAN_INTPND2_REG); @@ -739,8 +740,9 @@ static void c_can_do_tx(struct net_device *dev) pend &= ~(1 << idx); obj = idx + C_CAN_MSG_OBJ_TX_FIRST; c_can_inval_tx_object(dev, IF_RX, obj); - can_get_echo_skb(dev, idx); - bytes += priv->dlc[idx]; + skb = __can_get_echo_skb(dev, idx, &len); + can_rx_offload_irq_receive_skb(&priv->offload, skb); + bytes += len; pkts++; } diff --git a/drivers/net/can/c_can/c_can.h b/drivers/net/can/c_can/c_can.h index 770e944..ebe0676 100644 --- a/drivers/net/can/c_can/c_can.h +++ b/drivers/net/can/c_can/c_can.h @@ -214,7 +214,6 @@ struct c_can_priv { void (*raminit) (const struct c_can_priv *priv, bool enable); u32 comm_rcv_high; u32 rxmasked; - u32 dlc[C_CAN_MSG_OBJ_TX_NUM]; }; struct net_device *alloc_c_can_dev(void); -- 1.8.5.rc3