diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 15:36:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-22 01:37:55 -0400 |
commit | 0cd6e828a3cfb9c5bb71827ae6ee1564bf465f48 (patch) | |
tree | e24b513a9ff85639ab7ea656f177316baf8c00fd /drivers/net/pcmcia | |
parent | 6394d7c9a2c4c5d729c1cdb69f96f9fff16ec232 (diff) |
xirc2ps: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pcmcia')
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index f8fdf8997e0d..a3685c0d22fc 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -545,6 +545,19 @@ mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg, unsigned data, | |||
545 | 545 | ||
546 | /*============= Main bulk of functions =========================*/ | 546 | /*============= Main bulk of functions =========================*/ |
547 | 547 | ||
548 | static const struct net_device_ops netdev_ops = { | ||
549 | .ndo_open = do_open, | ||
550 | .ndo_stop = do_stop, | ||
551 | .ndo_start_xmit = do_start_xmit, | ||
552 | .ndo_tx_timeout = xirc_tx_timeout, | ||
553 | .ndo_set_config = do_config, | ||
554 | .ndo_do_ioctl = do_ioctl, | ||
555 | .ndo_set_multicast_list = set_multicast_list, | ||
556 | .ndo_change_mtu = eth_change_mtu, | ||
557 | .ndo_set_mac_address = eth_mac_addr, | ||
558 | .ndo_validate_addr = eth_validate_addr, | ||
559 | }; | ||
560 | |||
548 | /**************** | 561 | /**************** |
549 | * xirc2ps_attach() creates an "instance" of the driver, allocating | 562 | * xirc2ps_attach() creates an "instance" of the driver, allocating |
550 | * local data structures for one device. The device is registered | 563 | * local data structures for one device. The device is registered |
@@ -580,18 +593,10 @@ xirc2ps_probe(struct pcmcia_device *link) | |||
580 | link->irq.Instance = dev; | 593 | link->irq.Instance = dev; |
581 | 594 | ||
582 | /* Fill in card specific entries */ | 595 | /* Fill in card specific entries */ |
583 | dev->hard_start_xmit = &do_start_xmit; | 596 | dev->netdev_ops = &netdev_ops; |
584 | dev->set_config = &do_config; | 597 | dev->ethtool_ops = &netdev_ethtool_ops; |
585 | dev->do_ioctl = &do_ioctl; | ||
586 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | ||
587 | dev->set_multicast_list = &set_multicast_list; | ||
588 | dev->open = &do_open; | ||
589 | dev->stop = &do_stop; | ||
590 | #ifdef HAVE_TX_TIMEOUT | ||
591 | dev->tx_timeout = xirc_tx_timeout; | ||
592 | dev->watchdog_timeo = TX_TIMEOUT; | 598 | dev->watchdog_timeo = TX_TIMEOUT; |
593 | INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task); | 599 | INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task); |
594 | #endif | ||
595 | 600 | ||
596 | return xirc2ps_config(link); | 601 | return xirc2ps_config(link); |
597 | } /* xirc2ps_attach */ | 602 | } /* xirc2ps_attach */ |