]> err.no Git - linux-2.6/blobdiff - drivers/net/loopback.c
Merge branch 'linus' into x86/paravirt-spinlocks
[linux-2.6] / drivers / net / loopback.c
index fa147cd5d68c07e2b8e434ffad5db9c55891b58d..49f6bc036a9275f21478f4d7f498300020358049 100644 (file)
@@ -64,8 +64,6 @@ struct pcpu_lstats {
        unsigned long bytes;
 };
 
-#define LOOPBACK_OVERHEAD (128 + MAX_HEADER + 16 + 16)
-
 /* KISS: just allocate small chunks and copy bits.
  *
  * So, in fact, this is documentation, explaining what we expect
@@ -155,7 +153,7 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
        dev->last_rx = jiffies;
 
        /* it's OK to use per_cpu_ptr() because BHs are off */
-       pcpu_lstats = netdev_priv(dev);
+       pcpu_lstats = dev->ml_priv;
        lb_stats = per_cpu_ptr(pcpu_lstats, smp_processor_id());
        lb_stats->bytes += skb->len;
        lb_stats->packets++;
@@ -173,7 +171,7 @@ static struct net_device_stats *get_stats(struct net_device *dev)
        unsigned long packets = 0;
        int i;
 
-       pcpu_lstats = netdev_priv(dev);
+       pcpu_lstats = dev->ml_priv;
        for_each_possible_cpu(i) {
                const struct pcpu_lstats *lb_stats;
 
@@ -209,13 +207,13 @@ static int loopback_dev_init(struct net_device *dev)
        if (!lstats)
                return -ENOMEM;
 
-       dev->priv = lstats;
+       dev->ml_priv = lstats;
        return 0;
 }
 
 static void loopback_dev_free(struct net_device *dev)
 {
-       struct pcpu_lstats *lstats = netdev_priv(dev);
+       struct pcpu_lstats *lstats = dev->ml_priv;
 
        free_percpu(lstats);
        free_netdev(dev);
@@ -260,7 +258,7 @@ static __net_init int loopback_net_init(struct net *net)
        if (!dev)
                goto out;
 
-       dev->nd_net = net;
+       dev_net_set(dev, net);
        err = register_netdev(dev);
        if (err)
                goto out_free_netdev;