From: Stephen Hemminger Date: Thu, 20 Nov 2008 05:47:07 +0000 (-0800) Subject: ifb: convert to net_device_ops X-Git-Tag: v2.6.29-rc1~581^2~673 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8dfcdf342d9e8294a3292005f9158022289dfd67;p=linux-2.6-omap-h63xx.git ifb: convert to net_device_ops Convert to new network device ops interface. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index e4fbefc8c82..363a166df8f 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c @@ -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);