summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-04-07 16:45:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-07 16:45:40 -0400
commitb37e3b6d64358604960b35e8ecbb7aed22e0926e (patch)
treef9673afc2332c15a989d3b32f002363a92ea66e1 /drivers/net/wireless/mwl8k.c
parenta90c7a313a1c5b4fc99f987a2ae8f92ab0ae35c7 (diff)
parentbd39a274fb7b43374c797bafdb7f506598f36f77 (diff)
downloadblackbird-op-linux-b37e3b6d64358604960b35e8ecbb7aed22e0926e.tar.gz
blackbird-op-linux-b37e3b6d64358604960b35e8ecbb7aed22e0926e.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts: drivers/net/wireless/rtlwifi/efuse.c drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c net/bluetooth/mgmt.c
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index d5e047970345..8913180a7bd3 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -157,6 +157,7 @@ struct mwl8k_ampdu_stream {
struct mwl8k_priv {
struct ieee80211_hw *hw;
struct pci_dev *pdev;
+ int irq;
struct mwl8k_device_info *device_info;
@@ -4272,9 +4273,11 @@ static int mwl8k_start(struct ieee80211_hw *hw)
rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
IRQF_SHARED, MWL8K_NAME, hw);
if (rc) {
+ priv->irq = -1;
wiphy_err(hw->wiphy, "failed to register IRQ handler\n");
return -EIO;
}
+ priv->irq = priv->pdev->irq;
/* Enable TX reclaim and RX tasklets. */
tasklet_enable(&priv->poll_tx_task);
@@ -4311,6 +4314,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)
if (rc) {
iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
free_irq(priv->pdev->irq, hw);
+ priv->irq = -1;
tasklet_disable(&priv->poll_tx_task);
tasklet_disable(&priv->poll_rx_task);
}
@@ -4329,7 +4333,10 @@ static void mwl8k_stop(struct ieee80211_hw *hw)
/* Disable interrupts */
iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
- free_irq(priv->pdev->irq, hw);
+ if (priv->irq != -1) {
+ free_irq(priv->pdev->irq, hw);
+ priv->irq = -1;
+ }
/* Stop finalize join worker */
cancel_work_sync(&priv->finalize_join_worker);
OpenPOWER on IntegriCloud