via-velocity: convert to net_device_ops
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 20 Nov 2008 06:19:33 +0000 (22:19 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Nov 2008 06:42:51 +0000 (22:42 -0800)
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>
drivers/net/via-velocity.c

index dcbc152306e25404085228b7f99d990edb541203..033e63a68436455f3e0c213567488ddfa28983de 100644 (file)
@@ -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;