Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[linux-2.6-block.git] / drivers / net / wireless / iwlwifi / pcie / trans.c
index d1950838f17f3b5bf910a4850c8610ae5ac2c55d..09795afccb232a22f87fdaf9bfe0a74d0ddc89f3 100644 (file)
@@ -1059,7 +1059,7 @@ static void iwl_tx_start(struct iwl_trans *trans)
 {
        struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
        u32 a;
-       int i, chan;
+       int chan;
        u32 reg_val;
 
        /* make sure all queue are not stopped/used */
@@ -1091,12 +1091,8 @@ static void iwl_tx_start(struct iwl_trans *trans)
         */
        iwl_write_prph(trans, SCD_CHAINEXT_EN, 0);
 
-       for (i = 0; i < trans_pcie->n_q_to_fifo; i++) {
-               int fifo = trans_pcie->setup_q_to_fifo[i];
-
-               iwl_trans_pcie_txq_enable(trans, i, fifo, IWL_INVALID_STATION,
-                                         IWL_TID_NON_QOS, SCD_FRAME_LIMIT, 0);
-       }
+       iwl_trans_ac_txq_enable(trans, trans_pcie->cmd_queue,
+                               trans_pcie->cmd_fifo);
 
        /* Activate all Tx DMA/FIFO channels */
        iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7));
@@ -1145,7 +1141,7 @@ static int iwl_trans_tx_stop(struct iwl_trans *trans)
                        FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), 1000);
                if (ret < 0)
                        IWL_ERR(trans,
-                               "Failing on timeout while stopping DMA channel %d [0x%08x]",
+                               "Failing on timeout while stopping DMA channel %d [0x%08x]\n",
                                ch,
                                iwl_read_direct32(trans,
                                                  FH_TSSR_TX_STATUS_REG));
@@ -1153,7 +1149,8 @@ static int iwl_trans_tx_stop(struct iwl_trans *trans)
        spin_unlock_irqrestore(&trans_pcie->irq_lock, flags);
 
        if (!trans_pcie->txq) {
-               IWL_WARN(trans, "Stopping tx queues that aren't allocated...");
+               IWL_WARN(trans,
+                        "Stopping tx queues that aren't allocated...\n");
                return 0;
        }
 
@@ -1430,7 +1427,7 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans)
 
        err = iwl_prepare_card_hw(trans);
        if (err) {
-               IWL_ERR(trans, "Error while preparing HW: %d", err);
+               IWL_ERR(trans, "Error while preparing HW: %d\n", err);
                goto err_free_irq;
        }
 
@@ -1528,6 +1525,7 @@ static void iwl_trans_pcie_configure(struct iwl_trans *trans,
        struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
 
        trans_pcie->cmd_queue = trans_cfg->cmd_queue;
+       trans_pcie->cmd_fifo = trans_cfg->cmd_fifo;
        if (WARN_ON(trans_cfg->n_no_reclaim_cmds > MAX_NO_RECLAIM_CMDS))
                trans_pcie->n_no_reclaim_cmds = 0;
        else
@@ -1536,17 +1534,6 @@ static void iwl_trans_pcie_configure(struct iwl_trans *trans,
                memcpy(trans_pcie->no_reclaim_cmds, trans_cfg->no_reclaim_cmds,
                       trans_pcie->n_no_reclaim_cmds * sizeof(u8));
 
-       trans_pcie->n_q_to_fifo = trans_cfg->n_queue_to_fifo;
-
-       if (WARN_ON(trans_pcie->n_q_to_fifo > IWL_MAX_HW_QUEUES))
-               trans_pcie->n_q_to_fifo = IWL_MAX_HW_QUEUES;
-
-       /* at least the command queue must be mapped */
-       WARN_ON(!trans_pcie->n_q_to_fifo);
-
-       memcpy(trans_pcie->setup_q_to_fifo, trans_cfg->queue_to_fifo,
-              trans_pcie->n_q_to_fifo * sizeof(u8));
-
        trans_pcie->rx_buf_size_8k = trans_cfg->rx_buf_size_8k;
        if (trans_pcie->rx_buf_size_8k)
                trans_pcie->rx_page_order = get_order(8 * 1024);
@@ -2141,13 +2128,14 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
 
        err = pci_request_regions(pdev, DRV_NAME);
        if (err) {
-               dev_printk(KERN_ERR, &pdev->dev, "pci_request_regions failed");
+               dev_printk(KERN_ERR, &pdev->dev,
+                          "pci_request_regions failed\n");
                goto out_pci_disable_device;
        }
 
        trans_pcie->hw_base = pci_ioremap_bar(pdev, 0);
        if (!trans_pcie->hw_base) {
-               dev_printk(KERN_ERR, &pdev->dev, "pci_ioremap_bar failed");
+               dev_printk(KERN_ERR, &pdev->dev, "pci_ioremap_bar failed\n");
                err = -ENODEV;
                goto out_pci_release_regions;
        }
@@ -2168,7 +2156,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
        err = pci_enable_msi(pdev);
        if (err)
                dev_printk(KERN_ERR, &pdev->dev,
-                          "pci_enable_msi failed(0X%x)", err);
+                          "pci_enable_msi failed(0X%x)\n", err);
 
        trans->dev = &pdev->dev;
        trans_pcie->irq = pdev->irq;