From: Stephen Hemminger Date: Fri, 21 Nov 2008 04:28:35 +0000 (-0800) Subject: ipmr: convert ipmr virtual interface to net_device_ops X-Git-Tag: v2.6.29-rc1~581^2~613 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=007c3838d9fdcc8fdaea87e4879ec3759f016ed5;p=linux-2.6-omap-h63xx.git ipmr: convert ipmr virtual interface to net_device_ops Convert to new network device ops interface. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index ee58bcbc99a..77fc4d3fdf6 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) return 0; } +static const struct net_device_ops reg_vif_netdev_ops = { + .ndo_start_xmit = reg_vif_xmit, +}; + static void reg_vif_setup(struct net_device *dev) { dev->type = ARPHRD_PIMREG; dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr) - 8; dev->flags = IFF_NOARP; - dev->hard_start_xmit = reg_vif_xmit; + dev->netdev_ops = ®_vif_netdev_ops, dev->destructor = free_netdev; } diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 363ae258ee1..dfba9fd0c24 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) return 0; } +static const struct net_device_ops reg_vif_netdev_ops = { + .ndo_start_xmit = reg_vif_xmit, +}; + static void reg_vif_setup(struct net_device *dev) { dev->type = ARPHRD_PIMREG; dev->mtu = 1500 - sizeof(struct ipv6hdr) - 8; dev->flags = IFF_NOARP; - dev->hard_start_xmit = reg_vif_xmit; + dev->netdev_ops = ®_vif_netdev_ops; dev->destructor = free_netdev; }