diff options
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 36952274950e..c1ceb4b23971 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -137,6 +137,7 @@ struct mwl8k_tx_queue { | |||
137 | struct mwl8k_priv { | 137 | struct mwl8k_priv { |
138 | struct ieee80211_hw *hw; | 138 | struct ieee80211_hw *hw; |
139 | struct pci_dev *pdev; | 139 | struct pci_dev *pdev; |
140 | int irq; | ||
140 | 141 | ||
141 | struct mwl8k_device_info *device_info; | 142 | struct mwl8k_device_info *device_info; |
142 | 143 | ||
@@ -3761,9 +3762,11 @@ static int mwl8k_start(struct ieee80211_hw *hw) | |||
3761 | rc = request_irq(priv->pdev->irq, mwl8k_interrupt, | 3762 | rc = request_irq(priv->pdev->irq, mwl8k_interrupt, |
3762 | IRQF_SHARED, MWL8K_NAME, hw); | 3763 | IRQF_SHARED, MWL8K_NAME, hw); |
3763 | if (rc) { | 3764 | if (rc) { |
3765 | priv->irq = -1; | ||
3764 | wiphy_err(hw->wiphy, "failed to register IRQ handler\n"); | 3766 | wiphy_err(hw->wiphy, "failed to register IRQ handler\n"); |
3765 | return -EIO; | 3767 | return -EIO; |
3766 | } | 3768 | } |
3769 | priv->irq = priv->pdev->irq; | ||
3767 | 3770 | ||
3768 | /* Enable TX reclaim and RX tasklets. */ | 3771 | /* Enable TX reclaim and RX tasklets. */ |
3769 | tasklet_enable(&priv->poll_tx_task); | 3772 | tasklet_enable(&priv->poll_tx_task); |
@@ -3800,6 +3803,7 @@ static int mwl8k_start(struct ieee80211_hw *hw) | |||
3800 | if (rc) { | 3803 | if (rc) { |
3801 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); | 3804 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); |
3802 | free_irq(priv->pdev->irq, hw); | 3805 | free_irq(priv->pdev->irq, hw); |
3806 | priv->irq = -1; | ||
3803 | tasklet_disable(&priv->poll_tx_task); | 3807 | tasklet_disable(&priv->poll_tx_task); |
3804 | tasklet_disable(&priv->poll_rx_task); | 3808 | tasklet_disable(&priv->poll_rx_task); |
3805 | } | 3809 | } |
@@ -3818,7 +3822,10 @@ static void mwl8k_stop(struct ieee80211_hw *hw) | |||
3818 | 3822 | ||
3819 | /* Disable interrupts */ | 3823 | /* Disable interrupts */ |
3820 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); | 3824 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); |
3821 | free_irq(priv->pdev->irq, hw); | 3825 | if (priv->irq != -1) { |
3826 | free_irq(priv->pdev->irq, hw); | ||
3827 | priv->irq = -1; | ||
3828 | } | ||
3822 | 3829 | ||
3823 | /* Stop finalize join worker */ | 3830 | /* Stop finalize join worker */ |
3824 | cancel_work_sync(&priv->finalize_join_worker); | 3831 | cancel_work_sync(&priv->finalize_join_worker); |