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

dl2k: convert to net_device_ops

Convert driver to new net_device_ops. Compile tested only.

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
87652644 0421eae6

+14 -8
+14 -8
drivers/net/dl2k.c
··· 85 85 86 86 static const struct ethtool_ops ethtool_ops; 87 87 88 + static const struct net_device_ops netdev_ops = { 89 + .ndo_open = rio_open, 90 + .ndo_start_xmit = start_xmit, 91 + .ndo_stop = rio_close, 92 + .ndo_get_stats = get_stats, 93 + .ndo_validate_addr = eth_validate_addr, 94 + .ndo_set_mac_address = eth_mac_addr, 95 + .ndo_set_multicast_list = set_multicast, 96 + .ndo_do_ioctl = rio_ioctl, 97 + .ndo_tx_timeout = rio_tx_timeout, 98 + .ndo_change_mtu = change_mtu, 99 + }; 100 + 88 101 static int __devinit 89 102 rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) 90 103 { ··· 210 197 else if (tx_coalesce > TX_RING_SIZE-1) 211 198 tx_coalesce = TX_RING_SIZE - 1; 212 199 } 213 - dev->open = &rio_open; 214 - dev->hard_start_xmit = &start_xmit; 215 - dev->stop = &rio_close; 216 - dev->get_stats = &get_stats; 217 - dev->set_multicast_list = &set_multicast; 218 - dev->do_ioctl = &rio_ioctl; 219 - dev->tx_timeout = &rio_tx_timeout; 200 + dev->netdev_ops = &netdev_ops; 220 201 dev->watchdog_timeo = TX_TIMEOUT; 221 - dev->change_mtu = &change_mtu; 222 202 SET_ETHTOOL_OPS(dev, &ethtool_ops); 223 203 #if 0 224 204 dev->features = NETIF_F_IP_CSUM;