aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-09 00:46:53 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-11 05:06:43 -0400
commit8c02acd79867077508ffa5ed4eb6c8c79df73a96 (patch)
treeb58c6dbc9f5932a5ff65239d861de9f43c2e547f
parent499923c7a3254971873e55a1690d07d3700eea47 (diff)
fs_enet: convert to netdev_ops
Reported-by: Subrata Modak <subrata@linux.vnet.ibm.com> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index b037ce9857bf..a9cbc3191a2a 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -1019,6 +1019,22 @@ out_put_phy:
1019#define IS_FEC(match) 0 1019#define IS_FEC(match) 0
1020#endif 1020#endif
1021 1021
1022static const struct net_device_ops fs_enet_netdev_ops = {
1023 .ndo_open = fs_enet_open,
1024 .ndo_stop = fs_enet_close,
1025 .ndo_get_stats = fs_enet_get_stats,
1026 .ndo_start_xmit = fs_enet_start_xmit,
1027 .ndo_tx_timeout = fs_timeout,
1028 .ndo_set_multicast_list = fs_set_multicast_list,
1029 .ndo_do_ioctl = fs_ioctl,
1030 .ndo_validate_addr = eth_validate_addr,
1031 .ndo_set_mac_address = eth_mac_addr,
1032 .ndo_change_mtu = eth_change_mtu,
1033#ifdef CONFIG_NET_POLL_CONTROLLER
1034 .ndo_poll_controller = fs_enet_netpoll,
1035#endif
1036};
1037
1022static int __devinit fs_enet_probe(struct of_device *ofdev, 1038static int __devinit fs_enet_probe(struct of_device *ofdev,
1023 const struct of_device_id *match) 1039 const struct of_device_id *match)
1024{ 1040{
@@ -1093,22 +1109,13 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
1093 fep->tx_ring = fpi->tx_ring; 1109 fep->tx_ring = fpi->tx_ring;
1094 fep->rx_ring = fpi->rx_ring; 1110 fep->rx_ring = fpi->rx_ring;
1095 1111
1096 ndev->open = fs_enet_open; 1112 ndev->netdev_ops = &fs_enet_netdev_ops;
1097 ndev->hard_start_xmit = fs_enet_start_xmit;
1098 ndev->tx_timeout = fs_timeout;
1099 ndev->watchdog_timeo = 2 * HZ; 1113 ndev->watchdog_timeo = 2 * HZ;
1100 ndev->stop = fs_enet_close;
1101 ndev->get_stats = fs_enet_get_stats;
1102 ndev->set_multicast_list = fs_set_multicast_list;
1103#ifdef CONFIG_NET_POLL_CONTROLLER
1104 ndev->poll_controller = fs_enet_netpoll;
1105#endif
1106 if (fpi->use_napi) 1114 if (fpi->use_napi)
1107 netif_napi_add(ndev, &fep->napi, fs_enet_rx_napi, 1115 netif_napi_add(ndev, &fep->napi, fs_enet_rx_napi,
1108 fpi->napi_weight); 1116 fpi->napi_weight);
1109 1117
1110 ndev->ethtool_ops = &fs_ethtool_ops; 1118 ndev->ethtool_ops = &fs_ethtool_ops;
1111 ndev->do_ioctl = fs_ioctl;
1112 1119
1113 init_timer(&fep->phy_timer_list); 1120 init_timer(&fep->phy_timer_list);
1114 1121