diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 00:47:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 01:42:38 -0500 |
commit | 8dfcdf342d9e8294a3292005f9158022289dfd67 (patch) | |
tree | 058380afdc70b148b5f86c84d46ab23cc695f257 /drivers | |
parent | c02373bf2759dd210dc8c72c9c9b4a8f1c279cac (diff) |
ifb: convert to net_device_ops
Convert to new network device ops interface.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ifb.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index e4fbefc8c82f..363a166df8fb 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c | |||
@@ -137,18 +137,23 @@ resched: | |||
137 | 137 | ||
138 | } | 138 | } |
139 | 139 | ||
140 | static const struct net_device_ops ifb_netdev_ops = { | ||
141 | .ndo_validate_addr = eth_validate_addr, | ||
142 | .ndo_open = ifb_open, | ||
143 | .ndo_stop = ifb_close, | ||
144 | }; | ||
145 | |||
140 | static void ifb_setup(struct net_device *dev) | 146 | static void ifb_setup(struct net_device *dev) |
141 | { | 147 | { |
142 | /* Initialize the device structure. */ | 148 | /* Initialize the device structure. */ |
143 | dev->hard_start_xmit = ifb_xmit; | 149 | dev->hard_start_xmit = ifb_xmit; |
144 | dev->open = &ifb_open; | ||
145 | dev->stop = &ifb_close; | ||
146 | dev->destructor = free_netdev; | 150 | dev->destructor = free_netdev; |
151 | dev->netdev_ops = &ifb_netdev_ops; | ||
147 | 152 | ||
148 | /* Fill in device structure with ethernet-generic values. */ | 153 | /* Fill in device structure with ethernet-generic values. */ |
149 | ether_setup(dev); | 154 | ether_setup(dev); |
150 | dev->tx_queue_len = TX_Q_LIMIT; | 155 | dev->tx_queue_len = TX_Q_LIMIT; |
151 | dev->change_mtu = NULL; | 156 | |
152 | dev->flags |= IFF_NOARP; | 157 | dev->flags |= IFF_NOARP; |
153 | dev->flags &= ~IFF_MULTICAST; | 158 | dev->flags &= ~IFF_MULTICAST; |
154 | random_ether_addr(dev->dev_addr); | 159 | random_ether_addr(dev->dev_addr); |