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

netdev: convert at1700 to net_device_ops

Remove unneeded memset (alloc_etherdev does it already).
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8afb1ceb
...@@ -249,6 +249,17 @@ struct net_device * __init at1700_probe(int unit) ...@@ -249,6 +249,17 @@ struct net_device * __init at1700_probe(int unit)
return ERR_PTR(err); return ERR_PTR(err);
} }
static const struct net_device_ops at1700_netdev_ops = {
.ndo_open = net_open,
.ndo_stop = net_close,
.ndo_start_xmit = net_send_packet,
.ndo_set_multicast_list = set_rx_mode,
.ndo_tx_timeout = net_tx_timeout,
.ndo_change_mtu = eth_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
/* The Fujitsu datasheet suggests that the NIC be probed for by checking its /* The Fujitsu datasheet suggests that the NIC be probed for by checking its
"signature", the default bit pattern after a reset. This *doesn't* work -- "signature", the default bit pattern after a reset. This *doesn't* work --
there is no way to reset the bus interface without a complete power-cycle! there is no way to reset the bus interface without a complete power-cycle!
...@@ -448,13 +459,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) ...@@ -448,13 +459,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr)
if (net_debug) if (net_debug)
printk(version); printk(version);
memset(lp, 0, sizeof(struct net_local)); dev->netdev_ops = &at1700_netdev_ops;
dev->open = net_open;
dev->stop = net_close;
dev->hard_start_xmit = net_send_packet;
dev->set_multicast_list = &set_rx_mode;
dev->tx_timeout = net_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
spin_lock_init(&lp->lock); spin_lock_init(&lp->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册