Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stephen Hemminger and committed by
David S. Miller
aa18e9e8 00829823

+10 -5
+10 -5
drivers/net/dummy.c
··· 57 57 { 58 58 } 59 59 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 + 60 67 static void dummy_setup(struct net_device *dev) 61 68 { 69 + ether_setup(dev); 70 + 62 71 /* 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; 66 73 dev->destructor = free_netdev; 67 74 68 75 /* Fill in device structure with ethernet-generic values. */ 69 - ether_setup(dev); 70 76 dev->tx_queue_len = 0; 71 - dev->change_mtu = NULL; 72 77 dev->flags |= IFF_NOARP; 73 78 dev->flags &= ~IFF_MULTICAST; 74 79 random_ether_addr(dev->dev_addr);