summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-19 21:51:06 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-19 22:42:40 -0800
commit54a30c975b6b27c0c9268461b647576b146d39bb (patch)
treed1b6264dec1e8ab3e9ad37557d3c57a6a81f946b
parent4456e7bdf74c9f27e2312a6f197b2da467541433 (diff)
macvlan: convert to net_device_ops
Convert to net_device_ops function table. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/macvlan.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index cabde9ab0e4a..d00ea444e0a3 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -361,17 +361,22 @@ static const struct ethtool_ops macvlan_ethtool_ops = {
.get_flags = macvlan_ethtool_get_flags,
};
+static const struct net_device_ops macvlan_netdev_ops = {
+ .ndo_init = macvlan_init,
+ .ndo_open = macvlan_open,
+ .ndo_stop = macvlan_stop,
+ .ndo_change_mtu = macvlan_change_mtu,
+ .ndo_change_rx_flags = macvlan_change_rx_flags,
+ .ndo_set_mac_address = macvlan_set_mac_address,
+ .ndo_set_multicast_list = macvlan_set_multicast_list,
+ .ndo_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,