Skip to content

Commit aa18e9e

Browse files
Stephen Hemmingerdavem330
authored andcommitted
dummy: convert to net_device_ops
Convert to new network device ops interface. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0082982 commit aa18e9e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

drivers/net/dummy.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,23 @@ static void set_multicast_list(struct net_device *dev)
5757
{
5858
}
5959

60+
static 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+
6067
static void dummy_setup(struct net_device *dev)
6168
{
69+
ether_setup(dev);
70+
6271
/* Initialize the device structure. */
63-
dev->hard_start_xmit = dummy_xmit;
64-
dev->set_multicast_list = set_multicast_list;
65-
dev->set_mac_address = dummy_set_address;
72+
dev->netdev_ops = &dummy_netdev_ops;
6673
dev->destructor = free_netdev;
6774

6875
/* Fill in device structure with ethernet-generic values. */
69-
ether_setup(dev);
7076
dev->tx_queue_len = 0;
71-
dev->change_mtu = NULL;
7277
dev->flags |= IFF_NOARP;
7378
dev->flags &= ~IFF_MULTICAST;
7479
random_ether_addr(dev->dev_addr);

0 commit comments

Comments
 (0)