aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tsi108_eth.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-11 03:37:59 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-13 18:16:21 -0400
commit80ef1fc82e3feb541f9645322eab7afa778cce98 (patch)
treefd2d8f4e366d1655ea50d35791f3a3bebd5cf662 /drivers/net/tsi108_eth.c
parentccd97bb01c7404ee000bb0627d1864b84fc9d904 (diff)
tsi108_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/tsi108_eth.c')
-rw-r--r--drivers/net/tsi108_eth.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index bb43e7fb2a50..0f78f99f9b20 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -1561,6 +1561,18 @@ static const struct ethtool_ops tsi108_ethtool_ops = {
1561 .set_settings = tsi108_set_settings, 1561 .set_settings = tsi108_set_settings,
1562}; 1562};
1563 1563
1564static const struct net_device_ops tsi108_netdev_ops = {
1565 .ndo_open = tsi108_open,
1566 .ndo_stop = tsi108_close,
1567 .ndo_start_xmit = tsi108_send_packet,
1568 .ndo_set_multicast_list = tsi108_set_rx_mode,
1569 .ndo_get_stats = tsi108_get_stats,
1570 .ndo_do_ioctl = tsi108_do_ioctl,
1571 .ndo_set_mac_address = tsi108_set_mac,
1572 .ndo_validate_addr = eth_validate_addr,
1573 .ndo_change_mtu = eth_change_mtu,
1574};
1575
1564static int 1576static int
1565tsi108_init_one(struct platform_device *pdev) 1577tsi108_init_one(struct platform_device *pdev)
1566{ 1578{
@@ -1616,14 +1628,8 @@ tsi108_init_one(struct platform_device *pdev)
1616 data->phy_type = einfo->phy_type; 1628 data->phy_type = einfo->phy_type;
1617 data->irq_num = einfo->irq_num; 1629 data->irq_num = einfo->irq_num;
1618 data->id = pdev->id; 1630 data->id = pdev->id;
1619 dev->open = tsi108_open;
1620 dev->stop = tsi108_close;
1621 dev->hard_start_xmit = tsi108_send_packet;
1622 dev->set_mac_address = tsi108_set_mac;
1623 dev->set_multicast_list = tsi108_set_rx_mode;
1624 dev->get_stats = tsi108_get_stats;
1625 netif_napi_add(dev, &data->napi, tsi108_poll, 64); 1631 netif_napi_add(dev, &data->napi, tsi108_poll, 64);
1626 dev->do_ioctl = tsi108_do_ioctl; 1632 dev->netdev_ops = &tsi108_netdev_ops;
1627 dev->ethtool_ops = &tsi108_ethtool_ops; 1633 dev->ethtool_ops = &tsi108_ethtool_ops;
1628 1634
1629 /* Apparently, the Linux networking code won't use scatter-gather 1635 /* Apparently, the Linux networking code won't use scatter-gather