3c59x: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4394e6533d
commit
48b47a5e30
1 changed files with 40 additions and 15 deletions
|
@ -992,6 +992,42 @@ static int __devinit vortex_init_one(struct pci_dev *pdev,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct net_device_ops boomrang_netdev_ops = {
|
||||||
|
.ndo_open = vortex_open,
|
||||||
|
.ndo_stop = vortex_close,
|
||||||
|
.ndo_start_xmit = boomerang_start_xmit,
|
||||||
|
.ndo_tx_timeout = vortex_tx_timeout,
|
||||||
|
.ndo_get_stats = vortex_get_stats,
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
|
.ndo_do_ioctl = vortex_ioctl,
|
||||||
|
#endif
|
||||||
|
.ndo_set_multicast_list = set_rx_mode,
|
||||||
|
.ndo_change_mtu = eth_change_mtu,
|
||||||
|
.ndo_set_mac_address = eth_mac_addr,
|
||||||
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
|
.ndo_poll_controller = poll_vortex,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct net_device_ops vortex_netdev_ops = {
|
||||||
|
.ndo_open = vortex_open,
|
||||||
|
.ndo_stop = vortex_close,
|
||||||
|
.ndo_start_xmit = vortex_start_xmit,
|
||||||
|
.ndo_tx_timeout = vortex_tx_timeout,
|
||||||
|
.ndo_get_stats = vortex_get_stats,
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
|
.ndo_do_ioctl = vortex_ioctl,
|
||||||
|
#endif
|
||||||
|
.ndo_set_multicast_list = set_rx_mode,
|
||||||
|
.ndo_change_mtu = eth_change_mtu,
|
||||||
|
.ndo_set_mac_address = eth_mac_addr,
|
||||||
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
|
.ndo_poll_controller = poll_vortex,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start up the PCI/EISA device which is described by *gendev.
|
* Start up the PCI/EISA device which is described by *gendev.
|
||||||
* Return 0 on success.
|
* Return 0 on success.
|
||||||
|
@ -1366,18 +1402,16 @@ static int __devinit vortex_probe1(struct device *gendev,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The 3c59x-specific entries in the device structure. */
|
/* The 3c59x-specific entries in the device structure. */
|
||||||
dev->open = vortex_open;
|
|
||||||
if (vp->full_bus_master_tx) {
|
if (vp->full_bus_master_tx) {
|
||||||
dev->hard_start_xmit = boomerang_start_xmit;
|
dev->netdev_ops = &boomrang_netdev_ops;
|
||||||
/* Actually, it still should work with iommu. */
|
/* Actually, it still should work with iommu. */
|
||||||
if (card_idx < MAX_UNITS &&
|
if (card_idx < MAX_UNITS &&
|
||||||
((hw_checksums[card_idx] == -1 && (vp->drv_flags & HAS_HWCKSM)) ||
|
((hw_checksums[card_idx] == -1 && (vp->drv_flags & HAS_HWCKSM)) ||
|
||||||
hw_checksums[card_idx] == 1)) {
|
hw_checksums[card_idx] == 1)) {
|
||||||
dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
|
dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
dev->hard_start_xmit = vortex_start_xmit;
|
dev->netdev_ops = &vortex_netdev_ops;
|
||||||
}
|
|
||||||
|
|
||||||
if (print_info) {
|
if (print_info) {
|
||||||
printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n",
|
printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n",
|
||||||
|
@ -1386,18 +1420,9 @@ static int __devinit vortex_probe1(struct device *gendev,
|
||||||
(dev->features & NETIF_F_IP_CSUM) ? "en":"dis");
|
(dev->features & NETIF_F_IP_CSUM) ? "en":"dis");
|
||||||
}
|
}
|
||||||
|
|
||||||
dev->stop = vortex_close;
|
|
||||||
dev->get_stats = vortex_get_stats;
|
|
||||||
#ifdef CONFIG_PCI
|
|
||||||
dev->do_ioctl = vortex_ioctl;
|
|
||||||
#endif
|
|
||||||
dev->ethtool_ops = &vortex_ethtool_ops;
|
dev->ethtool_ops = &vortex_ethtool_ops;
|
||||||
dev->set_multicast_list = set_rx_mode;
|
|
||||||
dev->tx_timeout = vortex_tx_timeout;
|
|
||||||
dev->watchdog_timeo = (watchdog * HZ) / 1000;
|
dev->watchdog_timeo = (watchdog * HZ) / 1000;
|
||||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
|
||||||
dev->poll_controller = poll_vortex;
|
|
||||||
#endif
|
|
||||||
if (pdev) {
|
if (pdev) {
|
||||||
vp->pm_state_valid = 1;
|
vp->pm_state_valid = 1;
|
||||||
pci_save_state(VORTEX_PCI(vp));
|
pci_save_state(VORTEX_PCI(vp));
|
||||||
|
|
Loading…
Add table
Reference in a new issue