提交 9b31b697 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

smc91c92: convert to net_device_ops

Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6fb7298c
...@@ -300,6 +300,19 @@ static void mdio_write(struct net_device *dev, int phy_id, int loc, int value); ...@@ -300,6 +300,19 @@ static void mdio_write(struct net_device *dev, int phy_id, int loc, int value);
static int smc_link_ok(struct net_device *dev); static int smc_link_ok(struct net_device *dev);
static const struct ethtool_ops ethtool_ops; static const struct ethtool_ops ethtool_ops;
static const struct net_device_ops smc_netdev_ops = {
.ndo_open = smc_open,
.ndo_stop = smc_close,
.ndo_start_xmit = smc_start_xmit,
.ndo_tx_timeout = smc_tx_timeout,
.ndo_set_config = s9k_config,
.ndo_set_multicast_list = set_rx_mode,
.ndo_do_ioctl = &smc_ioctl,
.ndo_change_mtu = eth_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
/*====================================================================== /*======================================================================
smc91c92_attach() creates an "instance" of the driver, allocating smc91c92_attach() creates an "instance" of the driver, allocating
...@@ -335,17 +348,9 @@ static int smc91c92_probe(struct pcmcia_device *link) ...@@ -335,17 +348,9 @@ static int smc91c92_probe(struct pcmcia_device *link)
link->conf.IntType = INT_MEMORY_AND_IO; link->conf.IntType = INT_MEMORY_AND_IO;
/* The SMC91c92-specific entries in the device structure. */ /* The SMC91c92-specific entries in the device structure. */
dev->hard_start_xmit = &smc_start_xmit; dev->netdev_ops = &smc_netdev_ops;
dev->set_config = &s9k_config;
dev->set_multicast_list = &set_rx_mode;
dev->open = &smc_open;
dev->stop = &smc_close;
dev->do_ioctl = &smc_ioctl;
SET_ETHTOOL_OPS(dev, &ethtool_ops); SET_ETHTOOL_OPS(dev, &ethtool_ops);
#ifdef HAVE_TX_TIMEOUT
dev->tx_timeout = smc_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
#endif
smc->mii_if.dev = dev; smc->mii_if.dev = dev;
smc->mii_if.mdio_read = mdio_read; smc->mii_if.mdio_read = mdio_read;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册