diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-03-20 07:09:19 +0100 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-03-20 07:13:50 +0100 |
commit | 17d5ca91cfc59ae91da5ff9da74ab09a9a2a17d9 (patch) | |
tree | a45f944e15a2600ec20ca4ec11b23d4641095e8e /drivers/net/can/vcan.c | |
parent | Video: atmel: avoid the id of fix screen info is overwritten (diff) | |
parent | Doc/DT: Add DT binding documentation for tpd12s015 encoder (diff) | |
download | linux-17d5ca91cfc59ae91da5ff9da74ab09a9a2a17d9.tar.xz linux-17d5ca91cfc59ae91da5ff9da74ab09a9a2a17d9.zip |
Merge branch '3.15/dss-dt' into 3.15/fbdev
Merge OMAP DSS DT support
Diffstat (limited to 'drivers/net/can/vcan.c')
-rw-r--r-- | drivers/net/can/vcan.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c index 0a2a5ee79a17..4e94057ef5cf 100644 --- a/drivers/net/can/vcan.c +++ b/drivers/net/can/vcan.c @@ -46,6 +46,7 @@ #include <linux/if_ether.h> #include <linux/can.h> #include <linux/can/dev.h> +#include <linux/can/skb.h> #include <linux/slab.h> #include <net/rtnetlink.h> @@ -109,25 +110,23 @@ static netdev_tx_t vcan_tx(struct sk_buff *skb, struct net_device *dev) stats->rx_packets++; stats->rx_bytes += cfd->len; } - kfree_skb(skb); + consume_skb(skb); return NETDEV_TX_OK; } /* perform standard echo handling for CAN network interfaces */ if (loop) { - struct sock *srcsk = skb->sk; - skb = skb_share_check(skb, GFP_ATOMIC); + skb = can_create_echo_skb(skb); if (!skb) return NETDEV_TX_OK; /* receive with packet counting */ - skb->sk = srcsk; vcan_rx(skb, dev); } else { /* no looped packets => no counting */ - kfree_skb(skb); + consume_skb(skb); } return NETDEV_TX_OK; } |