aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.c
diff options
context:
space:
mode:
authorYang Hongyang <yanghy@cn.fujitsu.com>2009-03-21 19:52:17 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-21 19:52:17 -0400
commit6e06cb626229567629e1dc6eed9399bec549f3cf (patch)
tree519178375c8a30e74c550e3089153e96a11572a9 /drivers/net/spider_net.c
parent62f0c338d126fee75dc04bd23be30281a0e1e62f (diff)
spider_net: Convert to net_device_ops.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r--drivers/net/spider_net.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 7f6b4a4052ee..136d9f1c6ad0 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -2259,6 +2259,22 @@ spider_net_tx_timeout(struct net_device *netdev)
2259 card->spider_stats.tx_timeouts++; 2259 card->spider_stats.tx_timeouts++;
2260} 2260}
2261 2261
2262static const struct net_device_ops spider_net_ops = {
2263 .ndo_open = spider_net_open;
2264 .ndo_stop = spider_net_stop;
2265 .ndo_start_xmit = spider_net_xmit;
2266 .ndo_set_multicast_list = spider_net_set_multi;
2267 .ndo_set_mac_address = spider_net_set_mac;
2268 .ndo_change_mtu = spider_net_change_mtu;
2269 .ndo_do_ioctl = spider_net_do_ioctl;
2270 .ndo_tx_timeout = spider_net_tx_timeout;
2271 /* HW VLAN */
2272#ifdef CONFIG_NET_POLL_CONTROLLER
2273 /* poll controller */
2274 .ndo_poll_controller = spider_net_poll_controller;
2275#endif /* CONFIG_NET_POLL_CONTROLLER */
2276};
2277
2262/** 2278/**
2263 * spider_net_setup_netdev_ops - initialization of net_device operations 2279 * spider_net_setup_netdev_ops - initialization of net_device operations
2264 * @netdev: net_device structure 2280 * @netdev: net_device structure
@@ -2268,21 +2284,8 @@ spider_net_tx_timeout(struct net_device *netdev)
2268static void 2284static void
2269spider_net_setup_netdev_ops(struct net_device *netdev) 2285spider_net_setup_netdev_ops(struct net_device *netdev)
2270{ 2286{
2271 netdev->open = &spider_net_open; 2287 netdev->netdev_ops = &spider_net_ops;
2272 netdev->stop = &spider_net_stop;
2273 netdev->hard_start_xmit = &spider_net_xmit;
2274 netdev->set_multicast_list = &spider_net_set_multi;
2275 netdev->set_mac_address = &spider_net_set_mac;
2276 netdev->change_mtu = &spider_net_change_mtu;
2277 netdev->do_ioctl = &spider_net_do_ioctl;
2278 /* tx watchdog */
2279 netdev->tx_timeout = &spider_net_tx_timeout;
2280 netdev->watchdog_timeo = SPIDER_NET_WATCHDOG_TIMEOUT; 2288 netdev->watchdog_timeo = SPIDER_NET_WATCHDOG_TIMEOUT;
2281 /* HW VLAN */
2282#ifdef CONFIG_NET_POLL_CONTROLLER
2283 /* poll controller */
2284 netdev->poll_controller = &spider_net_poll_controller;
2285#endif /* CONFIG_NET_POLL_CONTROLLER */
2286 /* ethtool ops */ 2289 /* ethtool ops */
2287 netdev->ethtool_ops = &spider_net_ethtool_ops; 2290 netdev->ethtool_ops = &spider_net_ethtool_ops;
2288} 2291}