diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-06-27 15:38:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-28 11:16:39 -0400 |
commit | 5ee0a58d8ca443e80ed8712c86c9938360b79cac (patch) | |
tree | ac57dbce885cdc9957d0ef1aaf49390cb5b9a0ab /drivers/net/wireless | |
parent | a66b98db570a638afd909459e1e6bfa272344bd3 (diff) |
iwlagn: use PCI_DMA_* for pci_* operations
"iwlagn: map command buffers BIDI" uses the DMA_* enumerations for DMA
directions, even though the pci_* DMA API is still in use. That patch
was undoubtedly developed on top of "iwlagn: don't use the PCI wrappers
for DMA operation", which is due in the next release.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 47074315903e..137dba95b1ad 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -126,7 +126,7 @@ static inline u8 iwl_tfd_get_num_tbs(struct iwl_tfd *tfd) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | static void iwlagn_unmap_tfd(struct iwl_priv *priv, struct iwl_cmd_meta *meta, | 128 | static void iwlagn_unmap_tfd(struct iwl_priv *priv, struct iwl_cmd_meta *meta, |
129 | struct iwl_tfd *tfd, enum dma_data_direction dma_dir) | 129 | struct iwl_tfd *tfd, int dma_dir) |
130 | { | 130 | { |
131 | struct pci_dev *dev = priv->pci_dev; | 131 | struct pci_dev *dev = priv->pci_dev; |
132 | int i; | 132 | int i; |
@@ -168,7 +168,7 @@ void iwlagn_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
168 | int index = txq->q.read_ptr; | 168 | int index = txq->q.read_ptr; |
169 | 169 | ||
170 | iwlagn_unmap_tfd(priv, &txq->meta[index], &tfd_tmp[index], | 170 | iwlagn_unmap_tfd(priv, &txq->meta[index], &tfd_tmp[index], |
171 | DMA_TO_DEVICE); | 171 | PCI_DMA_TODEVICE); |
172 | 172 | ||
173 | /* free SKB */ | 173 | /* free SKB */ |
174 | if (txq->txb) { | 174 | if (txq->txb) { |
@@ -312,7 +312,7 @@ void iwl_cmd_queue_unmap(struct iwl_priv *priv) | |||
312 | 312 | ||
313 | if (txq->meta[i].flags & CMD_MAPPED) { | 313 | if (txq->meta[i].flags & CMD_MAPPED) { |
314 | iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i], | 314 | iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i], |
315 | DMA_BIDIRECTIONAL); | 315 | PCI_DMA_BIDIRECTIONAL); |
316 | txq->meta[i].flags = 0; | 316 | txq->meta[i].flags = 0; |
317 | } | 317 | } |
318 | 318 | ||
@@ -694,11 +694,11 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
694 | if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY)) | 694 | if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY)) |
695 | continue; | 695 | continue; |
696 | phys_addr = pci_map_single(priv->pci_dev, (void *)cmd->data[i], | 696 | phys_addr = pci_map_single(priv->pci_dev, (void *)cmd->data[i], |
697 | cmd->len[i], DMA_BIDIRECTIONAL); | 697 | cmd->len[i], PCI_DMA_BIDIRECTIONAL); |
698 | if (pci_dma_mapping_error(priv->pci_dev, phys_addr)) { | 698 | if (pci_dma_mapping_error(priv->pci_dev, phys_addr)) { |
699 | iwlagn_unmap_tfd(priv, out_meta, | 699 | iwlagn_unmap_tfd(priv, out_meta, |
700 | &txq->tfds[q->write_ptr], | 700 | &txq->tfds[q->write_ptr], |
701 | DMA_BIDIRECTIONAL); | 701 | PCI_DMA_BIDIRECTIONAL); |
702 | idx = -ENOMEM; | 702 | idx = -ENOMEM; |
703 | goto out; | 703 | goto out; |
704 | } | 704 | } |
@@ -802,7 +802,7 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | |||
802 | cmd = txq->cmd[cmd_index]; | 802 | cmd = txq->cmd[cmd_index]; |
803 | meta = &txq->meta[cmd_index]; | 803 | meta = &txq->meta[cmd_index]; |
804 | 804 | ||
805 | iwlagn_unmap_tfd(priv, meta, &txq->tfds[index], DMA_BIDIRECTIONAL); | 805 | iwlagn_unmap_tfd(priv, meta, &txq->tfds[index], PCI_DMA_BIDIRECTIONAL); |
806 | 806 | ||
807 | /* Input error checking is done when commands are added to queue. */ | 807 | /* Input error checking is done when commands are added to queue. */ |
808 | if (meta->flags & CMD_WANT_SKB) { | 808 | if (meta->flags & CMD_WANT_SKB) { |