Patchwork [3/9] ipmr: convert ipmr virtual interface to net_device_ops

login
register
mail settings
Submitter stephen hemminger
Date Nov. 20, 2008, 5:59 p.m.
Message ID <20081120175933.753991540@vyatta.com>
Download mbox | patch
Permalink /patch/9861/
State Accepted
Delegated to: David Miller
Headers show

Comments

stephen hemminger - Nov. 20, 2008, 5:59 p.m.
Convert to new network device ops interface.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
David Miller - Nov. 21, 2008, 4:29 a.m.
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Thu, 20 Nov 2008 09:59:16 -0800

> Convert to new network device ops interface.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- a/net/ipv4/ipmr.c	2008-11-20 09:14:09.000000000 -0800
+++ b/net/ipv4/ipmr.c	2008-11-20 09:15:27.000000000 -0800
@@ -222,12 +222,16 @@  static int reg_vif_xmit(struct sk_buff *
 	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		= &reg_vif_netdev_ops,
 	dev->destructor		= free_netdev;
 }
 
--- a/net/ipv6/ip6mr.c	2008-11-20 09:14:08.000000000 -0800
+++ b/net/ipv6/ip6mr.c	2008-11-20 09:15:27.000000000 -0800
@@ -416,12 +416,16 @@  static int reg_vif_xmit(struct sk_buff *
 	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		= &reg_vif_netdev_ops;
 	dev->destructor		= free_netdev;
 }