diff options
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 0f494444bcd1..5a53195d016b 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -740,6 +740,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
740 | }; | 740 | }; |
741 | int index = rtlpci->rx_ring[rx_queue_idx].idx; | 741 | int index = rtlpci->rx_ring[rx_queue_idx].idx; |
742 | 742 | ||
743 | if (rtlpci->driver_is_goingto_unload) | ||
744 | return; | ||
743 | /*RX NORMAL PKT */ | 745 | /*RX NORMAL PKT */ |
744 | while (count--) { | 746 | while (count--) { |
745 | /*rx descriptor */ | 747 | /*rx descriptor */ |
@@ -1636,6 +1638,7 @@ static void rtl_pci_stop(struct ieee80211_hw *hw) | |||
1636 | */ | 1638 | */ |
1637 | set_hal_stop(rtlhal); | 1639 | set_hal_stop(rtlhal); |
1638 | 1640 | ||
1641 | rtlpci->driver_is_goingto_unload = true; | ||
1639 | rtlpriv->cfg->ops->disable_interrupt(hw); | 1642 | rtlpriv->cfg->ops->disable_interrupt(hw); |
1640 | cancel_work_sync(&rtlpriv->works.lps_change_work); | 1643 | cancel_work_sync(&rtlpriv->works.lps_change_work); |
1641 | 1644 | ||
@@ -1653,7 +1656,6 @@ static void rtl_pci_stop(struct ieee80211_hw *hw) | |||
1653 | ppsc->rfchange_inprogress = true; | 1656 | ppsc->rfchange_inprogress = true; |
1654 | spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flags); | 1657 | spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flags); |
1655 | 1658 | ||
1656 | rtlpci->driver_is_goingto_unload = true; | ||
1657 | rtlpriv->cfg->ops->hw_disable(hw); | 1659 | rtlpriv->cfg->ops->hw_disable(hw); |
1658 | /* some things are not needed if firmware not available */ | 1660 | /* some things are not needed if firmware not available */ |
1659 | if (!rtlpriv->max_fw_size) | 1661 | if (!rtlpriv->max_fw_size) |