diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-15 11:58:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 04:21:09 +0200 |
commit | e3c50d5d25ac09efd9acbe2b2a3e365466de84ed (patch) | |
tree | dc5bc3322f9e4829c2143fc4fc60532fd84ab9a1 /drivers/net/loopback.c | |
parent | netdev: Kill struct net_device_subqueue and netdev->egress_subqueue* (diff) | |
download | linux-e3c50d5d25ac09efd9acbe2b2a3e365466de84ed.tar.xz linux-e3c50d5d25ac09efd9acbe2b2a3e365466de84ed.zip |
netdev: netdev_priv() can now be sane again.
The private area of a netdev is now at a fixed offset once more.
Unfortunately, some assumptions that netdev_priv() == netdev->priv
crept back into the tree. In particular this happened in the
loopback driver. Make it use netdev->ml_priv.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r-- | drivers/net/loopback.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 41b774baac4d..49f6bc036a92 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -153,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++; @@ -171,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; @@ -207,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); |