diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/rx.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index 7fc38217d76..6d71f51ef54 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -203,6 +203,17 @@ static void iwl_rx_queue_restock(struct iwl_trans *trans) | |||
203 | struct iwl_rx_mem_buffer *rxb; | 203 | struct iwl_rx_mem_buffer *rxb; |
204 | unsigned long flags; | 204 | unsigned long flags; |
205 | 205 | ||
206 | /* | ||
207 | * If the device isn't enabled - not need to try to add buffers... | ||
208 | * This can happen when we stop the device and still have an interrupt | ||
209 | * pending. We stop the APM before we sync the interrupts / tasklets | ||
210 | * because we have to (see comment there). On the other hand, since | ||
211 | * the APM is stopped, we cannot access the HW (in particular not prph). | ||
212 | * So don't try to restock if the APM has been already stopped. | ||
213 | */ | ||
214 | if (!test_bit(STATUS_DEVICE_ENABLED, &trans_pcie->status)) | ||
215 | return; | ||
216 | |||
206 | spin_lock_irqsave(&rxq->lock, flags); | 217 | spin_lock_irqsave(&rxq->lock, flags); |
207 | while ((iwl_rx_queue_space(rxq) > 0) && (rxq->free_count)) { | 218 | while ((iwl_rx_queue_space(rxq) > 0) && (rxq->free_count)) { |
208 | /* The overwritten rxb must be a used one */ | 219 | /* The overwritten rxb must be a used one */ |