summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-11-19 01:22:51 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-11-25 16:13:08 -0500
commite91af0af8677198346d5d29f09ab39bb3b0e3faf (patch)
tree1d3ca86f71498f27855642dbbfc64dead0a7a952 /drivers/net
parent7e56b5d698707a9934833c47b24d78fb0bcaf764 (diff)
downloadop-kernel-dev-e91af0af8677198346d5d29f09ab39bb3b0e3faf.zip
op-kernel-dev-e91af0af8677198346d5d29f09ab39bb3b0e3faf.tar.gz
iwlagn: fix DMA sync
For the RX DMA fix for iwlwifi ("iwlagn: fix RX skb alignment") Luis pointed out: > aligned_dma_addr can obviously be > real_dma_addr at this point, what > guarantees we can use it on our own whim? I asked around, and he's right, there may be platforms that do not allow passing such such an address to the DMA API functions. This patch changes it by using the proper dma_sync_single_range_for_cpu API invented for this purpose. Cc: Luis R. Rodriguez <mcgrof@gmail.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 444c5cc..c4c0371 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1384,9 +1384,11 @@ void iwl_rx_handle(struct iwl_priv *priv)
rxq->queue[i] = NULL;
- pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr,
- priv->hw_params.rx_buf_size,
- PCI_DMA_FROMDEVICE);
+ dma_sync_single_range_for_cpu(
+ &priv->pci_dev->dev, rxb->real_dma_addr,
+ rxb->aligned_dma_addr - rxb->real_dma_addr,
+ priv->hw_params.rx_buf_size,
+ PCI_DMA_FROMDEVICE);
pkt = (struct iwl_rx_packet *)rxb->skb->data;
/* Reclaim a command buffer only if this packet is a response
OpenPOWER on IntegriCloud