aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 01:19:33 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 01:42:51 -0500
commit39a11bd9102cf8601f02d595dc022b715103afde (patch)
tree68f2c72e421157e6055af28ebd12971481640882 /drivers/net
parent0e7614bc3df034e2f92e0d424cc6f81dcdb7af65 (diff)
via-velocity: convert to net_device_ops
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/via-velocity.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index dcbc152306e2..033e63a68436 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -849,6 +849,19 @@ static int velocity_soft_reset(struct velocity_info *vptr)
849 return 0; 849 return 0;
850} 850}
851 851
852static const struct net_device_ops velocity_netdev_ops = {
853 .ndo_open = velocity_open,
854 .ndo_stop = velocity_close,
855 .ndo_get_stats = velocity_get_stats,
856 .ndo_validate_addr = eth_validate_addr,
857 .ndo_set_multicast_list = velocity_set_multi,
858 .ndo_change_mtu = velocity_change_mtu,
859 .ndo_do_ioctl = velocity_ioctl,
860 .ndo_vlan_rx_add_vid = velocity_vlan_rx_add_vid,
861 .ndo_vlan_rx_kill_vid = velocity_vlan_rx_kill_vid,
862 .ndo_vlan_rx_register = velocity_vlan_rx_register,
863};
864
852/** 865/**
853 * velocity_found1 - set up discovered velocity card 866 * velocity_found1 - set up discovered velocity card
854 * @pdev: PCI device 867 * @pdev: PCI device
@@ -958,18 +971,9 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
958 vptr->phy_id = MII_GET_PHY_ID(vptr->mac_regs); 971 vptr->phy_id = MII_GET_PHY_ID(vptr->mac_regs);
959 972
960 dev->irq = pdev->irq; 973 dev->irq = pdev->irq;
961 dev->open = velocity_open;
962 dev->hard_start_xmit = velocity_xmit; 974 dev->hard_start_xmit = velocity_xmit;
963 dev->stop = velocity_close; 975 dev->netdev_ops = &velocity_netdev_ops;
964 dev->get_stats = velocity_get_stats;
965 dev->set_multicast_list = velocity_set_multi;
966 dev->do_ioctl = velocity_ioctl;
967 dev->ethtool_ops = &velocity_ethtool_ops; 976 dev->ethtool_ops = &velocity_ethtool_ops;
968 dev->change_mtu = velocity_change_mtu;
969
970 dev->vlan_rx_add_vid = velocity_vlan_rx_add_vid;
971 dev->vlan_rx_kill_vid = velocity_vlan_rx_kill_vid;
972 dev->vlan_rx_register = velocity_vlan_rx_register;
973 977
974#ifdef VELOCITY_ZERO_COPY_SUPPORT 978#ifdef VELOCITY_ZERO_COPY_SUPPORT
975 dev->features |= NETIF_F_SG; 979 dev->features |= NETIF_F_SG;