Skip to content

Commit 5ee0a58

Browse files
committed
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>
1 parent a66b98d commit 5ee0a58

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎drivers/net/wireless/iwlwifi/iwl-tx.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static inline u8 iwl_tfd_get_num_tbs(struct iwl_tfd *tfd)
126126
}
127127

128128
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)
130130
{
131131
struct pci_dev *dev = priv->pci_dev;
132132
int i;
@@ -168,7 +168,7 @@ void iwlagn_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
168168
int index = txq->q.read_ptr;
169169

170170
iwlagn_unmap_tfd(priv, &txq->meta[index], &tfd_tmp[index],
171-
DMA_TO_DEVICE);
171+
PCI_DMA_TODEVICE);
172172

173173
/* free SKB */
174174
if (txq->txb) {
@@ -312,7 +312,7 @@ void iwl_cmd_queue_unmap(struct iwl_priv *priv)
312312

313313
if (txq->meta[i].flags & CMD_MAPPED) {
314314
iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i],
315-
DMA_BIDIRECTIONAL);
315+
PCI_DMA_BIDIRECTIONAL);
316316
txq->meta[i].flags = 0;
317317
}
318318

@@ -694,11 +694,11 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
694694
if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY))
695695
continue;
696696
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);
698698
if (pci_dma_mapping_error(priv->pci_dev, phys_addr)) {
699699
iwlagn_unmap_tfd(priv, out_meta,
700700
&txq->tfds[q->write_ptr],
701-
DMA_BIDIRECTIONAL);
701+
PCI_DMA_BIDIRECTIONAL);
702702
idx = -ENOMEM;
703703
goto out;
704704
}
@@ -802,7 +802,7 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
802802
cmd = txq->cmd[cmd_index];
803803
meta = &txq->meta[cmd_index];
804804

805-
iwlagn_unmap_tfd(priv, meta, &txq->tfds[index], DMA_BIDIRECTIONAL);
805+
iwlagn_unmap_tfd(priv, meta, &txq->tfds[index], PCI_DMA_BIDIRECTIONAL);
806806

807807
/* Input error checking is done when commands are added to queue. */
808808
if (meta->flags & CMD_WANT_SKB) {

0 commit comments

Comments
 (0)