提交 8dfcdf34 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

ifb: convert to net_device_ops

Convert to new network device ops interface.
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c02373bf
...@@ -137,18 +137,23 @@ static void ri_tasklet(unsigned long dev) ...@@ -137,18 +137,23 @@ static void ri_tasklet(unsigned long dev)
} }
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) static void ifb_setup(struct net_device *dev)
{ {
/* Initialize the device structure. */ /* Initialize the device structure. */
dev->hard_start_xmit = ifb_xmit; dev->hard_start_xmit = ifb_xmit;
dev->open = &ifb_open;
dev->stop = &ifb_close;
dev->destructor = free_netdev; dev->destructor = free_netdev;
dev->netdev_ops = &ifb_netdev_ops;
/* Fill in device structure with ethernet-generic values. */ /* Fill in device structure with ethernet-generic values. */
ether_setup(dev); ether_setup(dev);
dev->tx_queue_len = TX_Q_LIMIT; dev->tx_queue_len = TX_Q_LIMIT;
dev->change_mtu = NULL;
dev->flags |= IFF_NOARP; dev->flags |= IFF_NOARP;
dev->flags &= ~IFF_MULTICAST; dev->flags &= ~IFF_MULTICAST;
random_ether_addr(dev->dev_addr); random_ether_addr(dev->dev_addr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册