xtsonic: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
dcd07be3ff
commit
ccd97bb01c
@ -108,6 +108,18 @@ static int xtsonic_close(struct net_device *dev)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct net_device_ops xtsonic_netdev_ops = {
|
||||||
|
.ndo_open = xtsonic_open,
|
||||||
|
.ndo_stop = xtsonic_close,
|
||||||
|
.ndo_start_xmit = sonic_send_packet,
|
||||||
|
.ndo_get_stats = sonic_get_stats,
|
||||||
|
.ndo_set_multicast_list = sonic_multicast_list,
|
||||||
|
.ndo_tx_timeout = sonic_tx_timeout,
|
||||||
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
|
.ndo_change_mtu = eth_change_mtu,
|
||||||
|
.ndo_set_mac_address = eth_mac_addr,
|
||||||
|
};
|
||||||
|
|
||||||
static int __init sonic_probe1(struct net_device *dev)
|
static int __init sonic_probe1(struct net_device *dev)
|
||||||
{
|
{
|
||||||
static unsigned version_printed = 0;
|
static unsigned version_printed = 0;
|
||||||
@ -205,12 +217,7 @@ static int __init sonic_probe1(struct net_device *dev)
|
|||||||
lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
|
lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
|
||||||
* SONIC_BUS_SCALE(lp->dma_bitmode));
|
* SONIC_BUS_SCALE(lp->dma_bitmode));
|
||||||
|
|
||||||
dev->open = xtsonic_open;
|
dev->netdev_ops = &xtsonic_netdev_ops;
|
||||||
dev->stop = xtsonic_close;
|
|
||||||
dev->hard_start_xmit = sonic_send_packet;
|
|
||||||
dev->get_stats = sonic_get_stats;
|
|
||||||
dev->set_multicast_list = &sonic_multicast_list;
|
|
||||||
dev->tx_timeout = sonic_tx_timeout;
|
|
||||||
dev->watchdog_timeo = TX_TIMEOUT;
|
dev->watchdog_timeo = TX_TIMEOUT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user