diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-06-03 01:19:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-04 16:00:40 -0400 |
commit | 2e724443f328cca90aa3b62d65852a5d7f5223f7 (patch) | |
tree | b64e0a80239b0aaf3f8a0bc659afe156081ad920 /drivers | |
parent | 9e55ba7bc2ab2395831d1daec39d4e9edff83885 (diff) |
iwlwifi: use the DMA state API instead of the pci equivalents
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 4 |
6 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index de915c4b9e5c..7d7e37e1148f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -850,8 +850,8 @@ void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
850 | /* Unmap tx_cmd */ | 850 | /* Unmap tx_cmd */ |
851 | if (counter) | 851 | if (counter) |
852 | pci_unmap_single(dev, | 852 | pci_unmap_single(dev, |
853 | pci_unmap_addr(&txq->meta[index], mapping), | 853 | dma_unmap_addr(&txq->meta[index], mapping), |
854 | pci_unmap_len(&txq->meta[index], len), | 854 | dma_unmap_len(&txq->meta[index], len), |
855 | PCI_DMA_TODEVICE); | 855 | PCI_DMA_TODEVICE); |
856 | 856 | ||
857 | /* unmap chunks if any */ | 857 | /* unmap chunks if any */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index bde342b5df85..eb0a6da76cbb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -704,8 +704,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
704 | txcmd_phys = pci_map_single(priv->pci_dev, | 704 | txcmd_phys = pci_map_single(priv->pci_dev, |
705 | &out_cmd->hdr, len, | 705 | &out_cmd->hdr, len, |
706 | PCI_DMA_BIDIRECTIONAL); | 706 | PCI_DMA_BIDIRECTIONAL); |
707 | pci_unmap_addr_set(out_meta, mapping, txcmd_phys); | 707 | dma_unmap_addr_set(out_meta, mapping, txcmd_phys); |
708 | pci_unmap_len_set(out_meta, len, len); | 708 | dma_unmap_len_set(out_meta, len, len); |
709 | /* Add buffer containing Tx command and MAC(!) header to TFD's | 709 | /* Add buffer containing Tx command and MAC(!) header to TFD's |
710 | * first entry */ | 710 | * first entry */ |
711 | priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq, | 711 | priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index f13f438fd227..f81f9d176993 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -474,8 +474,8 @@ void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
474 | /* Unmap tx_cmd */ | 474 | /* Unmap tx_cmd */ |
475 | if (num_tbs) | 475 | if (num_tbs) |
476 | pci_unmap_single(dev, | 476 | pci_unmap_single(dev, |
477 | pci_unmap_addr(&txq->meta[index], mapping), | 477 | dma_unmap_addr(&txq->meta[index], mapping), |
478 | pci_unmap_len(&txq->meta[index], len), | 478 | dma_unmap_len(&txq->meta[index], len), |
479 | PCI_DMA_BIDIRECTIONAL); | 479 | PCI_DMA_BIDIRECTIONAL); |
480 | 480 | ||
481 | /* Unmap chunks, if any. */ | 481 | /* Unmap chunks, if any. */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 90efb8c6d16b..f359d9f733d9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -114,8 +114,8 @@ struct iwl_cmd_meta { | |||
114 | * structure is stored at the end of the shared queue memory. */ | 114 | * structure is stored at the end of the shared queue memory. */ |
115 | u32 flags; | 115 | u32 flags; |
116 | 116 | ||
117 | DECLARE_PCI_UNMAP_ADDR(mapping) | 117 | DEFINE_DMA_UNMAP_ADDR(mapping); |
118 | DECLARE_PCI_UNMAP_LEN(len) | 118 | DEFINE_DMA_UNMAP_LEN(len); |
119 | }; | 119 | }; |
120 | 120 | ||
121 | /* | 121 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index e732f21ce7e9..769136f8f321 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -154,15 +154,15 @@ void iwl_cmd_queue_free(struct iwl_priv *priv) | |||
154 | } | 154 | } |
155 | 155 | ||
156 | pci_unmap_single(priv->pci_dev, | 156 | pci_unmap_single(priv->pci_dev, |
157 | pci_unmap_addr(&txq->meta[i], mapping), | 157 | dma_unmap_addr(&txq->meta[i], mapping), |
158 | pci_unmap_len(&txq->meta[i], len), | 158 | dma_unmap_len(&txq->meta[i], len), |
159 | PCI_DMA_BIDIRECTIONAL); | 159 | PCI_DMA_BIDIRECTIONAL); |
160 | } | 160 | } |
161 | if (huge) { | 161 | if (huge) { |
162 | i = q->n_window; | 162 | i = q->n_window; |
163 | pci_unmap_single(priv->pci_dev, | 163 | pci_unmap_single(priv->pci_dev, |
164 | pci_unmap_addr(&txq->meta[i], mapping), | 164 | dma_unmap_addr(&txq->meta[i], mapping), |
165 | pci_unmap_len(&txq->meta[i], len), | 165 | dma_unmap_len(&txq->meta[i], len), |
166 | PCI_DMA_BIDIRECTIONAL); | 166 | PCI_DMA_BIDIRECTIONAL); |
167 | } | 167 | } |
168 | 168 | ||
@@ -516,8 +516,8 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
516 | 516 | ||
517 | phys_addr = pci_map_single(priv->pci_dev, &out_cmd->hdr, | 517 | phys_addr = pci_map_single(priv->pci_dev, &out_cmd->hdr, |
518 | fix_size, PCI_DMA_BIDIRECTIONAL); | 518 | fix_size, PCI_DMA_BIDIRECTIONAL); |
519 | pci_unmap_addr_set(out_meta, mapping, phys_addr); | 519 | dma_unmap_addr_set(out_meta, mapping, phys_addr); |
520 | pci_unmap_len_set(out_meta, len, fix_size); | 520 | dma_unmap_len_set(out_meta, len, fix_size); |
521 | 521 | ||
522 | trace_iwlwifi_dev_hcmd(priv, &out_cmd->hdr, fix_size, cmd->flags); | 522 | trace_iwlwifi_dev_hcmd(priv, &out_cmd->hdr, fix_size, cmd->flags); |
523 | 523 | ||
@@ -611,8 +611,8 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | |||
611 | meta = &txq->meta[cmd_index]; | 611 | meta = &txq->meta[cmd_index]; |
612 | 612 | ||
613 | pci_unmap_single(priv->pci_dev, | 613 | pci_unmap_single(priv->pci_dev, |
614 | pci_unmap_addr(meta, mapping), | 614 | dma_unmap_addr(meta, mapping), |
615 | pci_unmap_len(meta, len), | 615 | dma_unmap_len(meta, len), |
616 | PCI_DMA_BIDIRECTIONAL); | 616 | PCI_DMA_BIDIRECTIONAL); |
617 | 617 | ||
618 | /* Input error checking is done when commands are added to queue. */ | 618 | /* Input error checking is done when commands are added to queue. */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index f3127d599739..42f1d3328078 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -619,8 +619,8 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
619 | len, PCI_DMA_TODEVICE); | 619 | len, PCI_DMA_TODEVICE); |
620 | /* we do not map meta data ... so we can safely access address to | 620 | /* we do not map meta data ... so we can safely access address to |
621 | * provide to unmap command*/ | 621 | * provide to unmap command*/ |
622 | pci_unmap_addr_set(out_meta, mapping, txcmd_phys); | 622 | dma_unmap_addr_set(out_meta, mapping, txcmd_phys); |
623 | pci_unmap_len_set(out_meta, len, len); | 623 | dma_unmap_len_set(out_meta, len, len); |
624 | 624 | ||
625 | /* Add buffer containing Tx command and MAC(!) header to TFD's | 625 | /* Add buffer containing Tx command and MAC(!) header to TFD's |
626 | * first entry */ | 626 | * first entry */ |