diff mbox

[24/33] via-velocity: convert to net_device_ops

Message ID 20081117234356.835021131@vyatta.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

stephen hemminger Nov. 17, 2008, 11:42 p.m. UTC
Convert this driver to network device ops. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Comments

David Miller Nov. 20, 2008, 6:19 a.m. UTC | #1
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Mon, 17 Nov 2008 15:42:31 -0800

> Convert this driver to network device ops. Compile tested only.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/net/via-velocity.c	2008-11-17 12:56:02.000000000 -0800
+++ b/drivers/net/via-velocity.c	2008-11-17 12:58:13.000000000 -0800
@@ -849,6 +849,19 @@  static int velocity_soft_reset(struct ve
 	return 0;
 }
 
+static const struct net_device_ops velocity_netdev_ops = {
+	.open = velocity_open,
+	.stop = velocity_close,
+	.get_stats = velocity_get_stats,
+	.validate_addr	= eth_validate_addr,
+	.set_multicast_list = velocity_set_multi,
+	.change_mtu = velocity_change_mtu,
+	.do_ioctl = velocity_ioctl,
+	.vlan_rx_add_vid = velocity_vlan_rx_add_vid,
+	.vlan_rx_kill_vid = velocity_vlan_rx_kill_vid,
+	.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(str
 	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;