aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/nmclan_cs.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 15:36:05 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-21 22:55:38 -0400
commit28b1801d5a367adaf3d02605c762a59781d99664 (patch)
tree7f360248baffdbe5fb77f790f057525acab961dc /drivers/net/pcmcia/nmclan_cs.c
parent496f98cd5687770f4cb463c300510016dfbc81f6 (diff)
pcmcia: convert nmclan driver 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/nmclan_cs.c')
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index ec7c588c9ae5..02ef63ed1f99 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -436,6 +436,19 @@ static const struct ethtool_ops netdev_ethtool_ops;
436 436
437static void nmclan_detach(struct pcmcia_device *p_dev); 437static void nmclan_detach(struct pcmcia_device *p_dev);
438 438
439static const struct net_device_ops mace_netdev_ops = {
440 .ndo_open = mace_open,
441 .ndo_stop = mace_close,
442 .ndo_start_xmit = mace_start_xmit,
443 .ndo_tx_timeout = mace_tx_timeout,
444 .ndo_set_config = mace_config,
445 .ndo_get_stats = mace_get_stats,
446 .ndo_set_multicast_list = set_multicast_list,
447 .ndo_change_mtu = eth_change_mtu,
448 .ndo_set_mac_address = eth_mac_addr,
449 .ndo_validate_addr = eth_validate_addr,
450};
451
439/* ---------------------------------------------------------------------------- 452/* ----------------------------------------------------------------------------
440nmclan_attach 453nmclan_attach
441 Creates an "instance" of the driver, allocating local data 454 Creates an "instance" of the driver, allocating local data
@@ -474,17 +487,9 @@ static int nmclan_probe(struct pcmcia_device *link)
474 487
475 lp->tx_free_frames=AM2150_MAX_TX_FRAMES; 488 lp->tx_free_frames=AM2150_MAX_TX_FRAMES;
476 489
477 dev->hard_start_xmit = &mace_start_xmit; 490 dev->netdev_ops = &mace_netdev_ops;
478 dev->set_config = &mace_config;
479 dev->get_stats = &mace_get_stats;
480 dev->set_multicast_list = &set_multicast_list;
481 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); 491 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
482 dev->open = &mace_open;
483 dev->stop = &mace_close;
484#ifdef HAVE_TX_TIMEOUT
485 dev->tx_timeout = mace_tx_timeout;
486 dev->watchdog_timeo = TX_TIMEOUT; 492 dev->watchdog_timeo = TX_TIMEOUT;
487#endif
488 493
489 return nmclan_config(link); 494 return nmclan_config(link);
490} /* nmclan_attach */ 495} /* nmclan_attach */