Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[safe/jmp/linux-2.6] / drivers / net / wd.c
index 41f1d67..746a5ee 100644 (file)
@@ -93,8 +93,6 @@ static int __init do_wd_probe(struct net_device *dev)
        int mem_start = dev->mem_start;
        int mem_end = dev->mem_end;
 
-       SET_MODULE_OWNER(dev);
-
        if (base_addr > 0x1ff) {        /* Check a user specified location. */
                r = request_region(base_addr, WD_IO_EXTENT, "wd-probe");
                if ( r == NULL)
@@ -149,6 +147,21 @@ out:
 }
 #endif
 
+static const struct net_device_ops wd_netdev_ops = {
+       .ndo_open               = wd_open,
+       .ndo_stop               = wd_close,
+       .ndo_start_xmit         = ei_start_xmit,
+       .ndo_tx_timeout         = ei_tx_timeout,
+       .ndo_get_stats          = ei_get_stats,
+       .ndo_set_multicast_list = ei_set_multicast_list,
+       .ndo_validate_addr      = eth_validate_addr,
+       .ndo_set_mac_address    = eth_mac_addr,
+       .ndo_change_mtu         = eth_change_mtu,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       .ndo_poll_controller    = ei_poll,
+#endif
+};
+
 static int __init wd_probe1(struct net_device *dev, int ioaddr)
 {
        int i;
@@ -176,9 +189,11 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
        if (ei_debug  &&  version_printed++ == 0)
                printk(version);
 
-       printk("%s: WD80x3 at %#3x,", dev->name, ioaddr);
        for (i = 0; i < 6; i++)
-               printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i));
+               dev->dev_addr[i] = inb(ioaddr + 8 + i);
+
+       printk("%s: WD80x3 at %#3x, %pM",
+              dev->name, ioaddr, dev->dev_addr);
 
        /* The following PureData probe code was contributed by
           Mike Jagdis <jaggy@purplet.demon.co.uk>. Puredata does software
@@ -331,11 +346,8 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
        ei_status.block_input = &wd_block_input;
        ei_status.block_output = &wd_block_output;
        ei_status.get_8390_hdr = &wd_get_8390_hdr;
-       dev->open = &wd_open;
-       dev->stop = &wd_close;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-       dev->poll_controller = ei_poll;
-#endif
+
+       dev->netdev_ops = &wd_netdev_ops;
        NS8390_init(dev, 0);
 
 #if 1
@@ -365,8 +377,7 @@ wd_open(struct net_device *dev)
          outb(ei_status.reg5, ioaddr+WD_CMDREG5);
   outb(ei_status.reg0, ioaddr); /* WD_CMDREG */
 
-  ei_open(dev);
-  return 0;
+  return ei_open(dev);
 }
 
 static void
@@ -384,7 +395,6 @@ wd_reset_8390(struct net_device *dev)
                outb(NIC16 | ((dev->mem_start>>19) & 0x1f), wd_cmd_port+WD_CMDREG5);
 
        if (ei_debug > 1) printk("reset done\n");
-       return;
 }
 
 /* Grab the 8390 specific header. Similar to the block_input routine, but
@@ -433,7 +443,7 @@ wd_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_
                memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count);
        } else {
                /* Packet is in one chunk -- we can copy + cksum. */
-               eth_io_copy_and_sum(skb, xfer_start, count, 0);
+               memcpy_fromio(skb->data, xfer_start, count);
        }
 
        /* Turn off 16 bit access so that reboot works.  ISA brain-damage */
@@ -538,7 +548,7 @@ static void cleanup_card(struct net_device *dev)
        iounmap(ei_status.mem);
 }
 
-void
+void __exit
 cleanup_module(void)
 {
        int this_dev;