net: wireless: bcmdhd: Enable wlan access on resume for all sdio functions
[linux-2.6.git] / drivers / net / enc28j60.c
index 117fc6c..2837ce2 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/types.h>
 #include <linux/fcntl.h>
 #include <linux/interrupt.h>
-#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/errno.h>
 #include <linux/init.h>
@@ -813,7 +812,7 @@ static void enc28j60_read_tsv(struct enc28j60_net *priv, u8 tsv[TSV_SIZE])
        if (netif_msg_hw(priv))
                printk(KERN_DEBUG DRV_NAME ": reading TSV at addr:0x%04x\n",
                         endptr + 1);
-       enc28j60_mem_read(priv, endptr + 1, sizeof(tsv), tsv);
+       enc28j60_mem_read(priv, endptr + 1, TSV_SIZE, tsv);
 }
 
 static void enc28j60_dump_tsv(struct enc28j60_net *priv, const char *msg,
@@ -1294,8 +1293,6 @@ static netdev_tx_t enc28j60_send_packet(struct sk_buff *skb,
         */
        netif_stop_queue(dev);
 
-       /* save the timestamp */
-       priv->netdev->trans_start = jiffies;
        /* Remember the skb for deferred processing */
        priv->tx_skb = skb;
        schedule_work(&priv->tx_work);
@@ -1413,7 +1410,7 @@ static void enc28j60_set_multicast_list(struct net_device *dev)
                if (netif_msg_link(priv))
                        dev_info(&dev->dev, "promiscuous mode\n");
                priv->rxfilter = RXFILTER_PROMISC;
-       } else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count) {
+       } else if ((dev->flags & IFF_ALLMULTI) || !netdev_mc_empty(dev)) {
                if (netif_msg_link(priv))
                        dev_info(&dev->dev, "%smulticast mode\n",
                                (dev->flags & IFF_ALLMULTI) ? "all-" : "");
@@ -1491,7 +1488,7 @@ enc28j60_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
        cmd->supported  = SUPPORTED_10baseT_Half
                        | SUPPORTED_10baseT_Full
                        | SUPPORTED_TP;
-       cmd->speed      = SPEED_10;
+       ethtool_cmd_speed_set(cmd,  SPEED_10);
        cmd->duplex     = priv->full_duplex ? DUPLEX_FULL : DUPLEX_HALF;
        cmd->port       = PORT_TP;
        cmd->autoneg    = AUTONEG_DISABLE;
@@ -1502,7 +1499,8 @@ enc28j60_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 static int
 enc28j60_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
-       return enc28j60_setlink(dev, cmd->autoneg, cmd->speed, cmd->duplex);
+       return enc28j60_setlink(dev, cmd->autoneg,
+                               ethtool_cmd_speed(cmd), cmd->duplex);
 }
 
 static u32 enc28j60_get_msglevel(struct net_device *dev)
@@ -1666,3 +1664,4 @@ MODULE_AUTHOR("Claudio Lanconelli <lanconelli.claudio@eptar.com>");
 MODULE_LICENSE("GPL");
 module_param_named(debug, debug.msg_enable, int, 0);
 MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., ffff=all)");
+MODULE_ALIAS("spi:" DRV_NAME);