diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-11 03:45:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-13 18:16:33 -0400 |
commit | a95c2a3b9d6615ef6fad69fbb787a208ad6506b3 (patch) | |
tree | 1cdceee2f53e9a7ce497815b3e5fe60147ef5a06 | |
parent | 2b1425421212e38c7dade357abaf8804fe236ade (diff) |
eth_v10: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/cris/eth_v10.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index c9806c58b2fd..7a18dc7e5c7f 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
@@ -257,6 +257,23 @@ struct transceiver_ops transceivers[] = | |||
257 | 257 | ||
258 | struct transceiver_ops* transceiver = &transceivers[0]; | 258 | struct transceiver_ops* transceiver = &transceivers[0]; |
259 | 259 | ||
260 | static const struct net_device_ops e100_netdev_ops = { | ||
261 | .ndo_open = e100_open, | ||
262 | .ndo_stop = e100_close, | ||
263 | .ndo_start_xmit = e100_send_packet, | ||
264 | .ndo_tx_timeout = e100_tx_timeout, | ||
265 | .ndo_get_stats = e100_get_stats, | ||
266 | .ndo_set_multicast_list = set_multicast_list, | ||
267 | .ndo_do_ioctl = e100_ioctl, | ||
268 | .ndo_set_mac_address = e100_set_mac_address, | ||
269 | .ndo_validate_addr = eth_validate_addr, | ||
270 | .ndo_change_mtu = eth_change_mtu, | ||
271 | .ndo_set_config = e100_set_config, | ||
272 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
273 | .ndo_poll_controller = e100_netpoll, | ||
274 | #endif | ||
275 | }; | ||
276 | |||
260 | #define tx_done(dev) (*R_DMA_CH0_CMD == 0) | 277 | #define tx_done(dev) (*R_DMA_CH0_CMD == 0) |
261 | 278 | ||
262 | /* | 279 | /* |
@@ -300,19 +317,8 @@ etrax_ethernet_init(void) | |||
300 | 317 | ||
301 | /* fill in our handlers so the network layer can talk to us in the future */ | 318 | /* fill in our handlers so the network layer can talk to us in the future */ |
302 | 319 | ||
303 | dev->open = e100_open; | ||
304 | dev->hard_start_xmit = e100_send_packet; | ||
305 | dev->stop = e100_close; | ||
306 | dev->get_stats = e100_get_stats; | ||
307 | dev->set_multicast_list = set_multicast_list; | ||
308 | dev->set_mac_address = e100_set_mac_address; | ||
309 | dev->ethtool_ops = &e100_ethtool_ops; | 320 | dev->ethtool_ops = &e100_ethtool_ops; |
310 | dev->do_ioctl = e100_ioctl; | 321 | dev->netdev_ops = &e100_netdev_ops; |
311 | dev->set_config = e100_set_config; | ||
312 | dev->tx_timeout = e100_tx_timeout; | ||
313 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
314 | dev->poll_controller = e100_netpoll; | ||
315 | #endif | ||
316 | 322 | ||
317 | spin_lock_init(&np->lock); | 323 | spin_lock_init(&np->lock); |
318 | spin_lock_init(&np->led_lock); | 324 | spin_lock_init(&np->led_lock); |