summaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 19:36:08 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-21 22:37:55 -0700
commit0cd6e828a3cfb9c5bb71827ae6ee1564bf465f48 (patch)
treee24b513a9ff85639ab7ea656f177316baf8c00fd /drivers/net/pcmcia
parent6394d7c9a2c4c5d729c1cdb69f96f9fff16ec232 (diff)
downloadkernel-crypto-0cd6e828a3cfb9c5bb71827ae6ee1564bf465f48.tar.gz
kernel-crypto-0cd6e828a3cfb9c5bb71827ae6ee1564bf465f48.tar.xz
kernel-crypto-0cd6e828a3cfb9c5bb71827ae6ee1564bf465f48.zip
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.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index f8fdf8997e0..a3685c0d22f 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,
/*============= Main bulk of functions =========================*/
+static const struct net_device_ops netdev_ops = {
+ .ndo_open = do_open,
+ .ndo_stop = do_stop,
+ .ndo_start_xmit = do_start_xmit,
+ .ndo_tx_timeout = xirc_tx_timeout,
+ .ndo_set_config = do_config,
+ .ndo_do_ioctl = do_ioctl,
+ .ndo_set_multicast_list = set_multicast_list,
+ .ndo_change_mtu = eth_change_mtu,
+ .ndo_set_mac_address = eth_mac_addr,
+ .ndo_validate_addr = eth_validate_addr,
+};
+
/****************
* xirc2ps_attach() creates an "instance" of the driver, allocating
* local data structures for one device. The device is registered
@@ -580,18 +593,10 @@ xirc2ps_probe(struct pcmcia_device *link)
link->irq.Instance = dev;
/* Fill in card specific entries */
- dev->hard_start_xmit = &do_start_xmit;
- dev->set_config = &do_config;
- dev->do_ioctl = &do_ioctl;
- SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
- dev->set_multicast_list = &set_multicast_list;
- dev->open = &do_open;
- dev->stop = &do_stop;
-#ifdef HAVE_TX_TIMEOUT
- dev->tx_timeout = xirc_tx_timeout;
+ dev->netdev_ops = &netdev_ops;
+ dev->ethtool_ops = &netdev_ethtool_ops;
dev->watchdog_timeo = TX_TIMEOUT;
INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task);
-#endif
return xirc2ps_config(link);
} /* xirc2ps_attach */