提交 daa16bc5 编写于 作者: R Raja Mani 提交者: Kalle Valo

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: NRaja Mani <rmani@qca.qualcomm.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 d1f41597
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册