aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/korina.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-15 08:52:46 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 05:20:15 -0400
commit52b031ff3987a079ea759d81447312f1665dbfbd (patch)
tree9e45147f4d6185d78f47a2ffa6ba8ef1f7a8e7a6 /drivers/net/korina.c
parent502a326f833927a84a8de29f5fb638aa9da15f4b (diff)
korina: 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/korina.c')
-rw-r--r--drivers/net/korina.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/net/korina.c b/drivers/net/korina.c
index 38d6649a29c4..dc238567cae1 100644
--- a/drivers/net/korina.c
+++ b/drivers/net/korina.c
@@ -1081,6 +1081,21 @@ static int korina_close(struct net_device *dev)
1081 return 0; 1081 return 0;
1082} 1082}
1083 1083
1084static const struct net_device_ops korina_netdev_ops = {
1085 .ndo_open = korina_open,
1086 .ndo_stop = korina_close,
1087 .ndo_start_xmit = korina_send_packet,
1088 .ndo_set_multicast_list = korina_multicast_list,
1089 .ndo_tx_timeout = korina_tx_timeout,
1090 .ndo_do_ioctl = korina_ioctl,
1091 .ndo_change_mtu = eth_change_mtu,
1092 .ndo_validate_addr = eth_validate_addr,
1093 .ndo_set_mac_address = eth_mac_addr,
1094#ifdef CONFIG_NET_POLL_CONTROLLER
1095 .ndo_poll_controller = korina_poll_controller,
1096#endif
1097};
1098
1084static int korina_probe(struct platform_device *pdev) 1099static int korina_probe(struct platform_device *pdev)
1085{ 1100{
1086 struct korina_device *bif = platform_get_drvdata(pdev); 1101 struct korina_device *bif = platform_get_drvdata(pdev);
@@ -1149,17 +1164,9 @@ static int korina_probe(struct platform_device *pdev)
1149 dev->irq = lp->rx_irq; 1164 dev->irq = lp->rx_irq;
1150 lp->dev = dev; 1165 lp->dev = dev;
1151 1166
1152 dev->open = korina_open; 1167 dev->netdev_ops = &korina_netdev_ops;
1153 dev->stop = korina_close;
1154 dev->hard_start_xmit = korina_send_packet;
1155 dev->set_multicast_list = &korina_multicast_list;
1156 dev->ethtool_ops = &netdev_ethtool_ops; 1168 dev->ethtool_ops = &netdev_ethtool_ops;
1157 dev->tx_timeout = korina_tx_timeout;
1158 dev->watchdog_timeo = TX_TIMEOUT; 1169 dev->watchdog_timeo = TX_TIMEOUT;
1159 dev->do_ioctl = &korina_ioctl;
1160#ifdef CONFIG_NET_POLL_CONTROLLER
1161 dev->poll_controller = korina_poll_controller;
1162#endif
1163 netif_napi_add(dev, &lp->napi, korina_poll, 64); 1170 netif_napi_add(dev, &lp->napi, korina_poll, 64);
1164 1171
1165 lp->phy_addr = (((lp->rx_irq == 0x2c? 1:0) << 8) | 0x05); 1172 lp->phy_addr = (((lp->rx_irq == 0x2c? 1:0) << 8) | 0x05);