Skip to content

Commit

Permalink
acenic: convert to net_device_ops
Browse files Browse the repository at this point in the history
Convert this driver to network device ops. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Nov 20, 2008
1 parent 2c9171d commit d8b83c5
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions drivers/net/acenic.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,17 @@ static const struct ethtool_ops ace_ethtool_ops = {

static void ace_watchdog(struct net_device *dev);

static const struct net_device_ops ace_netdev_ops = {
.ndo_open = ace_open,
.ndo_stop = ace_close,
.ndo_tx_timeout = ace_watchdog,
.ndo_get_stats = ace_get_stats,
.ndo_set_multicast_list = ace_set_multicast_list,
.ndo_set_mac_address = ace_set_mac_addr,
.ndo_change_mtu = ace_change_mtu,
.ndo_vlan_rx_register = ace_vlan_rx_register,
};

static int __devinit acenic_probe_one(struct pci_dev *pdev,
const struct pci_device_id *id)
{
Expand All @@ -473,20 +484,13 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev,
dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
#if ACENIC_DO_VLAN
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
dev->vlan_rx_register = ace_vlan_rx_register;
#endif

dev->tx_timeout = &ace_watchdog;
dev->watchdog_timeo = 5*HZ;

dev->open = &ace_open;
dev->stop = &ace_close;
dev->netdev_ops = &ace_netdev_ops;
dev->hard_start_xmit = &ace_start_xmit;
dev->get_stats = &ace_get_stats;
dev->set_multicast_list = &ace_set_multicast_list;
SET_ETHTOOL_OPS(dev, &ace_ethtool_ops);
dev->set_mac_address = &ace_set_mac_addr;
dev->change_mtu = &ace_change_mtu;

/* we only display this string ONCE */
if (!boards_found)
Expand Down

0 comments on commit d8b83c5

Please sign in to comment.