diff mbox

[05/33] ifb: convert to net_device_ops

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

Commit Message

stephen hemminger Nov. 17, 2008, 11:42 p.m. UTC
Convert to new network device ops interface.

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

Comments

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

> Convert to new network device ops interface.
> 
> 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/ifb.c	2008-11-02 09:43:24.000000000 -0800
+++ b/drivers/net/ifb.c	2008-11-02 10:06:17.000000000 -0800
@@ -137,18 +137,23 @@  resched:
 
 }
 
+static const struct net_device_ops ifb_netdev_ops = {
+	.validate_addr = eth_validate_addr,
+	.open	= ifb_open,
+	.stop	= ifb_close,
+};
+
 static void ifb_setup(struct net_device *dev)
 {
 	/* Initialize the device structure. */
 	dev->hard_start_xmit = ifb_xmit;
-	dev->open = &ifb_open;
-	dev->stop = &ifb_close;
 	dev->destructor = free_netdev;
+	dev->netdev_ops = &ifb_netdev_ops;
 
 	/* Fill in device structure with ethernet-generic values. */
 	ether_setup(dev);
 	dev->tx_queue_len = TX_Q_LIMIT;
-	dev->change_mtu = NULL;
+
 	dev->flags |= IFF_NOARP;
 	dev->flags &= ~IFF_MULTICAST;
 	random_ether_addr(dev->dev_addr);