Patchwork [09/33] macvlan: convert to net_device_ops

login
register
mail settings
Submitter stephen hemminger
Date Nov. 17, 2008, 11:42 p.m.
Message ID <20081117234355.542288294@vyatta.com>
Download mbox | patch
Permalink /patch/9272/
State Accepted
Delegated to: David Miller
Headers show

Comments

stephen hemminger - Nov. 17, 2008, 11:42 p.m.
Convert to net_device_ops function table.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
David Miller - Nov. 20, 2008, 5:51 a.m.
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Mon, 17 Nov 2008 15:42:16 -0800

> Convert to net_device_ops function table.
> 
> 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/drivers/net/macvlan.c	2008-11-04 13:58:06.000000000 -0800
+++ b/drivers/net/macvlan.c	2008-11-17 10:25:18.000000000 -0800
@@ -361,17 +361,22 @@  static const struct ethtool_ops macvlan_
 	.get_flags		= macvlan_ethtool_get_flags,
 };
 
+static const struct net_device_ops macvlan_netdev_ops = {
+	.init		= macvlan_init,
+	.open		= macvlan_open,
+	.stop		= macvlan_stop,
+	.change_mtu	= macvlan_change_mtu,
+	.change_rx_flags= macvlan_change_rx_flags,
+	.set_mac_address= macvlan_set_mac_address,
+	.set_multicast_list= macvlan_set_multicast_list,
+	.validate_addr = eth_validate_addr,
+};
+
 static void macvlan_setup(struct net_device *dev)
 {
 	ether_setup(dev);
 
-	dev->init		= macvlan_init;
-	dev->open		= macvlan_open;
-	dev->stop		= macvlan_stop;
-	dev->change_mtu		= macvlan_change_mtu;
-	dev->change_rx_flags	= macvlan_change_rx_flags;
-	dev->set_mac_address	= macvlan_set_mac_address;
-	dev->set_multicast_list	= macvlan_set_multicast_list;
+	dev->netdev_ops		= &macvlan_netdev_ops;
 	dev->hard_start_xmit	= macvlan_hard_start_xmit;
 	dev->destructor		= free_netdev;
 	dev->header_ops		= &macvlan_hard_header_ops,