From: Stephen Hemminger Date: Thu, 20 Nov 2008 06:19:33 +0000 (-0800) Subject: via-velocity: convert to net_device_ops X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=39a11bd9102cf8601f02d595dc022b715103afde;p=linux-beck.git via-velocity: convert to net_device_ops Convert this driver to network device ops. Compile tested only. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- 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) return 0; } +static const struct net_device_ops velocity_netdev_ops = { + .ndo_open = velocity_open, + .ndo_stop = velocity_close, + .ndo_get_stats = velocity_get_stats, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_multicast_list = velocity_set_multi, + .ndo_change_mtu = velocity_change_mtu, + .ndo_do_ioctl = velocity_ioctl, + .ndo_vlan_rx_add_vid = velocity_vlan_rx_add_vid, + .ndo_vlan_rx_kill_vid = velocity_vlan_rx_kill_vid, + .ndo_vlan_rx_register = velocity_vlan_rx_register, +}; + /** * velocity_found1 - set up discovered velocity card * @pdev: PCI device @@ -958,18 +971,9 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi vptr->phy_id = MII_GET_PHY_ID(vptr->mac_regs); dev->irq = pdev->irq; - dev->open = velocity_open; dev->hard_start_xmit = velocity_xmit; - dev->stop = velocity_close; - dev->get_stats = velocity_get_stats; - dev->set_multicast_list = velocity_set_multi; - dev->do_ioctl = velocity_ioctl; + dev->netdev_ops = &velocity_netdev_ops; dev->ethtool_ops = &velocity_ethtool_ops; - dev->change_mtu = velocity_change_mtu; - - dev->vlan_rx_add_vid = velocity_vlan_rx_add_vid; - dev->vlan_rx_kill_vid = velocity_vlan_rx_kill_vid; - dev->vlan_rx_register = velocity_vlan_rx_register; #ifdef VELOCITY_ZERO_COPY_SUPPORT dev->features |= NETIF_F_SG;