aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2013-04-23 19:49:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-04-26 08:42:22 -0400
commit7af1ce0e0daaf181335c8edc21e12d69ee5cd1d1 (patch)
treea553f7f33c07e25da92f26918e397be8ed140b34
parent955ab095c51a6f5a105aaeff4fc8e32c2ee94814 (diff)
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: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/mwifiex/pcie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index eaf93f55e4db..20c9c4c7b0b2 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -861,7 +861,7 @@ static int mwifiex_pcie_delete_cmdrsp_buf(struct mwifiex_adapter *adapter)
861 861
862 if (card && card->cmd_buf) { 862 if (card && card->cmd_buf) {
863 MWIFIEX_SKB_PACB(card->cmd_buf, &buf_pa); 863 MWIFIEX_SKB_PACB(card->cmd_buf, &buf_pa);
864 pci_unmap_single(card->dev, buf_pa, MWIFIEX_SIZE_OF_CMD_BUFFER, 864 pci_unmap_single(card->dev, buf_pa, card->cmd_buf->len,
865 PCI_DMA_TODEVICE); 865 PCI_DMA_TODEVICE);
866 } 866 }
867 return 0; 867 return 0;
@@ -1572,7 +1572,7 @@ static int mwifiex_pcie_cmdrsp_complete(struct mwifiex_adapter *adapter,
1572 skb_tmp = card->cmd_buf; 1572 skb_tmp = card->cmd_buf;
1573 if (skb_tmp) { 1573 if (skb_tmp) {
1574 MWIFIEX_SKB_PACB(skb_tmp, &buf_pa); 1574 MWIFIEX_SKB_PACB(skb_tmp, &buf_pa);
1575 pci_unmap_single(card->dev, buf_pa, MWIFIEX_UPLD_SIZE, 1575 pci_unmap_single(card->dev, buf_pa, skb_tmp->len,
1576 PCI_DMA_FROMDEVICE); 1576 PCI_DMA_FROMDEVICE);
1577 card->cmd_buf = NULL; 1577 card->cmd_buf = NULL;
1578 } 1578 }