aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorSamuel Ortiz <samuel.ortiz@intel.com>2009-01-23 16:45:14 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:01:34 -0500
commita8e74e2774cd1aecfef0460de07e6e178df89232 (patch)
treebccf507738fb8753e7ab16a8de9644e9d99ae07c /drivers/net/wireless/iwlwifi/iwl-agn.c
parent59606ffa9146538b73bbe1ca1285321cd7474bc0 (diff)
iwl3945: Use iwlcore TX queue management routines
By adding an additional hw_params (tfd_size) and a new iwl_lib ops (txq_init), we can now use the iwlcore TX queue management routines. We had to add a new hw_params because we need to allocate the right DMA buffer for TFDs, and those have a different sizes depending if you're on 3945 or agn. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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