Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daa16bc5 authored by Raja Mani's avatar Raja Mani Committed by Kalle Valo
Browse files

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: default avatarRaja Mani <rmani@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent d1f41597
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;

		if (request & HIF_WRITE)
			memcpy(tbuf, buf, len);

		bounced = true;
	} else
		tbuf = buf;