mwifiex: use PCI_DMA_FROMDEVICE for RX queue de-init
authorAvinash Patil <patila@marvell.com>
Sat, 20 Apr 2013 00:44:42 +0000 (17:44 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Apr 2013 19:20:27 +0000 (15:20 -0400)
There is a typo in mwifiex_cleanup_rxq_ring() which uses
PCI_DMA_TODEVICE while unmapping PCI memory.
We should actually use PCI_DMA_FROMDEVICE.

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>
drivers/net/wireless/mwifiex/pcie.c

index 856959b64bc7d01f077576f80a4d8fe8b95929ba..80f282c0bd4d0a4dcf9f159f6c831b91a0003f8d 100644 (file)
@@ -572,7 +572,7 @@ static void mwifiex_cleanup_rxq_ring(struct mwifiex_adapter *adapter)
                        if (card->rx_buf_list[i]) {
                                skb = card->rx_buf_list[i];
                                pci_unmap_single(card->dev, desc2->paddr,
-                                                skb->len, PCI_DMA_TODEVICE);
+                                                skb->len, PCI_DMA_FROMDEVICE);
                                dev_kfree_skb_any(skb);
                        }
                        memset(desc2, 0, sizeof(*desc2));
@@ -581,7 +581,7 @@ static void mwifiex_cleanup_rxq_ring(struct mwifiex_adapter *adapter)
                        if (card->rx_buf_list[i]) {
                                skb = card->rx_buf_list[i];
                                pci_unmap_single(card->dev, desc->paddr,
-                                                skb->len, PCI_DMA_TODEVICE);
+                                                skb->len, PCI_DMA_FROMDEVICE);
                                dev_kfree_skb_any(skb);
                        }
                        memset(desc, 0, sizeof(*desc));