diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-21 20:34:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-21 20:34:32 -0500 |
commit | 09ab9e7cddf0f10afd4695d098120d63183c74d1 (patch) | |
tree | e7bd24ac67beddb686aad11db4fe69fd93fae764 /drivers/net/sis900.c | |
parent | 2f30b1f666b8fa13eb7a254243066e6b77b583f7 (diff) |
sis900: 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>
Diffstat (limited to 'drivers/net/sis900.c')
-rw-r--r-- | drivers/net/sis900.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index 9a363dc0db41..de740ebfafb6 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
@@ -381,6 +381,21 @@ static int __devinit sis96x_get_mac_addr(struct pci_dev * pci_dev, | |||
381 | return 0; | 381 | return 0; |
382 | } | 382 | } |
383 | 383 | ||
384 | static const struct net_device_ops sis900_netdev_ops = { | ||
385 | .ndo_open = sis900_open, | ||
386 | .ndo_stop = sis900_close, | ||
387 | .ndo_start_xmit = sis900_start_xmit, | ||
388 | .ndo_set_config = sis900_set_config, | ||
389 | .ndo_set_multicast_list = set_rx_mode, | ||
390 | .ndo_change_mtu = eth_change_mtu, | ||
391 | .ndo_validate_addr = eth_validate_addr, | ||
392 | .ndo_do_ioctl = mii_ioctl, | ||
393 | .ndo_tx_timeout = sis900_tx_timeout, | ||
394 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
395 | .ndo_poll_controller = sis900_poll, | ||
396 | #endif | ||
397 | }; | ||
398 | |||
384 | /** | 399 | /** |
385 | * sis900_probe - Probe for sis900 device | 400 | * sis900_probe - Probe for sis900 device |
386 | * @pci_dev: the sis900 pci device | 401 | * @pci_dev: the sis900 pci device |
@@ -461,20 +476,10 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev, | |||
461 | sis_priv->rx_ring_dma = ring_dma; | 476 | sis_priv->rx_ring_dma = ring_dma; |
462 | 477 | ||
463 | /* The SiS900-specific entries in the device structure. */ | 478 | /* The SiS900-specific entries in the device structure. */ |
464 | net_dev->open = &sis900_open; | 479 | net_dev->netdev_ops = &sis900_netdev_ops; |
465 | net_dev->hard_start_xmit = &sis900_start_xmit; | ||
466 | net_dev->stop = &sis900_close; | ||
467 | net_dev->set_config = &sis900_set_config; | ||
468 | net_dev->set_multicast_list = &set_rx_mode; | ||
469 | net_dev->do_ioctl = &mii_ioctl; | ||
470 | net_dev->tx_timeout = sis900_tx_timeout; | ||
471 | net_dev->watchdog_timeo = TX_TIMEOUT; | 480 | net_dev->watchdog_timeo = TX_TIMEOUT; |
472 | net_dev->ethtool_ops = &sis900_ethtool_ops; | 481 | net_dev->ethtool_ops = &sis900_ethtool_ops; |
473 | 482 | ||
474 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
475 | net_dev->poll_controller = &sis900_poll; | ||
476 | #endif | ||
477 | |||
478 | if (sis900_debug > 0) | 483 | if (sis900_debug > 0) |
479 | sis_priv->msg_enable = sis900_debug; | 484 | sis_priv->msg_enable = sis900_debug; |
480 | else | 485 | else |