aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 4ce3d6a63d18..5c6b3fe3eedf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -592,6 +592,38 @@ int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
592 return 0; 592 return 0;
593} 593}
594 594
595/*
596 * Tell nic where to find circular buffer of Tx Frame Descriptors for
597 * given Tx queue, and enable the DMA channel used for that queue.
598 *
599 * 4965 supports up to 16 Tx queues in DRAM, mapped to up to 8 Tx DMA
600 * channels supported in hardware.
601 */
602int iwl_hw_tx_queue_init(struct iwl_priv *priv,
603 struct iwl_tx_queue *txq)
604{
605 int ret;
606 unsigned long flags;
607 int txq_id = txq->q.id;
608
609 spin_lock_irqsave(&priv->lock, flags);
610 ret = iwl_grab_nic_access(priv);
611 if (ret) {
612 spin_unlock_irqrestore(&priv->lock, flags);
613 return ret;
614 }
615
616 /* Circular buffer (TFD queue in DRAM) physical base address */
617 iwl_write_direct32(priv, FH_MEM_CBBC_QUEUE(txq_id),
618 txq->q.dma_addr >> 8);
619
620 iwl_release_nic_access(priv);
621 spin_unlock_irqrestore(&priv->lock, flags);
622
623 return 0;
624}
625
626
595/****************************************************************************** 627/******************************************************************************
596 * 628 *
597 * Misc. internal state and helper functions 629 * Misc. internal state and helper functions