Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / net / wireless / bcm43xx / bcm43xx_pio.c
index c60c174..0aa1bd2 100644 (file)
@@ -262,10 +262,8 @@ static void tx_tasklet(unsigned long d)
        int err;
        u16 txctl;
 
-       spin_lock_irqsave(&bcm->irq_lock, flags);
+       bcm43xx_lock_mmio(bcm, flags);
 
-       if (queue->tx_frozen)
-               goto out_unlock;
        txctl = bcm43xx_pio_read(queue, BCM43xx_PIO_TXCTL);
        if (txctl & BCM43xx_PIO_TXCTL_SUSPEND)
                goto out_unlock;
@@ -300,7 +298,7 @@ static void tx_tasklet(unsigned long d)
                continue;
        }
 out_unlock:
-       spin_unlock_irqrestore(&bcm->irq_lock, flags);
+       bcm43xx_unlock_mmio(bcm, flags);
 }
 
 static void setup_txqueues(struct bcm43xx_pioqueue *queue)
@@ -376,6 +374,7 @@ static void cancel_transfers(struct bcm43xx_pioqueue *queue)
        struct bcm43xx_pio_txpacket *packet, *tmp_packet;
 
        netif_tx_disable(queue->bcm->net_dev);
+       assert(queue->bcm->shutting_down);
        tasklet_disable(&queue->txtask);
 
        list_for_each_entry_safe(packet, tmp_packet, &queue->txrunning, list)
@@ -635,40 +634,5 @@ void bcm43xx_pio_tx_resume(struct bcm43xx_pioqueue *queue)
                          bcm43xx_pio_read(queue, BCM43xx_PIO_TXCTL)
                          & ~BCM43xx_PIO_TXCTL_SUSPEND);
        bcm43xx_power_saving_ctl_bits(queue->bcm, -1, -1);
-       if (!list_empty(&queue->txqueue))
-               tasklet_schedule(&queue->txtask);
-}
-
-void bcm43xx_pio_freeze_txqueues(struct bcm43xx_private *bcm)
-{
-       struct bcm43xx_pio *pio;
-
-       assert(bcm43xx_using_pio(bcm));
-       pio = bcm43xx_current_pio(bcm);
-       pio->queue0->tx_frozen = 1;
-       pio->queue1->tx_frozen = 1;
-       pio->queue2->tx_frozen = 1;
-       pio->queue3->tx_frozen = 1;
-}
-
-void bcm43xx_pio_thaw_txqueues(struct bcm43xx_private *bcm)
-{
-       struct bcm43xx_pio *pio;
-
-       assert(bcm43xx_using_pio(bcm));
-       pio = bcm43xx_current_pio(bcm);
-       pio->queue0->tx_frozen = 0;
-       pio->queue1->tx_frozen = 0;
-       pio->queue2->tx_frozen = 0;
-       pio->queue3->tx_frozen = 0;
-       if (!list_empty(&pio->queue0->txqueue))
-               tasklet_schedule(&pio->queue0->txtask);
-       if (!list_empty(&pio->queue1->txqueue))
-               tasklet_schedule(&pio->queue1->txtask);
-       if (!list_empty(&pio->queue2->txqueue))
-               tasklet_schedule(&pio->queue2->txtask);
-       if (!list_empty(&pio->queue3->txqueue))
-               tasklet_schedule(&pio->queue3->txtask);
+       tasklet_schedule(&queue->txtask);
 }
-
-