diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-01-07 20:58:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-07 20:58:43 -0500 |
commit | 633a277e2a06b4cc10b1373380b09613c702523c (patch) | |
tree | 9671b2cfc1d50c17aed139d5d1889d1237f0d955 | |
parent | 4fc8006e003a9bcb09015179e1cfc42420d88872 (diff) |
sundance: update to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/sundance.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index 698893b92003..feaf0e0577d7 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c | |||
@@ -449,6 +449,19 @@ static void sundance_reset(struct net_device *dev, unsigned long reset_cmd) | |||
449 | } | 449 | } |
450 | } | 450 | } |
451 | 451 | ||
452 | static const struct net_device_ops netdev_ops = { | ||
453 | .ndo_open = netdev_open, | ||
454 | .ndo_stop = netdev_close, | ||
455 | .ndo_start_xmit = start_tx, | ||
456 | .ndo_get_stats = get_stats, | ||
457 | .ndo_set_multicast_list = set_rx_mode, | ||
458 | .ndo_do_ioctl = netdev_ioctl, | ||
459 | .ndo_tx_timeout = tx_timeout, | ||
460 | .ndo_change_mtu = change_mtu, | ||
461 | .ndo_set_mac_address = eth_mac_addr, | ||
462 | .ndo_validate_addr = eth_validate_addr, | ||
463 | }; | ||
464 | |||
452 | static int __devinit sundance_probe1 (struct pci_dev *pdev, | 465 | static int __devinit sundance_probe1 (struct pci_dev *pdev, |
453 | const struct pci_device_id *ent) | 466 | const struct pci_device_id *ent) |
454 | { | 467 | { |
@@ -530,16 +543,10 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev, | |||
530 | np->mii_if.reg_num_mask = 0x1f; | 543 | np->mii_if.reg_num_mask = 0x1f; |
531 | 544 | ||
532 | /* The chip-specific entries in the device structure. */ | 545 | /* The chip-specific entries in the device structure. */ |
533 | dev->open = &netdev_open; | 546 | dev->netdev_ops = &netdev_ops; |
534 | dev->hard_start_xmit = &start_tx; | ||
535 | dev->stop = &netdev_close; | ||
536 | dev->get_stats = &get_stats; | ||
537 | dev->set_multicast_list = &set_rx_mode; | ||
538 | dev->do_ioctl = &netdev_ioctl; | ||
539 | SET_ETHTOOL_OPS(dev, ðtool_ops); | 547 | SET_ETHTOOL_OPS(dev, ðtool_ops); |
540 | dev->tx_timeout = &tx_timeout; | ||
541 | dev->watchdog_timeo = TX_TIMEOUT; | 548 | dev->watchdog_timeo = TX_TIMEOUT; |
542 | dev->change_mtu = &change_mtu; | 549 | |
543 | pci_set_drvdata(pdev, dev); | 550 | pci_set_drvdata(pdev, dev); |
544 | 551 | ||
545 | i = register_netdev(dev); | 552 | i = register_netdev(dev); |