aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
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 {
157struct mwl8k_priv { 157struct mwl8k_priv {
158 struct ieee80211_hw *hw; 158 struct ieee80211_hw *hw;
159 struct pci_dev *pdev; 159 struct pci_dev *pdev;
160 int irq;
160 161
161 struct mwl8k_device_info *device_info; 162 struct mwl8k_device_info *device_info;
162 163
@@ -4272,9 +4273,11 @@ static int mwl8k_start(struct ieee80211_hw *hw)
4272 rc = request_irq(priv->pdev->irq, mwl8k_interrupt, 4273 rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
4273 IRQF_SHARED, MWL8K_NAME, hw); 4274 IRQF_SHARED, MWL8K_NAME, hw);
4274 if (rc) { 4275 if (rc) {
4276 priv->irq = -1;
4275 wiphy_err(hw->wiphy, "failed to register IRQ handler\n"); 4277 wiphy_err(hw->wiphy, "failed to register IRQ handler\n");
4276 return -EIO; 4278 return -EIO;
4277 } 4279 }
4280 priv->irq = priv->pdev->irq;
4278 4281
4279 /* Enable TX reclaim and RX tasklets. */ 4282 /* Enable TX reclaim and RX tasklets. */
4280 tasklet_enable(&priv->poll_tx_task); 4283 tasklet_enable(&priv->poll_tx_task);
@@ -4311,6 +4314,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)
4311 if (rc) { 4314 if (rc) {
4312 iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); 4315 iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
4313 free_irq(priv->pdev->irq, hw); 4316 free_irq(priv->pdev->irq, hw);
4317 priv->irq = -1;
4314 tasklet_disable(&priv->poll_tx_task); 4318 tasklet_disable(&priv->poll_tx_task);
4315 tasklet_disable(&priv->poll_rx_task); 4319 tasklet_disable(&priv->poll_rx_task);
4316 } 4320 }
@@ -4329,7 +4333,10 @@ static void mwl8k_stop(struct ieee80211_hw *hw)
4329 4333
4330 /* Disable interrupts */ 4334 /* Disable interrupts */
4331 iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); 4335 iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
4332 free_irq(priv->pdev->irq, hw); 4336 if (priv->irq != -1) {
4337 free_irq(priv->pdev->irq, hw);
4338 priv->irq = -1;
4339 }
4333 4340
4334 /* Stop finalize join worker */ 4341 /* Stop finalize join worker */
4335 cancel_work_sync(&priv->finalize_join_worker); 4342 cancel_work_sync(&priv->finalize_join_worker);