aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/appletalk/ipddp.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-11-13 02:37:49 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-13 02:37:49 -0500
commit454d7c9b14e20fd1949e2686e9de4a2926e01476 (patch)
treefae8bd1bfb5fd496977a0639ad71c54a2ee278ae /drivers/net/appletalk/ipddp.c
parent7a12122c7a00347da9669cfcde82954c9e3d6f5e (diff)
netdevice: safe convert to netdev_priv() #part-1
We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. This patch is a safe convert for netdev->priv to netdev_priv(netdev). Since all of the netdev->priv is only for read. But it is too big to be sent in one mail. I split it to 4 parts and make every part smaller than 100,000 bytes, which is max size allowed by vger. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/appletalk/ipddp.c')
-rw-r--r--drivers/net/appletalk/ipddp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c
index 1071144edd66..9a0be9b2eaad 100644
--- a/drivers/net/appletalk/ipddp.c
+++ b/drivers/net/appletalk/ipddp.c
@@ -108,7 +108,7 @@ static struct net_device * __init ipddp_init(void)
108 */ 108 */
109static struct net_device_stats *ipddp_get_stats(struct net_device *dev) 109static struct net_device_stats *ipddp_get_stats(struct net_device *dev)
110{ 110{
111 return dev->priv; 111 return netdev_priv(dev);
112} 112}
113 113
114/* 114/*
@@ -170,8 +170,8 @@ static int ipddp_xmit(struct sk_buff *skb, struct net_device *dev)
170 170
171 skb->protocol = htons(ETH_P_ATALK); /* Protocol has changed */ 171 skb->protocol = htons(ETH_P_ATALK); /* Protocol has changed */
172 172
173 ((struct net_device_stats *) dev->priv)->tx_packets++; 173 ((struct net_device_stats *) netdev_priv(dev))->tx_packets++;
174 ((struct net_device_stats *) dev->priv)->tx_bytes+=skb->len; 174 ((struct net_device_stats *) netdev_priv(dev))->tx_bytes += skb->len;
175 175
176 if(aarp_send_ddp(rt->dev, skb, &rt->at, NULL) < 0) 176 if(aarp_send_ddp(rt->dev, skb, &rt->at, NULL) < 0)
177 dev_kfree_skb(skb); 177 dev_kfree_skb(skb);