aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index a2eb90d40b7e..ed63e5c76f3c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -420,3 +420,29 @@ int iwl_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
420 return 0; 420 return 0;
421} 421}
422 422
423int iwl_rxq_stop(struct iwl_priv *priv)
424{
425 int ret;
426 unsigned long flags;
427
428 spin_lock_irqsave(&priv->lock, flags);
429 ret = iwl_grab_nic_access(priv);
430 if (unlikely(ret)) {
431 spin_unlock_irqrestore(&priv->lock, flags);
432 return ret;
433 }
434
435 /* stop Rx DMA */
436 iwl_write_direct32(priv, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0);
437 ret = iwl_poll_direct_bit(priv, FH_MEM_RSSR_RX_STATUS_REG,
438 (1 << 24), 1000);
439 if (ret < 0)
440 IWL_ERROR("Can't stop Rx DMA.\n");
441
442 iwl_release_nic_access(priv);
443 spin_unlock_irqrestore(&priv->lock, flags);
444
445 return 0;
446}
447EXPORT_SYMBOL(iwl_rxq_stop);
448