aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/sit.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-01-09 01:05:26 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-09 17:16:03 -0500
commit2941a4863154982918d39a639632c76eeacfa884 (patch)
tree4d61d12a1f172635b2e3295b35d072738f157dc0 /net/ipv6/sit.c
parenta429d2609c153882c421b067ad5ae5a38851459e (diff)
[NET]: Convert net/{ipv4,ipv6,sched} to netdev_priv
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r--net/ipv6/sit.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 02872ae8a439..0dae48aa1cec 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -184,7 +184,7 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int
184 if (dev == NULL) 184 if (dev == NULL)
185 return NULL; 185 return NULL;
186 186
187 nt = dev->priv; 187 nt = netdev_priv(dev);
188 dev->init = ipip6_tunnel_init; 188 dev->init = ipip6_tunnel_init;
189 nt->parms = *parms; 189 nt->parms = *parms;
190 190
@@ -210,7 +210,7 @@ static void ipip6_tunnel_uninit(struct net_device *dev)
210 write_unlock_bh(&ipip6_lock); 210 write_unlock_bh(&ipip6_lock);
211 dev_put(dev); 211 dev_put(dev);
212 } else { 212 } else {
213 ipip6_tunnel_unlink((struct ip_tunnel*)dev->priv); 213 ipip6_tunnel_unlink(netdev_priv(dev));
214 dev_put(dev); 214 dev_put(dev);
215 } 215 }
216} 216}
@@ -346,7 +346,7 @@ out:
346 rt6i = rt6_lookup(&iph6->daddr, &iph6->saddr, NULL, 0); 346 rt6i = rt6_lookup(&iph6->daddr, &iph6->saddr, NULL, 0);
347 347
348 if (rt6i && rt6i->rt6i_dev && rt6i->rt6i_dev->type == ARPHRD_SIT) { 348 if (rt6i && rt6i->rt6i_dev && rt6i->rt6i_dev->type == ARPHRD_SIT) {
349 struct ip_tunnel * t = (struct ip_tunnel*)rt6i->rt6i_dev->priv; 349 struct ip_tunnel *t = netdev_priv(rt6i->rt6i_dev);
350 if (rel_type == ICMPV6_TIME_EXCEED && t->parms.iph.ttl) { 350 if (rel_type == ICMPV6_TIME_EXCEED && t->parms.iph.ttl) {
351 rel_type = ICMPV6_DEST_UNREACH; 351 rel_type = ICMPV6_DEST_UNREACH;
352 rel_code = ICMPV6_ADDR_UNREACH; 352 rel_code = ICMPV6_ADDR_UNREACH;
@@ -424,7 +424,7 @@ static inline u32 try_6to4(struct in6_addr *v6dst)
424 424
425static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) 425static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
426{ 426{
427 struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv; 427 struct ip_tunnel *tunnel = netdev_priv(dev);
428 struct net_device_stats *stats = &tunnel->stat; 428 struct net_device_stats *stats = &tunnel->stat;
429 struct iphdr *tiph = &tunnel->parms.iph; 429 struct iphdr *tiph = &tunnel->parms.iph;
430 struct ipv6hdr *iph6 = skb->nh.ipv6h; 430 struct ipv6hdr *iph6 = skb->nh.ipv6h;
@@ -610,7 +610,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
610 t = ipip6_tunnel_locate(&p, 0); 610 t = ipip6_tunnel_locate(&p, 0);
611 } 611 }
612 if (t == NULL) 612 if (t == NULL)
613 t = (struct ip_tunnel*)dev->priv; 613 t = netdev_priv(dev);
614 memcpy(&p, &t->parms, sizeof(p)); 614 memcpy(&p, &t->parms, sizeof(p));
615 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) 615 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
616 err = -EFAULT; 616 err = -EFAULT;
@@ -647,7 +647,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
647 err = -EINVAL; 647 err = -EINVAL;
648 break; 648 break;
649 } 649 }
650 t = (struct ip_tunnel*)dev->priv; 650 t = netdev_priv(dev);
651 ipip6_tunnel_unlink(t); 651 ipip6_tunnel_unlink(t);
652 t->parms.iph.saddr = p.iph.saddr; 652 t->parms.iph.saddr = p.iph.saddr;
653 t->parms.iph.daddr = p.iph.daddr; 653 t->parms.iph.daddr = p.iph.daddr;
@@ -683,7 +683,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
683 if ((t = ipip6_tunnel_locate(&p, 0)) == NULL) 683 if ((t = ipip6_tunnel_locate(&p, 0)) == NULL)
684 goto done; 684 goto done;
685 err = -EPERM; 685 err = -EPERM;
686 if (t == ipip6_fb_tunnel_dev->priv) 686 if (t == netdev_priv(ipip6_fb_tunnel_dev))
687 goto done; 687 goto done;
688 dev = t->dev; 688 dev = t->dev;
689 } 689 }
@@ -700,7 +700,7 @@ done:
700 700
701static struct net_device_stats *ipip6_tunnel_get_stats(struct net_device *dev) 701static struct net_device_stats *ipip6_tunnel_get_stats(struct net_device *dev)
702{ 702{
703 return &(((struct ip_tunnel*)dev->priv)->stat); 703 return &(((struct ip_tunnel*)netdev_priv(dev))->stat);
704} 704}
705 705
706static int ipip6_tunnel_change_mtu(struct net_device *dev, int new_mtu) 706static int ipip6_tunnel_change_mtu(struct net_device *dev, int new_mtu)
@@ -735,7 +735,7 @@ static int ipip6_tunnel_init(struct net_device *dev)
735 struct ip_tunnel *tunnel; 735 struct ip_tunnel *tunnel;
736 struct iphdr *iph; 736 struct iphdr *iph;
737 737
738 tunnel = (struct ip_tunnel*)dev->priv; 738 tunnel = netdev_priv(dev);
739 iph = &tunnel->parms.iph; 739 iph = &tunnel->parms.iph;
740 740
741 tunnel->dev = dev; 741 tunnel->dev = dev;
@@ -775,7 +775,7 @@ static int ipip6_tunnel_init(struct net_device *dev)
775 775
776static int __init ipip6_fb_tunnel_init(struct net_device *dev) 776static int __init ipip6_fb_tunnel_init(struct net_device *dev)
777{ 777{
778 struct ip_tunnel *tunnel = dev->priv; 778 struct ip_tunnel *tunnel = netdev_priv(dev);
779 struct iphdr *iph = &tunnel->parms.iph; 779 struct iphdr *iph = &tunnel->parms.iph;
780 780
781 tunnel->dev = dev; 781 tunnel->dev = dev;