aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorRaja Mani <rmani@qca.qualcomm.com>2012-03-02 07:32:08 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2012-03-05 12:06:34 -0500
commitdaa16bc52ad8e9513506fca29a038a1460e63638 (patch)
tree76b2c579905a65d05b70e46fa53d2ae3b68c30aa /drivers/net/wireless/ath
parentd1f4159723450252b643bcddff064153f32918bc (diff)
ath6kl: Restrict memcpy to bounce buffer only for write request
No need to copy received local buffer content to bounce buffer (DMA buffer) while performing sync READ operation from the chip. It's applicable for only WRITE operation. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath6kl/sdio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 346f5dd3a954..e2f42a133952 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -405,7 +405,10 @@ static int ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf,
405 return -ENOMEM; 405 return -ENOMEM;
406 mutex_lock(&ar_sdio->dma_buffer_mutex); 406 mutex_lock(&ar_sdio->dma_buffer_mutex);
407 tbuf = ar_sdio->dma_buffer; 407 tbuf = ar_sdio->dma_buffer;
408 memcpy(tbuf, buf, len); 408
409 if (request & HIF_WRITE)
410 memcpy(tbuf, buf, len);
411
409 bounced = true; 412 bounced = true;
410 } else 413 } else
411 tbuf = buf; 414 tbuf = buf;