sky2: version 1.28
[safe/jmp/linux-2.6] / drivers / net / 3c507.c
index fbc2311..82eaf65 100644 (file)
@@ -56,8 +56,8 @@ static const char version[] =
 #include <linux/errno.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
+#include <linux/if_ether.h>
 #include <linux/skbuff.h>
-#include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/bitops.h>
 
@@ -449,7 +449,6 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
                pr_debug("%s", version);
 
        lp = netdev_priv(dev);
-       memset(lp, 0, sizeof(*lp));
        spin_lock_init(&lp->lock);
        lp->base = ioremap(dev->mem_start, RX_BUF_END);
        if (!lp->base) {
@@ -505,7 +504,7 @@ static void el16_tx_timeout (struct net_device *dev)
                outb (0, ioaddr + SIGNAL_CA);   /* Issue channel-attn. */
                lp->last_restart = dev->stats.tx_packets;
        }
-       dev->trans_start = jiffies;
+       dev->trans_start = jiffies; /* prevent tx timeout */
        netif_wake_queue (dev);
 }
 
@@ -529,7 +528,6 @@ static netdev_tx_t el16_send_packet (struct sk_buff *skb,
 
        hardware_send_packet (dev, buf, skb->len, length - skb->len);
 
-       dev->trans_start = jiffies;
        /* Enable the 82586 interrupt input. */
        outb (0x84, ioaddr + MISC_CTRL);
 
@@ -734,8 +732,7 @@ static void init_82586_mem(struct net_device *dev)
        memcpy_toio(lp->base, init_words + 5, sizeof(init_words) - 10);
 
        /* Fill in the station address. */
-       memcpy_toio(lp->base+SA_OFFSET, dev->dev_addr,
-                  sizeof(dev->dev_addr));
+       memcpy_toio(lp->base+SA_OFFSET, dev->dev_addr, ETH_ALEN);
 
        /* The Tx-block list is written as needed.  We just set up the values. */
        lp->tx_cmd_link = IDLELOOP + 4;
@@ -767,7 +764,6 @@ static void init_82586_mem(struct net_device *dev)
        if (net_debug > 4)
                pr_debug("%s: Initialized 82586, status %04x.\n", dev->name,
                           readw(shmem+iSCB_STATUS));
-       return;
 }
 
 static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad)