diff options
author | Patrick McHardy <kaber@trash.net> | 2006-01-09 01:05:26 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-09 17:16:03 -0500 |
commit | 2941a4863154982918d39a639632c76eeacfa884 (patch) | |
tree | 4d61d12a1f172635b2e3295b35d072738f157dc0 /net/ipv6/ip6_tunnel.c | |
parent | a429d2609c153882c421b067ad5ae5a38851459e (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/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index f079621c8b67..c3c2bf699a67 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -243,7 +243,7 @@ ip6_tnl_create(struct ip6_tnl_parm *p, struct ip6_tnl **pt) | |||
243 | if (dev == NULL) | 243 | if (dev == NULL) |
244 | return -ENOMEM; | 244 | return -ENOMEM; |
245 | 245 | ||
246 | t = dev->priv; | 246 | t = netdev_priv(dev); |
247 | dev->init = ip6ip6_tnl_dev_init; | 247 | dev->init = ip6ip6_tnl_dev_init; |
248 | t->parms = *p; | 248 | t->parms = *p; |
249 | 249 | ||
@@ -308,7 +308,7 @@ ip6ip6_tnl_locate(struct ip6_tnl_parm *p, struct ip6_tnl **pt, int create) | |||
308 | static void | 308 | static void |
309 | ip6ip6_tnl_dev_uninit(struct net_device *dev) | 309 | ip6ip6_tnl_dev_uninit(struct net_device *dev) |
310 | { | 310 | { |
311 | struct ip6_tnl *t = dev->priv; | 311 | struct ip6_tnl *t = netdev_priv(dev); |
312 | 312 | ||
313 | if (dev == ip6ip6_fb_tnl_dev) { | 313 | if (dev == ip6ip6_fb_tnl_dev) { |
314 | write_lock_bh(&ip6ip6_lock); | 314 | write_lock_bh(&ip6ip6_lock); |
@@ -623,7 +623,7 @@ ip6ip6_tnl_addr_conflict(struct ip6_tnl *t, struct ipv6hdr *hdr) | |||
623 | static int | 623 | static int |
624 | ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) | 624 | ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) |
625 | { | 625 | { |
626 | struct ip6_tnl *t = (struct ip6_tnl *) dev->priv; | 626 | struct ip6_tnl *t = netdev_priv(dev); |
627 | struct net_device_stats *stats = &t->stat; | 627 | struct net_device_stats *stats = &t->stat; |
628 | struct ipv6hdr *ipv6h = skb->nh.ipv6h; | 628 | struct ipv6hdr *ipv6h = skb->nh.ipv6h; |
629 | struct ipv6_txoptions *opt = NULL; | 629 | struct ipv6_txoptions *opt = NULL; |
@@ -933,11 +933,11 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
933 | break; | 933 | break; |
934 | } | 934 | } |
935 | if ((err = ip6ip6_tnl_locate(&p, &t, 0)) == -ENODEV) | 935 | if ((err = ip6ip6_tnl_locate(&p, &t, 0)) == -ENODEV) |
936 | t = (struct ip6_tnl *) dev->priv; | 936 | t = netdev_priv(dev); |
937 | else if (err) | 937 | else if (err) |
938 | break; | 938 | break; |
939 | } else | 939 | } else |
940 | t = (struct ip6_tnl *) dev->priv; | 940 | t = netdev_priv(dev); |
941 | 941 | ||
942 | memcpy(&p, &t->parms, sizeof (p)); | 942 | memcpy(&p, &t->parms, sizeof (p)); |
943 | if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof (p))) { | 943 | if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof (p))) { |
@@ -955,7 +955,7 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
955 | break; | 955 | break; |
956 | } | 956 | } |
957 | if (!create && dev != ip6ip6_fb_tnl_dev) { | 957 | if (!create && dev != ip6ip6_fb_tnl_dev) { |
958 | t = (struct ip6_tnl *) dev->priv; | 958 | t = netdev_priv(dev); |
959 | } | 959 | } |
960 | if (!t && (err = ip6ip6_tnl_locate(&p, &t, create))) { | 960 | if (!t && (err = ip6ip6_tnl_locate(&p, &t, create))) { |
961 | break; | 961 | break; |
@@ -991,12 +991,12 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
991 | err = ip6ip6_tnl_locate(&p, &t, 0); | 991 | err = ip6ip6_tnl_locate(&p, &t, 0); |
992 | if (err) | 992 | if (err) |
993 | break; | 993 | break; |
994 | if (t == ip6ip6_fb_tnl_dev->priv) { | 994 | if (t == netdev_priv(ip6ip6_fb_tnl_dev)) { |
995 | err = -EPERM; | 995 | err = -EPERM; |
996 | break; | 996 | break; |
997 | } | 997 | } |
998 | } else { | 998 | } else { |
999 | t = (struct ip6_tnl *) dev->priv; | 999 | t = netdev_priv(dev); |
1000 | } | 1000 | } |
1001 | err = unregister_netdevice(t->dev); | 1001 | err = unregister_netdevice(t->dev); |
1002 | break; | 1002 | break; |
@@ -1016,7 +1016,7 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1016 | static struct net_device_stats * | 1016 | static struct net_device_stats * |
1017 | ip6ip6_tnl_get_stats(struct net_device *dev) | 1017 | ip6ip6_tnl_get_stats(struct net_device *dev) |
1018 | { | 1018 | { |
1019 | return &(((struct ip6_tnl *) dev->priv)->stat); | 1019 | return &(((struct ip6_tnl *)netdev_priv(dev))->stat); |
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | /** | 1022 | /** |
@@ -1073,7 +1073,7 @@ static void ip6ip6_tnl_dev_setup(struct net_device *dev) | |||
1073 | static inline void | 1073 | static inline void |
1074 | ip6ip6_tnl_dev_init_gen(struct net_device *dev) | 1074 | ip6ip6_tnl_dev_init_gen(struct net_device *dev) |
1075 | { | 1075 | { |
1076 | struct ip6_tnl *t = (struct ip6_tnl *) dev->priv; | 1076 | struct ip6_tnl *t = netdev_priv(dev); |
1077 | t->fl.proto = IPPROTO_IPV6; | 1077 | t->fl.proto = IPPROTO_IPV6; |
1078 | t->dev = dev; | 1078 | t->dev = dev; |
1079 | strcpy(t->parms.name, dev->name); | 1079 | strcpy(t->parms.name, dev->name); |
@@ -1087,7 +1087,7 @@ ip6ip6_tnl_dev_init_gen(struct net_device *dev) | |||
1087 | static int | 1087 | static int |
1088 | ip6ip6_tnl_dev_init(struct net_device *dev) | 1088 | ip6ip6_tnl_dev_init(struct net_device *dev) |
1089 | { | 1089 | { |
1090 | struct ip6_tnl *t = (struct ip6_tnl *) dev->priv; | 1090 | struct ip6_tnl *t = netdev_priv(dev); |
1091 | ip6ip6_tnl_dev_init_gen(dev); | 1091 | ip6ip6_tnl_dev_init_gen(dev); |
1092 | ip6ip6_tnl_link_config(t); | 1092 | ip6ip6_tnl_link_config(t); |
1093 | return 0; | 1093 | return 0; |
@@ -1103,7 +1103,7 @@ ip6ip6_tnl_dev_init(struct net_device *dev) | |||
1103 | static int | 1103 | static int |
1104 | ip6ip6_fb_tnl_dev_init(struct net_device *dev) | 1104 | ip6ip6_fb_tnl_dev_init(struct net_device *dev) |
1105 | { | 1105 | { |
1106 | struct ip6_tnl *t = dev->priv; | 1106 | struct ip6_tnl *t = netdev_priv(dev); |
1107 | ip6ip6_tnl_dev_init_gen(dev); | 1107 | ip6ip6_tnl_dev_init_gen(dev); |
1108 | dev_hold(dev); | 1108 | dev_hold(dev); |
1109 | tnls_wc[0] = t; | 1109 | tnls_wc[0] = t; |