diff options
Diffstat (limited to 'drivers/net/can/cc770/cc770.c')
-rw-r--r-- | drivers/net/can/cc770/cc770.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/can/cc770/cc770.c b/drivers/net/can/cc770/cc770.c index 76689674764..d42a6a7396f 100644 --- a/drivers/net/can/cc770/cc770.c +++ b/drivers/net/can/cc770/cc770.c @@ -34,7 +34,6 @@ #include <linux/can.h> #include <linux/can/dev.h> #include <linux/can/error.h> -#include <linux/can/dev.h> #include <linux/can/platform/cc770.h> #include "cc770.h" @@ -440,12 +439,14 @@ static netdev_tx_t cc770_start_xmit(struct sk_buff *skb, struct net_device *dev) for (i = 0; i < dlc; i++) cc770_write_reg(priv, msgobj[mo].data[i], cf->data[i]); + /* Store echo skb before starting the transfer */ + can_put_echo_skb(skb, dev, 0); + cc770_write_reg(priv, msgobj[mo].ctrl1, RMTPND_RES | TXRQST_SET | CPUUPD_RES | NEWDAT_UNC); stats->tx_bytes += dlc; - can_put_echo_skb(skb, dev, 0); /* * HM: We had some cases of repeated IRQs so make sure the |