diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-15 08:52:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-16 05:20:24 -0400 |
commit | b4cf3421afce25655233cf66f6ec545baa8cb6ae (patch) | |
tree | 3db210c8af51357d75667807c02e58ebd86ad89d /drivers/net/sb1250-mac.c | |
parent | a33a2bb3c9f38c79e97f6ed720412d946e894e81 (diff) |
sb1250-mac: 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/net/sb1250-mac.c')
-rw-r--r-- | drivers/net/sb1250-mac.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index ce7551e17ba7..aaeebf57a9a4 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -2271,6 +2271,21 @@ static int sb1250_change_mtu(struct net_device *_dev, int new_mtu) | |||
2271 | return 0; | 2271 | return 0; |
2272 | } | 2272 | } |
2273 | 2273 | ||
2274 | static const struct net_device_ops sbmac_netdev_ops = { | ||
2275 | .ndo_open = sbmac_open, | ||
2276 | .ndo_stop = sbmac_close, | ||
2277 | .ndo_start_xmit = sbmac_start_tx, | ||
2278 | .ndo_set_multicast_list = sbmac_set_rx_mode, | ||
2279 | .ndo_tx_timeout = sbmac_tx_timeout, | ||
2280 | .ndo_do_ioctl = sbmac_mii_ioctl, | ||
2281 | .ndo_change_mtu = sb1250_change_mtu, | ||
2282 | .ndo_validate_addr = eth_validate_addr, | ||
2283 | .ndo_set_mac_address = eth_mac_addr, | ||
2284 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
2285 | .ndo_poll_controller = sbmac_netpoll, | ||
2286 | #endif | ||
2287 | }; | ||
2288 | |||
2274 | /********************************************************************** | 2289 | /********************************************************************** |
2275 | * SBMAC_INIT(dev) | 2290 | * SBMAC_INIT(dev) |
2276 | * | 2291 | * |
@@ -2327,21 +2342,11 @@ static int sbmac_init(struct platform_device *pldev, long long base) | |||
2327 | 2342 | ||
2328 | spin_lock_init(&(sc->sbm_lock)); | 2343 | spin_lock_init(&(sc->sbm_lock)); |
2329 | 2344 | ||
2330 | dev->open = sbmac_open; | 2345 | dev->netdev_ops = &sbmac_netdev_ops; |
2331 | dev->hard_start_xmit = sbmac_start_tx; | 2346 | dev->watchdog_timeo = TX_TIMEOUT; |
2332 | dev->stop = sbmac_close; | ||
2333 | dev->set_multicast_list = sbmac_set_rx_mode; | ||
2334 | dev->do_ioctl = sbmac_mii_ioctl; | ||
2335 | dev->tx_timeout = sbmac_tx_timeout; | ||
2336 | dev->watchdog_timeo = TX_TIMEOUT; | ||
2337 | 2347 | ||
2338 | netif_napi_add(dev, &sc->napi, sbmac_poll, 16); | 2348 | netif_napi_add(dev, &sc->napi, sbmac_poll, 16); |
2339 | 2349 | ||
2340 | dev->change_mtu = sb1250_change_mtu; | ||
2341 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
2342 | dev->poll_controller = sbmac_netpoll; | ||
2343 | #endif | ||
2344 | |||
2345 | dev->irq = UNIT_INT(idx); | 2350 | dev->irq = UNIT_INT(idx); |
2346 | 2351 | ||
2347 | /* This is needed for PASS2 for Rx H/W checksum feature */ | 2352 | /* This is needed for PASS2 for Rx H/W checksum feature */ |