提交 5d1d07d8 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

via-rhine: convert to net_device_ops

Convert driver to new net_device_ops. Compile tested only.
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8668ae92
...@@ -614,6 +614,20 @@ static void __devinit rhine_hw_init(struct net_device *dev, long pioaddr) ...@@ -614,6 +614,20 @@ static void __devinit rhine_hw_init(struct net_device *dev, long pioaddr)
rhine_reload_eeprom(pioaddr, dev); rhine_reload_eeprom(pioaddr, dev);
} }
static const struct net_device_ops rhine_netdev_ops = {
.ndo_open = rhine_open,
.ndo_stop = rhine_close,
.ndo_start_xmit = rhine_start_tx,
.ndo_get_stats = rhine_get_stats,
.ndo_set_multicast_list = rhine_set_rx_mode,
.ndo_validate_addr = eth_validate_addr,
.ndo_do_ioctl = netdev_ioctl,
.ndo_tx_timeout = rhine_tx_timeout,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = rhine_poll,
#endif
};
static int __devinit rhine_init_one(struct pci_dev *pdev, static int __devinit rhine_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
...@@ -764,18 +778,10 @@ static int __devinit rhine_init_one(struct pci_dev *pdev, ...@@ -764,18 +778,10 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
rp->mii_if.reg_num_mask = 0x1f; rp->mii_if.reg_num_mask = 0x1f;
/* The chip-specific entries in the device structure. */ /* The chip-specific entries in the device structure. */
dev->open = rhine_open; dev->netdev_ops = &rhine_netdev_ops;
dev->hard_start_xmit = rhine_start_tx; dev->ethtool_ops = &netdev_ethtool_ops,
dev->stop = rhine_close;
dev->get_stats = rhine_get_stats;
dev->set_multicast_list = rhine_set_rx_mode;
dev->do_ioctl = netdev_ioctl;
dev->ethtool_ops = &netdev_ethtool_ops;
dev->tx_timeout = rhine_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = rhine_poll;
#endif
netif_napi_add(dev, &rp->napi, rhine_napipoll, 64); netif_napi_add(dev, &rp->napi, rhine_napipoll, 64);
if (rp->quirks & rqRhineI) if (rp->quirks & rqRhineI)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册