aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dummy.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 23:28:00 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 23:28:00 -0500
commitaa18e9e88c863a58f6ea63eeee0e740be071fdcf (patch)
tree000e77d5d3b11314619a2ff2cd1a1a4e42d1885b /drivers/net/dummy.c
parent008298231abbeb91bc7be9e8b078607b816d1a4a (diff)
dummy: convert 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 'drivers/net/dummy.c')
-rw-r--r--drivers/net/dummy.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index 84e14f397d9a..8ebd7d789405 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -57,18 +57,23 @@ static void set_multicast_list(struct net_device *dev)
57{ 57{
58} 58}
59 59
60static const struct net_device_ops dummy_netdev_ops = {
61 .ndo_start_xmit = dummy_xmit,
62 .ndo_validate_addr = eth_validate_addr,
63 .ndo_set_multicast_list = set_multicast_list,
64 .ndo_set_mac_address = dummy_set_address,
65};
66
60static void dummy_setup(struct net_device *dev) 67static void dummy_setup(struct net_device *dev)
61{ 68{
69 ether_setup(dev);
70
62 /* Initialize the device structure. */ 71 /* Initialize the device structure. */
63 dev->hard_start_xmit = dummy_xmit; 72 dev->netdev_ops = &dummy_netdev_ops;
64 dev->set_multicast_list = set_multicast_list;
65 dev->set_mac_address = dummy_set_address;
66 dev->destructor = free_netdev; 73 dev->destructor = free_netdev;
67 74
68 /* Fill in device structure with ethernet-generic values. */ 75 /* Fill in device structure with ethernet-generic values. */
69 ether_setup(dev);
70 dev->tx_queue_len = 0; 76 dev->tx_queue_len = 0;
71 dev->change_mtu = NULL;
72 dev->flags |= IFF_NOARP; 77 dev->flags |= IFF_NOARP;
73 dev->flags &= ~IFF_MULTICAST; 78 dev->flags &= ~IFF_MULTICAST;
74 random_ether_addr(dev->dev_addr); 79 random_ether_addr(dev->dev_addr);