]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: use the DMA state API instead of the pci equivalents
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 3 Jun 2010 05:19:20 +0000 (14:19 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 4 Jun 2010 20:00:40 +0000 (16:00 -0400)
This can be cleanly applied to wireless-2.6 and iwlwifi git trees.

=
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: [PATCH] iwlwifi: use the DMA state API instead of the pci equivalents

This replace the PCI DMA state API (include/linux/pci-dma.h) with the
DMA equivalents since the PCI DMA state API will be obsolete.

No functional change.

For further information about the background:

http://marc.info/?l=linux-netdev&m=127037540020276&w=2

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-agn-tx.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index de915c4b9e5cb8e4c4fc7dc6385edd4afadac0f7..7d7e37e1148fb030208084fbde005b1bd96772fc 100644 (file)
@@ -850,8 +850,8 @@ void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
        /* Unmap tx_cmd */
        if (counter)
                pci_unmap_single(dev,
-                               pci_unmap_addr(&txq->meta[index], mapping),
-                               pci_unmap_len(&txq->meta[index], len),
+                               dma_unmap_addr(&txq->meta[index], mapping),
+                               dma_unmap_len(&txq->meta[index], len),
                                PCI_DMA_TODEVICE);
 
        /* unmap chunks if any */
index bde342b5df851cd08817db87b1e1dd456f6ceef6..eb0a6da76cbbdd40d718b35a6c440d5b55595f7a 100644 (file)
@@ -704,8 +704,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
        txcmd_phys = pci_map_single(priv->pci_dev,
                                    &out_cmd->hdr, len,
                                    PCI_DMA_BIDIRECTIONAL);
-       pci_unmap_addr_set(out_meta, mapping, txcmd_phys);
-       pci_unmap_len_set(out_meta, len, len);
+       dma_unmap_addr_set(out_meta, mapping, txcmd_phys);
+       dma_unmap_len_set(out_meta, len, len);
        /* Add buffer containing Tx command and MAC(!) header to TFD's
         * first entry */
        priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq,
index f13f438fd227510070bdd578a681846d14cac51e..f81f9d1769938bb2a87a924b37cf741a43b3b300 100644 (file)
@@ -474,8 +474,8 @@ void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
        /* Unmap tx_cmd */
        if (num_tbs)
                pci_unmap_single(dev,
-                               pci_unmap_addr(&txq->meta[index], mapping),
-                               pci_unmap_len(&txq->meta[index], len),
+                               dma_unmap_addr(&txq->meta[index], mapping),
+                               dma_unmap_len(&txq->meta[index], len),
                                PCI_DMA_BIDIRECTIONAL);
 
        /* Unmap chunks, if any. */
index 90efb8c6d16b8eed869a5a726b8867470cc9a034..f359d9f733d912dc50eadf3737f321f5cdf5b764 100644 (file)
@@ -114,8 +114,8 @@ struct iwl_cmd_meta {
         * structure is stored at the end of the shared queue memory. */
        u32 flags;
 
-       DECLARE_PCI_UNMAP_ADDR(mapping)
-       DECLARE_PCI_UNMAP_LEN(len)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
+       DEFINE_DMA_UNMAP_LEN(len);
 };
 
 /*
index e732f21ce7e987d87ed5ac425104e8c9554ab365..769136f8f321f2d9cc2f5cc856eafb9e6a51593e 100644 (file)
@@ -154,15 +154,15 @@ void iwl_cmd_queue_free(struct iwl_priv *priv)
                }
 
                pci_unmap_single(priv->pci_dev,
-                                pci_unmap_addr(&txq->meta[i], mapping),
-                                pci_unmap_len(&txq->meta[i], len),
+                                dma_unmap_addr(&txq->meta[i], mapping),
+                                dma_unmap_len(&txq->meta[i], len),
                                 PCI_DMA_BIDIRECTIONAL);
        }
        if (huge) {
                i = q->n_window;
                pci_unmap_single(priv->pci_dev,
-                                pci_unmap_addr(&txq->meta[i], mapping),
-                                pci_unmap_len(&txq->meta[i], len),
+                                dma_unmap_addr(&txq->meta[i], mapping),
+                                dma_unmap_len(&txq->meta[i], len),
                                 PCI_DMA_BIDIRECTIONAL);
        }
 
@@ -516,8 +516,8 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
 
        phys_addr = pci_map_single(priv->pci_dev, &out_cmd->hdr,
                                   fix_size, PCI_DMA_BIDIRECTIONAL);
-       pci_unmap_addr_set(out_meta, mapping, phys_addr);
-       pci_unmap_len_set(out_meta, len, fix_size);
+       dma_unmap_addr_set(out_meta, mapping, phys_addr);
+       dma_unmap_len_set(out_meta, len, fix_size);
 
        trace_iwlwifi_dev_hcmd(priv, &out_cmd->hdr, fix_size, cmd->flags);
 
@@ -611,8 +611,8 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
        meta = &txq->meta[cmd_index];
 
        pci_unmap_single(priv->pci_dev,
-                        pci_unmap_addr(meta, mapping),
-                        pci_unmap_len(meta, len),
+                        dma_unmap_addr(meta, mapping),
+                        dma_unmap_len(meta, len),
                         PCI_DMA_BIDIRECTIONAL);
 
        /* Input error checking is done when commands are added to queue. */
index f3127d599739bedcaaa4108a0fd3ed337909ce64..42f1d3328078ff02b00b57c25e2f93dbc5e748e7 100644 (file)
@@ -619,8 +619,8 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
                                    len, PCI_DMA_TODEVICE);
        /* we do not map meta data ... so we can safely access address to
         * provide to unmap command*/
-       pci_unmap_addr_set(out_meta, mapping, txcmd_phys);
-       pci_unmap_len_set(out_meta, len, len);
+       dma_unmap_addr_set(out_meta, mapping, txcmd_phys);
+       dma_unmap_len_set(out_meta, len, len);
 
        /* Add buffer containing Tx command and MAC(!) header to TFD's
         * first entry */