com20020: convert to net_devic_ops
authorStephen Hemminger <shemminger@linux-foundation.org>
Fri, 9 Jan 2009 13:01:10 +0000 (13:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Jan 2009 22:02:20 +0000 (14:02 -0800)
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/arcnet/com20020-isa.c
drivers/net/arcnet/com20020-pci.c
drivers/net/arcnet/com20020.c
include/linux/com20020.h

index ea53a94..db08fc2 100644 (file)
@@ -151,6 +151,8 @@ static int __init com20020_init(void)
        if (node && node != 0xff)
                dev->dev_addr[0] = node;
 
+       dev->netdev_ops = &com20020_netdev_ops;
+
        lp = netdev_priv(dev);
        lp->backplane = backplane;
        lp->clockp = clockp & 7;
index 8b51f63..dbf4de3 100644 (file)
@@ -72,6 +72,9 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de
        dev = alloc_arcdev(device);
        if (!dev)
                return -ENOMEM;
+
+       dev->netdev_ops = &com20020_netdev_ops;
+
        lp = netdev_priv(dev);
 
        pci_set_drvdata(pdev, dev);
index 1036883..bbe8f2c 100644 (file)
@@ -149,6 +149,14 @@ int com20020_check(struct net_device *dev)
        return 0;
 }
 
+const struct net_device_ops com20020_netdev_ops = {
+       .ndo_open       = arcnet_open,
+       .ndo_stop       = arcnet_close,
+       .ndo_start_xmit = arcnet_send_packet,
+       .ndo_tx_timeout = arcnet_timeout,
+       .ndo_set_multicast_list = com20020_set_mc_list,
+};
+
 /* Set up the struct net_device associated with this card.  Called after
  * probing succeeds.
  */
@@ -170,8 +178,6 @@ int com20020_found(struct net_device *dev, int shared)
        lp->hw.copy_from_card = com20020_copy_from_card;
        lp->hw.close = com20020_close;
 
-       dev->set_multicast_list = com20020_set_mc_list;
-
        if (!dev->dev_addr[0])
                dev->dev_addr[0] = inb(ioaddr + BUS_ALIGN*8);   /* FIXME: do this some other way! */
 
index ac6d9a4..350afa7 100644 (file)
@@ -29,6 +29,7 @@
 
 int com20020_check(struct net_device *dev);
 int com20020_found(struct net_device *dev, int shared);
+const struct net_device_ops com20020_netdev_ops;
 
 /* The number of low I/O ports used by the card. */
 #define ARCNET_TOTAL_SIZE 8