aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasakazu Mokuno <mokuno@sm.sony.co.jp>2009-01-15 17:47:29 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:34:51 -0500
commit5384e8361a9bb7fca054b47c1dde7ac0e929407f (patch)
treed9a31f66b143c8fb4c546237cedfd5545e23e0ff
parent3d16543d3235fefca351c10b30c1cca6536f2569 (diff)
PS3: gelic: convert the ethernet part to net_device_ops
Convert the gelic driver to net_device_ops Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ps3_gelic_net.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index 4b564eda5bd9..06649d0c2098 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -1403,6 +1403,19 @@ void gelic_net_tx_timeout(struct net_device *netdev)
1403 atomic_dec(&card->tx_timeout_task_counter); 1403 atomic_dec(&card->tx_timeout_task_counter);
1404} 1404}
1405 1405
1406static const struct net_device_ops gelic_netdevice_ops = {
1407 .ndo_open = gelic_net_open,
1408 .ndo_stop = gelic_net_stop,
1409 .ndo_start_xmit = gelic_net_xmit,
1410 .ndo_set_multicast_list = gelic_net_set_multi,
1411 .ndo_change_mtu = gelic_net_change_mtu,
1412 .ndo_tx_timeout = gelic_net_tx_timeout,
1413 .ndo_validate_addr = eth_validate_addr,
1414#ifdef CONFIG_NET_POLL_CONTROLLER
1415 .ndo_poll_controller = gelic_net_poll_controller,
1416#endif
1417};
1418
1406/** 1419/**
1407 * gelic_ether_setup_netdev_ops - initialization of net_device operations 1420 * gelic_ether_setup_netdev_ops - initialization of net_device operations
1408 * @netdev: net_device structure 1421 * @netdev: net_device structure
@@ -1412,21 +1425,12 @@ void gelic_net_tx_timeout(struct net_device *netdev)
1412static void gelic_ether_setup_netdev_ops(struct net_device *netdev, 1425static void gelic_ether_setup_netdev_ops(struct net_device *netdev,
1413 struct napi_struct *napi) 1426 struct napi_struct *napi)
1414{ 1427{
1415 netdev->open = &gelic_net_open;
1416 netdev->stop = &gelic_net_stop;
1417 netdev->hard_start_xmit = &gelic_net_xmit;
1418 netdev->set_multicast_list = &gelic_net_set_multi;
1419 netdev->change_mtu = &gelic_net_change_mtu;
1420 /* tx watchdog */
1421 netdev->tx_timeout = &gelic_net_tx_timeout;
1422 netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT; 1428 netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT;
1423 /* NAPI */ 1429 /* NAPI */
1424 netif_napi_add(netdev, napi, 1430 netif_napi_add(netdev, napi,
1425 gelic_net_poll, GELIC_NET_NAPI_WEIGHT); 1431 gelic_net_poll, GELIC_NET_NAPI_WEIGHT);
1426 netdev->ethtool_ops = &gelic_ether_ethtool_ops; 1432 netdev->ethtool_ops = &gelic_ether_ethtool_ops;
1427#ifdef CONFIG_NET_POLL_CONTROLLER 1433 netdev->netdev_ops = &gelic_netdevice_ops;
1428 netdev->poll_controller = gelic_net_poll_controller;
1429#endif
1430} 1434}
1431 1435
1432/** 1436/**