sky2: Avoid allocating memory in sky2_resume
[safe/jmp/linux-2.6] / drivers / net / b44.c
index 71fa0be..293f9c1 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
 #include <linux/ssb/ssb.h>
+#include <linux/slab.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -809,7 +810,7 @@ static int b44_rx(struct b44 *bp, int budget)
                        struct sk_buff *copy_skb;
 
                        b44_recycle_rx(bp, cons, bp->rx_prod);
-                       copy_skb = dev_alloc_skb(len + 2);
+                       copy_skb = netdev_alloc_skb(bp->dev, len + 2);
                        if (copy_skb == NULL)
                                goto drop_it_no_recycle;
 
@@ -1013,8 +1014,6 @@ static netdev_tx_t b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
        if (TX_BUFFS_AVAIL(bp) < 1)
                netif_stop_queue(dev);
 
-       dev->trans_start = jiffies;
-
 out_unlock:
        spin_unlock_irqrestore(&bp->lock, flags);
 
@@ -1680,13 +1679,15 @@ static struct net_device_stats *b44_get_stats(struct net_device *dev)
 
 static int __b44_load_mcast(struct b44 *bp, struct net_device *dev)
 {
-       struct dev_mc_list *mclist;
+       struct netdev_hw_addr *ha;
        int i, num_ents;
 
        num_ents = min_t(int, netdev_mc_count(dev), B44_MCAST_TABLE_SIZE);
-       mclist = dev->mc_list;
-       for (i = 0; mclist && i < num_ents; i++, mclist = mclist->next) {
-               __b44_cam_write(bp, mclist->dmi_addr, i + 1);
+       i = 0;
+       netdev_for_each_mc_addr(ha, dev) {
+               if (i == num_ents)
+                       break;
+               __b44_cam_write(bp, ha->addr, i++ + 1);
        }
        return i+1;
 }