aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-15 08:52:55 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 05:20:23 -0400
commit1ec847f6d46f041bb2ae65efc7b00d122b03d212 (patch)
treecec7b7888fc91df39c357416c8397ec17998cce0 /drivers/net
parent9e0ac841f42df4e7acdab7dc1620de0933ed56d7 (diff)
pci-skeleton: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/pci-skeleton.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
index c95fd72c3bb9..8c1f6988f398 100644
--- a/drivers/net/pci-skeleton.c
+++ b/drivers/net/pci-skeleton.c
@@ -728,6 +728,17 @@ err_out:
728 return rc; 728 return rc;
729} 729}
730 730
731static const struct net_device_ops netdrv_netdev_ops = {
732 .ndo_open = netdrv_open,
733 .ndo_stop = netdrv_close,
734 .ndo_start_xmit = netdrv_start_xmit,
735 .ndo_set_multicast_list = netdrv_set_rx_mode,
736 .ndo_do_ioctl = netdrv_ioctl,
737 .ndo_tx_timeout = netdrv_tx_timeout,
738 .ndo_change_mtu = eth_change_mtu,
739 .ndo_validate_addr = eth_validate_addr,
740 .ndo_set_mac_address = eth_mac_addr,
741};
731 742
732static int __devinit netdrv_init_one (struct pci_dev *pdev, 743static int __devinit netdrv_init_one (struct pci_dev *pdev,
733 const struct pci_device_id *ent) 744 const struct pci_device_id *ent)
@@ -769,13 +780,7 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev,
769 ((u16 *) (dev->dev_addr))[i] = 780 ((u16 *) (dev->dev_addr))[i] =
770 le16_to_cpu (read_eeprom (ioaddr, i + 7, addr_len)); 781 le16_to_cpu (read_eeprom (ioaddr, i + 7, addr_len));
771 782
772 /* The Rtl8139-specific entries in the device structure. */ 783 dev->netdev_ops = &netdrv_netdev_ops;
773 dev->open = netdrv_open;
774 dev->hard_start_xmit = netdrv_start_xmit;
775 dev->stop = netdrv_close;
776 dev->set_multicast_list = netdrv_set_rx_mode;
777 dev->do_ioctl = netdrv_ioctl;
778 dev->tx_timeout = netdrv_tx_timeout;
779 dev->watchdog_timeo = TX_TIMEOUT; 784 dev->watchdog_timeo = TX_TIMEOUT;
780 785
781 dev->irq = pdev->irq; 786 dev->irq = pdev->irq;