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>
This commit is contained in:
committed by
David S. Miller
parent
efda072393
commit
f1608f859a
@ -2330,6 +2330,17 @@ void tmsdev_term(struct net_device *dev)
|
||||
DMA_BIDIRECTIONAL);
|
||||
}
|
||||
|
||||
const struct net_device_ops tms380tr_netdev_ops = {
|
||||
.ndo_open = tms380tr_open,
|
||||
.ndo_stop = tms380tr_close,
|
||||
.ndo_start_xmit = tms380tr_send_packet,
|
||||
.ndo_tx_timeout = tms380tr_timeout,
|
||||
.ndo_get_stats = tms380tr_get_stats,
|
||||
.ndo_set_multicast_list = tms380tr_set_multicast_list,
|
||||
.ndo_set_mac_address = tms380tr_set_mac_address,
|
||||
};
|
||||
EXPORT_SYMBOL(tms380tr_netdev_ops);
|
||||
|
||||
int tmsdev_init(struct net_device *dev, struct device *pdev)
|
||||
{
|
||||
struct net_local *tms_local;
|
||||
@ -2353,16 +2364,8 @@ int tmsdev_init(struct net_device *dev, struct device *pdev)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* These can be overridden by the card driver if needed */
|
||||
dev->open = tms380tr_open;
|
||||
dev->stop = tms380tr_close;
|
||||
dev->do_ioctl = NULL;
|
||||
dev->hard_start_xmit = tms380tr_send_packet;
|
||||
dev->tx_timeout = tms380tr_timeout;
|
||||
dev->netdev_ops = &tms380tr_netdev_ops;
|
||||
dev->watchdog_timeo = HZ;
|
||||
dev->get_stats = tms380tr_get_stats;
|
||||
dev->set_multicast_list = &tms380tr_set_multicast_list;
|
||||
dev->set_mac_address = tms380tr_set_mac_address;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user