aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netx-eth.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-15 08:52:53 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 05:20:22 -0400
commitcd732de21e3d4f0b905fdbee8abfbb8192144b3d (patch)
tree875b1ae41eb297838c9f309c7ddd1fc30a7eefb6 /drivers/net/netx-eth.c
parent96cd55ea0edac7f6d51d2391d5cc1b5c2e360e67 (diff)
netx-eth: 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/netx-eth.c')
-rw-r--r--drivers/net/netx-eth.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c
index 1861d5bbd96b..946366dcc992 100644
--- a/drivers/net/netx-eth.c
+++ b/drivers/net/netx-eth.c
@@ -301,6 +301,17 @@ netx_eth_phy_write(struct net_device *ndev, int phy_id, int reg, int value)
301 while (readl(NETX_MIIMU) & MIIMU_SNRDY); 301 while (readl(NETX_MIIMU) & MIIMU_SNRDY);
302} 302}
303 303
304static const struct net_device_ops netx_eth_netdev_ops = {
305 .ndo_open = netx_eth_open,
306 .ndo_stop = netx_eth_close,
307 .ndo_start_xmit = netx_eth_hard_start_xmit,
308 .ndo_tx_timeout = netx_eth_timeout,
309 .ndo_set_multicast_list = netx_eth_set_multicast_list,
310 .ndo_change_mtu = eth_change_mtu,
311 .ndo_validate_addr = eth_validate_addr,
312 .ndo_set_mac_address = eth_mac_addr,
313};
314
304static int netx_eth_enable(struct net_device *ndev) 315static int netx_eth_enable(struct net_device *ndev)
305{ 316{
306 struct netx_eth_priv *priv = netdev_priv(ndev); 317 struct netx_eth_priv *priv = netdev_priv(ndev);
@@ -309,12 +320,8 @@ static int netx_eth_enable(struct net_device *ndev)
309 320
310 ether_setup(ndev); 321 ether_setup(ndev);
311 322
312 ndev->open = netx_eth_open; 323 ndev->netdev_ops = &netx_eth_netdev_ops;
313 ndev->stop = netx_eth_close;
314 ndev->hard_start_xmit = netx_eth_hard_start_xmit;
315 ndev->tx_timeout = netx_eth_timeout;
316 ndev->watchdog_timeo = msecs_to_jiffies(5000); 324 ndev->watchdog_timeo = msecs_to_jiffies(5000);
317 ndev->set_multicast_list = netx_eth_set_multicast_list;
318 325
319 priv->msg_enable = NETIF_MSG_LINK; 326 priv->msg_enable = NETIF_MSG_LINK;
320 priv->mii.phy_id_mask = 0x1f; 327 priv->mii.phy_id_mask = 0x1f;