]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
bcm43xx: Fix assertion failures in interrupt handler
authorPavel Roskin <proski@gnu.org>
Tue, 6 Mar 2007 01:28:00 +0000 (19:28 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Mar 2007 18:50:24 +0000 (10:50 -0800)
In the bcm43xx interrupt handler, sanity checks are wrongly done before the
verification that the interrupt is for the bcm43xx.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/bcm43xx/bcm43xx_main.c

index 2f9d0e05eb9b92ae591c5f12580b7e7660bfaf12..629ba91dea1a139aa8b3de92bfe2b1a5b4679921 100644 (file)
@@ -1864,9 +1864,6 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id)
 
        spin_lock(&bcm->irq_lock);
 
-       assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED);
-       assert(bcm->current_core->id == BCM43xx_COREID_80211);
-
        reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON);
        if (reason == 0xffffffff) {
                /* irq not for us (shared irq) */
@@ -1877,6 +1874,9 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id)
        if (!reason)
                goto out;
 
+       assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED);
+       assert(bcm->current_core->id == BCM43xx_COREID_80211);
+
        bcm->dma_reason[0] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA0_REASON)
                             & 0x0001DC00;
        bcm->dma_reason[1] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA1_REASON)