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

Commit 7af1ce0e authored by Yogesh Ashok Powar's avatar Yogesh Ashok Powar Committed by John W. Linville
Browse files

mwifiex: Correct pci_unmap_single's size



There exist mismatch between the size used for pci_map and
pci_unmap on command skb. Correcting it.

Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarYogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 955ab095
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -861,7 +861,7 @@ static int mwifiex_pcie_delete_cmdrsp_buf(struct mwifiex_adapter *adapter)

	if (card && card->cmd_buf) {
		MWIFIEX_SKB_PACB(card->cmd_buf, &buf_pa);
		pci_unmap_single(card->dev, buf_pa, MWIFIEX_SIZE_OF_CMD_BUFFER,
		pci_unmap_single(card->dev, buf_pa, card->cmd_buf->len,
				 PCI_DMA_TODEVICE);
	}
	return 0;
@@ -1572,7 +1572,7 @@ static int mwifiex_pcie_cmdrsp_complete(struct mwifiex_adapter *adapter,
	skb_tmp = card->cmd_buf;
	if (skb_tmp) {
		MWIFIEX_SKB_PACB(skb_tmp, &buf_pa);
		pci_unmap_single(card->dev, buf_pa, MWIFIEX_UPLD_SIZE,
		pci_unmap_single(card->dev, buf_pa, skb_tmp->len,
				 PCI_DMA_FROMDEVICE);
		card->cmd_buf = NULL;
	}