diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-01-09 08:01:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:02:30 -0500 |
commit | f1608f859a3fba95a3b0ae70f2528b81c6928d77 (patch) | |
tree | 4cb19e2f821c5c868c21b1e63ba208b21fd6c62a /drivers/net/tokenring/tms380tr.c | |
parent | efda072393fb4213e43d92bdd20cf180a06a8eb0 (diff) |
tms380tr: convert to net_device_ops
Conver this related group of drivers to new API
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tokenring/tms380tr.c')
-rw-r--r-- | drivers/net/tokenring/tms380tr.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index 5be34c2fd483..b11bb72dc7ab 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c | |||
@@ -2330,6 +2330,17 @@ void tmsdev_term(struct net_device *dev) | |||
2330 | DMA_BIDIRECTIONAL); | 2330 | DMA_BIDIRECTIONAL); |
2331 | } | 2331 | } |
2332 | 2332 | ||
2333 | const struct net_device_ops tms380tr_netdev_ops = { | ||
2334 | .ndo_open = tms380tr_open, | ||
2335 | .ndo_stop = tms380tr_close, | ||
2336 | .ndo_start_xmit = tms380tr_send_packet, | ||
2337 | .ndo_tx_timeout = tms380tr_timeout, | ||
2338 | .ndo_get_stats = tms380tr_get_stats, | ||
2339 | .ndo_set_multicast_list = tms380tr_set_multicast_list, | ||
2340 | .ndo_set_mac_address = tms380tr_set_mac_address, | ||
2341 | }; | ||
2342 | EXPORT_SYMBOL(tms380tr_netdev_ops); | ||
2343 | |||
2333 | int tmsdev_init(struct net_device *dev, struct device *pdev) | 2344 | int tmsdev_init(struct net_device *dev, struct device *pdev) |
2334 | { | 2345 | { |
2335 | struct net_local *tms_local; | 2346 | struct net_local *tms_local; |
@@ -2353,16 +2364,8 @@ int tmsdev_init(struct net_device *dev, struct device *pdev) | |||
2353 | return -ENOMEM; | 2364 | return -ENOMEM; |
2354 | } | 2365 | } |
2355 | 2366 | ||
2356 | /* These can be overridden by the card driver if needed */ | 2367 | dev->netdev_ops = &tms380tr_netdev_ops; |
2357 | dev->open = tms380tr_open; | ||
2358 | dev->stop = tms380tr_close; | ||
2359 | dev->do_ioctl = NULL; | ||
2360 | dev->hard_start_xmit = tms380tr_send_packet; | ||
2361 | dev->tx_timeout = tms380tr_timeout; | ||
2362 | dev->watchdog_timeo = HZ; | 2368 | dev->watchdog_timeo = HZ; |
2363 | dev->get_stats = tms380tr_get_stats; | ||
2364 | dev->set_multicast_list = &tms380tr_set_multicast_list; | ||
2365 | dev->set_mac_address = tms380tr_set_mac_address; | ||
2366 | 2369 | ||
2367 | return 0; | 2370 | return 0; |
2368 | } | 2371 | } |