aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macsonic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/macsonic.c')
-rw-r--r--drivers/net/macsonic.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
index 527166e35d56..acd143da161d 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -167,6 +167,18 @@ static int macsonic_close(struct net_device* dev)
167 return err; 167 return err;
168} 168}
169 169
170static const struct net_device_ops macsonic_netdev_ops = {
171 .ndo_open = macsonic_open,
172 .ndo_stop = macsonic_close,
173 .ndo_start_xmit = sonic_send_packet,
174 .ndo_set_multicast_list = sonic_multicast_list,
175 .ndo_tx_timeout = sonic_tx_timeout,
176 .ndo_get_stats = sonic_get_stats,
177 .ndo_validate_addr = eth_validate_addr,
178 .ndo_change_mtu = eth_change_mtu,
179 .ndo_set_mac_address = eth_mac_addr,
180};
181
170static int __init macsonic_init(struct net_device *dev) 182static int __init macsonic_init(struct net_device *dev)
171{ 183{
172 struct sonic_local* lp = netdev_priv(dev); 184 struct sonic_local* lp = netdev_priv(dev);
@@ -198,12 +210,7 @@ static int __init macsonic_init(struct net_device *dev)
198 lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS 210 lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
199 * SONIC_BUS_SCALE(lp->dma_bitmode)); 211 * SONIC_BUS_SCALE(lp->dma_bitmode));
200 212
201 dev->open = macsonic_open; 213 dev->netdev_ops = &macsonic_netdev_ops;
202 dev->stop = macsonic_close;
203 dev->hard_start_xmit = sonic_send_packet;
204 dev->get_stats = sonic_get_stats;
205 dev->set_multicast_list = &sonic_multicast_list;
206 dev->tx_timeout = sonic_tx_timeout;
207 dev->watchdog_timeo = TX_TIMEOUT; 214 dev->watchdog_timeo = TX_TIMEOUT;
208 215
209 /* 216 /*