aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-15 08:52:39 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 05:20:10 -0400
commite186d174e04a7c79606e1ee57abb7470861b3b00 (patch)
tree0532c9a6fa1d921f717ad538ce47f480075fcf63 /drivers/net
parent2e303a929f2178420820cbfab581ca1c7efa18e8 (diff)
ibmveth: 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/ibmveth.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 5c6315df86b9..0a51b0bd1e49 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -1203,6 +1203,20 @@ static unsigned long ibmveth_get_desired_dma(struct vio_dev *vdev)
1203 return ret; 1203 return ret;
1204} 1204}
1205 1205
1206static const struct net_device_ops ibmveth_netdev_ops = {
1207 .ndo_open = ibmveth_open,
1208 .ndo_stop = ibmveth_close,
1209 .ndo_start_xmit = ibmveth_start_xmit,
1210 .ndo_set_multicast_list = ibmveth_set_multicast_list,
1211 .ndo_do_ioctl = ibmveth_ioctl,
1212 .ndo_change_mtu = ibmveth_change_mtu,
1213 .ndo_validate_addr = eth_validate_addr,
1214 .ndo_set_mac_address = eth_mac_addr,
1215#ifdef CONFIG_NET_POLL_CONTROLLER
1216 .ndo_poll_controller = ibmveth_poll_controller,
1217#endif
1218};
1219
1206static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id) 1220static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
1207{ 1221{
1208 int rc, i; 1222 int rc, i;
@@ -1265,17 +1279,9 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
1265 memcpy(&adapter->mac_addr, mac_addr_p, 6); 1279 memcpy(&adapter->mac_addr, mac_addr_p, 6);
1266 1280
1267 netdev->irq = dev->irq; 1281 netdev->irq = dev->irq;
1268 netdev->open = ibmveth_open; 1282 netdev->netdev_ops = &ibmveth_netdev_ops;
1269 netdev->stop = ibmveth_close; 1283 netdev->ethtool_ops = &netdev_ethtool_ops;
1270 netdev->hard_start_xmit = ibmveth_start_xmit;
1271 netdev->set_multicast_list = ibmveth_set_multicast_list;
1272 netdev->do_ioctl = ibmveth_ioctl;
1273 netdev->ethtool_ops = &netdev_ethtool_ops;
1274 netdev->change_mtu = ibmveth_change_mtu;
1275 SET_NETDEV_DEV(netdev, &dev->dev); 1284 SET_NETDEV_DEV(netdev, &dev->dev);
1276#ifdef CONFIG_NET_POLL_CONTROLLER
1277 netdev->poll_controller = ibmveth_poll_controller;
1278#endif
1279 netdev->features |= NETIF_F_LLTX; 1285 netdev->features |= NETIF_F_LLTX;
1280 spin_lock_init(&adapter->stats_lock); 1286 spin_lock_init(&adapter->stats_lock);
1281 1287