aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xtsonic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/xtsonic.c')
-rw-r--r--drivers/net/xtsonic.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/xtsonic.c b/drivers/net/xtsonic.c
index a12a7211c982..5a4ad156f63e 100644
--- a/drivers/net/xtsonic.c
+++ b/drivers/net/xtsonic.c
@@ -108,6 +108,18 @@ static int xtsonic_close(struct net_device *dev)
108 return err; 108 return err;
109} 109}
110 110
111static const struct net_device_ops xtsonic_netdev_ops = {
112 .ndo_open = xtsonic_open,
113 .ndo_stop = xtsonic_close,
114 .ndo_start_xmit = sonic_send_packet,
115 .ndo_get_stats = sonic_get_stats,
116 .ndo_set_multicast_list = sonic_multicast_list,
117 .ndo_tx_timeout = sonic_tx_timeout,
118 .ndo_validate_addr = eth_validate_addr,
119 .ndo_change_mtu = eth_change_mtu,
120 .ndo_set_mac_address = eth_mac_addr,
121};
122
111static int __init sonic_probe1(struct net_device *dev) 123static int __init sonic_probe1(struct net_device *dev)
112{ 124{
113 static unsigned version_printed = 0; 125 static unsigned version_printed = 0;
@@ -205,12 +217,7 @@ static int __init sonic_probe1(struct net_device *dev)
205 lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS 217 lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
206 * SONIC_BUS_SCALE(lp->dma_bitmode)); 218 * SONIC_BUS_SCALE(lp->dma_bitmode));
207 219
208 dev->open = xtsonic_open; 220 dev->netdev_ops = &xtsonic_netdev_ops;
209 dev->stop = xtsonic_close;
210 dev->hard_start_xmit = sonic_send_packet;
211 dev->get_stats = sonic_get_stats;
212 dev->set_multicast_list = &sonic_multicast_list;
213 dev->tx_timeout = sonic_tx_timeout;
214 dev->watchdog_timeo = TX_TIMEOUT; 221 dev->watchdog_timeo = TX_TIMEOUT;
215 222
216 /* 223 /*