Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6-block.git] / net / can / af_can.c
index 32d710eaf1fc991b2ef4638fe8ccc95b84352ace..7933e62a7318915327c7f0a9a8ead8beada40a2e 100644 (file)
@@ -179,7 +179,7 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
 
        sock->ops = cp->ops;
 
-       sk = sk_alloc(net, PF_CAN, GFP_KERNEL, cp->prot);
+       sk = sk_alloc(net, PF_CAN, GFP_KERNEL, cp->prot, kern);
        if (!sk) {
                err = -ENOMEM;
                goto errout;
@@ -310,8 +310,12 @@ int can_send(struct sk_buff *skb, int loop)
                return err;
        }
 
-       if (newskb)
+       if (newskb) {
+               if (!(newskb->tstamp.tv64))
+                       __net_timestamp(newskb);
+
                netif_rx_ni(newskb);
+       }
 
        /* update statistics */
        can_stats.tx_frames++;