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

appltetalk: convert cops device to net_device ops

Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8bbce3f6
......@@ -258,6 +258,15 @@ struct net_device * __init cops_probe(int unit)
return ERR_PTR(err);
}
static const struct net_device_ops cops_netdev_ops = {
.ndo_open = cops_open,
.ndo_stop = cops_close,
.ndo_start_xmit = cops_send_packet,
.ndo_tx_timeout = cops_timeout,
.ndo_do_ioctl = cops_ioctl,
.ndo_set_multicast_list = set_multicast_list,
};
/*
* This is the real probe routine. Linux has a history of friendly device
* probes on the ISA bus. A good device probes avoids doing writes, and
......@@ -331,15 +340,9 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr)
/* Copy local board variable to lp struct. */
lp->board = board;
dev->hard_start_xmit = cops_send_packet;
dev->tx_timeout = cops_timeout;
dev->netdev_ops = &cops_netdev_ops;
dev->watchdog_timeo = HZ * 2;
dev->open = cops_open;
dev->stop = cops_close;
dev->do_ioctl = cops_ioctl;
dev->set_multicast_list = set_multicast_list;
dev->mc_list = NULL;
/* Tell the user where the card is and what mode we're in. */
if(board==DAYNA)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册