Skip to content

Commit

Permalink
rtlwifi: Fix incorrect return of IRQ_HANDLED
Browse files Browse the repository at this point in the history
The recent discussion regarding an incorrect return of IRQ_HANDLED
from rt2800pci caused me to look at this PCI interrupt routine. I
discovered that changes were needed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Larry Finger authored and John W. Linville committed Nov 28, 2011
1 parent bc192f8 commit de2e56c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/wireless/rtlwifi/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,15 +780,18 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
unsigned long flags;
u32 inta = 0;
u32 intb = 0;
irqreturn_t ret = IRQ_HANDLED;

spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags);

/*read ISR: 4/8bytes */
rtlpriv->cfg->ops->interrupt_recognized(hw, &inta, &intb);

/*Shared IRQ or HW disappared */
if (!inta || inta == 0xffff)
if (!inta || inta == 0xffff) {
ret = IRQ_NONE;
goto done;
}

/*<1> beacon related */
if (inta & rtlpriv->cfg->maps[RTL_IMR_TBDOK]) {
Expand Down Expand Up @@ -892,7 +895,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)

done:
spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags);
return IRQ_HANDLED;
return ret;
}

static void _rtl_pci_irq_tasklet(struct ieee80211_hw *hw)
Expand Down

0 comments on commit de2e56c

Please sign in to comment.