aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-15 08:52:45 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 05:20:14 -0400
commit502a326f833927a84a8de29f5fb638aa9da15f4b (patch)
tree56c5890850db6411472a303f8d4835139b3d433b /drivers
parente7090e347ad8bce0de35f9fe2b95e22e4ae8fbab (diff)
jazzsonic: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/jazzsonic.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index 14248cfc3dfd..d12106b47bf2 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -96,6 +96,18 @@ static int jazzsonic_close(struct net_device* dev)
96 return err; 96 return err;
97} 97}
98 98
99static const struct net_device_ops sonic_netdev_ops = {
100 .ndo_open = jazzsonic_open,
101 .ndo_stop = jazzsonic_close,
102 .ndo_start_xmit = sonic_send_packet,
103 .ndo_get_stats = sonic_get_stats,
104 .ndo_set_multicast_list = sonic_multicast_list,
105 .ndo_tx_timeout = sonic_tx_timeout,
106 .ndo_change_mtu = eth_change_mtu,
107 .ndo_validate_addr = eth_validate_addr,
108 .ndo_set_mac_address = eth_mac_addr,
109};
110
99static int __init sonic_probe1(struct net_device *dev) 111static int __init sonic_probe1(struct net_device *dev)
100{ 112{
101 static unsigned version_printed; 113 static unsigned version_printed;
@@ -179,12 +191,7 @@ static int __init sonic_probe1(struct net_device *dev)
179 lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS 191 lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
180 * SONIC_BUS_SCALE(lp->dma_bitmode)); 192 * SONIC_BUS_SCALE(lp->dma_bitmode));
181 193
182 dev->open = jazzsonic_open; 194 dev->netdev_ops = &sonic_netdev_ops;
183 dev->stop = jazzsonic_close;
184 dev->hard_start_xmit = sonic_send_packet;
185 dev->get_stats = sonic_get_stats;
186 dev->set_multicast_list = &sonic_multicast_list;
187 dev->tx_timeout = sonic_tx_timeout;
188 dev->watchdog_timeo = TX_TIMEOUT; 195 dev->watchdog_timeo = TX_TIMEOUT;
189 196
190 /* 197 /*