diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 23:28:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 23:28:35 -0500 |
commit | 007c3838d9fdcc8fdaea87e4879ec3759f016ed5 (patch) | |
tree | 67f09220e48797dc2799a7db6b0b4f5cc8a99ac3 /net | |
parent | aa18e9e88c863a58f6ea63eeee0e740be071fdcf (diff) |
ipmr: convert ipmr virtual interface to net_device_ops
Convert to new network device ops interface.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipmr.c | 6 | ||||
-rw-r--r-- | net/ipv6/ip6mr.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index ee58bcbc99a5..77fc4d3fdf61 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -222,12 +222,16 @@ static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev) | |||
222 | return 0; | 222 | return 0; |
223 | } | 223 | } |
224 | 224 | ||
225 | static const struct net_device_ops reg_vif_netdev_ops = { | ||
226 | .ndo_start_xmit = reg_vif_xmit, | ||
227 | }; | ||
228 | |||
225 | static void reg_vif_setup(struct net_device *dev) | 229 | static void reg_vif_setup(struct net_device *dev) |
226 | { | 230 | { |
227 | dev->type = ARPHRD_PIMREG; | 231 | dev->type = ARPHRD_PIMREG; |
228 | dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr) - 8; | 232 | dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr) - 8; |
229 | dev->flags = IFF_NOARP; | 233 | dev->flags = IFF_NOARP; |
230 | dev->hard_start_xmit = reg_vif_xmit; | 234 | dev->netdev_ops = ®_vif_netdev_ops, |
231 | dev->destructor = free_netdev; | 235 | dev->destructor = free_netdev; |
232 | } | 236 | } |
233 | 237 | ||
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 363ae258ee1e..dfba9fd0c248 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -416,12 +416,16 @@ static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev) | |||
416 | return 0; | 416 | return 0; |
417 | } | 417 | } |
418 | 418 | ||
419 | static const struct net_device_ops reg_vif_netdev_ops = { | ||
420 | .ndo_start_xmit = reg_vif_xmit, | ||
421 | }; | ||
422 | |||
419 | static void reg_vif_setup(struct net_device *dev) | 423 | static void reg_vif_setup(struct net_device *dev) |
420 | { | 424 | { |
421 | dev->type = ARPHRD_PIMREG; | 425 | dev->type = ARPHRD_PIMREG; |
422 | dev->mtu = 1500 - sizeof(struct ipv6hdr) - 8; | 426 | dev->mtu = 1500 - sizeof(struct ipv6hdr) - 8; |
423 | dev->flags = IFF_NOARP; | 427 | dev->flags = IFF_NOARP; |
424 | dev->hard_start_xmit = reg_vif_xmit; | 428 | dev->netdev_ops = ®_vif_netdev_ops; |
425 | dev->destructor = free_netdev; | 429 | dev->destructor = free_netdev; |
426 | } | 430 | } |
427 | 431 | ||