diff options
author | Raja Mani <rmani@qca.qualcomm.com> | 2012-03-02 18:02:08 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-05 19:06:34 +0200 |
commit | daa16bc52ad8e9513506fca29a038a1460e63638 (patch) | |
tree | 76b2c579905a65d05b70e46fa53d2ae3b68c30aa | |
parent | d1f4159723450252b643bcddff064153f32918bc (diff) | |
download | linux-daa16bc52ad8e9513506fca29a038a1460e63638.tar.bz2 |
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>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/sdio.c | 5 |
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, return -ENOMEM; mutex_lock(&ar_sdio->dma_buffer_mutex); tbuf = ar_sdio->dma_buffer; - memcpy(tbuf, buf, len); + + if (request & HIF_WRITE) + memcpy(tbuf, buf, len); + bounced = true; } else tbuf = buf; |