Skip to content

Commit

Permalink
sun3lance: convert to net_device_ops
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Beregalov authored and David S. Miller committed Apr 16, 2009
1 parent ec4e0cf commit 2160187
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions drivers/net/sun3lance.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,16 @@ struct net_device * __init sun3lance_probe(int unit)
return ERR_PTR(err);
}

static const struct net_device_ops lance_netdev_ops = {
.ndo_open = lance_open,
.ndo_stop = lance_close,
.ndo_start_xmit = lance_start_xmit,
.ndo_set_multicast_list = set_multicast_list,
.ndo_set_mac_address = NULL,
.ndo_change_mtu = eth_change_mtu,
.ndo_validate_addr = eth_validate_addr,
};

static int __init lance_probe( struct net_device *dev)
{
unsigned long ioaddr;
Expand Down Expand Up @@ -397,12 +407,7 @@ static int __init lance_probe( struct net_device *dev)
if (did_version++ == 0)
printk( version );

/* The LANCE-specific entries in the device structure. */
dev->open = &lance_open;
dev->hard_start_xmit = &lance_start_xmit;
dev->stop = &lance_close;
dev->set_multicast_list = &set_multicast_list;
dev->set_mac_address = NULL;
dev->netdev_ops = &lance_netdev_ops;
// KLUDGE -- REMOVE ME
set_bit(__LINK_STATE_PRESENT, &dev->state);

Expand Down

0 comments on commit 2160187

Please sign in to comment.