ifb: convert to net_device_ops
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 20 Nov 2008 05:47:07 +0000 (21:47 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Nov 2008 06:42:38 +0000 (22:42 -0800)
Convert to new network device ops interface.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ifb.c

index e4fbefc8c82f80797c5808efcadba2219aafb3c7..363a166df8fb8239f83b82dfd05d651f8cf1b8f9 100644 (file)
@@ -137,18 +137,23 @@ resched:
 
 }
 
+static const struct net_device_ops ifb_netdev_ops = {
+       .ndo_validate_addr = eth_validate_addr,
+       .ndo_open       = ifb_open,
+       .ndo_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);