Merge branch 'device-properties' into acpi-init
[linux-drm-fsl-dcu.git] / net / atm / clip.c
index 46339040fef014771e504803eef23356c6a1a9f4..e07f551a863c89705fcbd348f2ac2eb73fd002fe 100644 (file)
@@ -317,6 +317,9 @@ static int clip_constructor(struct neighbour *neigh)
 
 static int clip_encap(struct atm_vcc *vcc, int mode)
 {
+       if (!CLIP_VCC(vcc))
+               return -EBADFD;
+
        CLIP_VCC(vcc)->encap = mode;
        return 0;
 }
@@ -384,7 +387,7 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
        pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, vcc, vcc->dev);
        old = xchg(&entry->vccs->xoff, 1);      /* assume XOFF ... */
        if (old) {
-               pr_warning("XOFF->XOFF transition\n");
+               pr_warn("XOFF->XOFF transition\n");
                goto out_release_neigh;
        }
        dev->stats.tx_packets++;
@@ -447,7 +450,7 @@ static int clip_setentry(struct atm_vcc *vcc, __be32 ip)
        struct rtable *rt;
 
        if (vcc->push != clip_push) {
-               pr_warning("non-CLIP VCC\n");
+               pr_warn("non-CLIP VCC\n");
                return -EBADF;
        }
        clip_vcc = CLIP_VCC(vcc);
@@ -501,7 +504,7 @@ static void clip_setup(struct net_device *dev)
        /* without any more elaborate queuing. 100 is a reasonable */
        /* compromise between decent burst-tolerance and protection */
        /* against memory hogs. */
-       dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
+       netif_keep_dst(dev);
 }
 
 static int clip_create(int number)