aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-15 08:52:37 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 05:20:08 -0400
commitd88106b70178a87203a23108c47eaa1f20c424b5 (patch)
tree63f07dcdef2345e7492e7604c457d7b51a7d25af /drivers/net
parent63ef7d89cbecc249339a59c7a1ec58d2e8e88ea5 (diff)
dm9000: 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')
-rw-r--r--drivers/net/dm9000.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index d8350860c0f8..e402e91bf188 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -1170,6 +1170,21 @@ dm9000_stop(struct net_device *ndev)
1170 return 0; 1170 return 0;
1171} 1171}
1172 1172
1173static const struct net_device_ops dm9000_netdev_ops = {
1174 .ndo_open = dm9000_open,
1175 .ndo_stop = dm9000_stop,
1176 .ndo_start_xmit = dm9000_start_xmit,
1177 .ndo_tx_timeout = dm9000_timeout,
1178 .ndo_set_multicast_list = dm9000_hash_table,
1179 .ndo_do_ioctl = dm9000_ioctl,
1180 .ndo_change_mtu = eth_change_mtu,
1181 .ndo_validate_addr = eth_validate_addr,
1182 .ndo_set_mac_address = eth_mac_addr,
1183#ifdef CONFIG_NET_POLL_CONTROLLER
1184 .ndo_poll_controller = dm9000_poll_controller,
1185#endif
1186};
1187
1173#define res_size(_r) (((_r)->end - (_r)->start) + 1) 1188#define res_size(_r) (((_r)->end - (_r)->start) + 1)
1174 1189
1175/* 1190/*
@@ -1339,18 +1354,9 @@ dm9000_probe(struct platform_device *pdev)
1339 /* driver system function */ 1354 /* driver system function */
1340 ether_setup(ndev); 1355 ether_setup(ndev);
1341 1356
1342 ndev->open = &dm9000_open; 1357 ndev->netdev_ops = &dm9000_netdev_ops;
1343 ndev->hard_start_xmit = &dm9000_start_xmit; 1358 ndev->watchdog_timeo = msecs_to_jiffies(watchdog);
1344 ndev->tx_timeout = &dm9000_timeout; 1359 ndev->ethtool_ops = &dm9000_ethtool_ops;
1345 ndev->watchdog_timeo = msecs_to_jiffies(watchdog);
1346 ndev->stop = &dm9000_stop;
1347 ndev->set_multicast_list = &dm9000_hash_table;
1348 ndev->ethtool_ops = &dm9000_ethtool_ops;
1349 ndev->do_ioctl = &dm9000_ioctl;
1350
1351#ifdef CONFIG_NET_POLL_CONTROLLER
1352 ndev->poll_controller = &dm9000_poll_controller;
1353#endif
1354 1360
1355 db->msg_enable = NETIF_MSG_LINK; 1361 db->msg_enable = NETIF_MSG_LINK;
1356 db->mii.phy_id_mask = 0x1f; 1362 db->mii.phy_id_mask = 0x1f;