diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-19 22:09:07 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-19 22:42:46 -0800 |
commit | 48dfcde46ef23cfad1e0c0f13d4eae15c7f46efc (patch) | |
tree | 728264d7bbc3cbd92eab271b17979151fdc3fa7f /drivers/net/8139too.c | |
parent | 8b4ab28dae8afa14f22d210c591046def2f4d742 (diff) |
8139: convert to net_device_ops
Convert to new network device ops interface.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/8139too.c')
-rw-r--r-- | drivers/net/8139too.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 37456ada44c..f8866552386 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c @@ -916,6 +916,19 @@ err_out: return rc; } +static const struct net_device_ops rtl8139_netdev_ops = { + .ndo_open = rtl8139_open, + .ndo_stop = rtl8139_close, + .ndo_get_stats = rtl8139_get_stats, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_multicast_list = rtl8139_set_rx_mode, + .ndo_do_ioctl = netdev_ioctl, + .ndo_tx_timeout = rtl8139_tx_timeout, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = rtl8139_poll_controller, +#endif + +}; static int __devinit rtl8139_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) @@ -976,19 +989,11 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); /* The Rtl8139-specific entries in the device structure. */ - dev->open = rtl8139_open; - dev->hard_start_xmit = rtl8139_start_xmit; - netif_napi_add(dev, &tp->napi, rtl8139_poll, 64); - dev->stop = rtl8139_close; - dev->get_stats = rtl8139_get_stats; - dev->set_multicast_list = rtl8139_set_rx_mode; - dev->do_ioctl = netdev_ioctl; + dev->netdev_ops = &rtl8139_netdev_ops; dev->ethtool_ops = &rtl8139_ethtool_ops; - dev->tx_timeout = rtl8139_tx_timeout; dev->watchdog_timeo = TX_TIMEOUT; -#ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = rtl8139_poll_controller; -#endif + dev->hard_start_xmit = rtl8139_start_xmit; + netif_napi_add(dev, &tp->napi, rtl8139_poll, 64); /* note: the hardware is not capable of sg/csum/highdma, however * through the use of skb_copy_and_csum_dev we enable these |