diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-03-26 11:48:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-10 14:54:03 -0400 |
commit | a75e2ad772b6c26efd702f04be1f9a6414d24f22 (patch) | |
tree | 046a59a881444c85f2cbea826f2120e14bdfb57f /drivers/net/wireless/rtlwifi/pci.c | |
parent | 69b8797fc4a926bf5b895a39b84daddc7eebcd09 (diff) |
rtlwifi: Add missing DMA buffer unmapping for PCI drivers
In https://bugzilla.kernel.org/show_bug.cgi?id=42976, a system with driver
rtl8192se used as an AP suffers from "Out of SW-IOMMU space" errors. These
are caused by the DMA buffers used for beacons never being unmapped.
This bug was also reported at
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/961618
Reported-and-Tested-by: Da Xue <da@lessconfused.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/pci.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 07dd38efe62a..288b035a3579 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -912,8 +912,13 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw) | |||
912 | memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc)); | 912 | memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc)); |
913 | ring = &rtlpci->tx_ring[BEACON_QUEUE]; | 913 | ring = &rtlpci->tx_ring[BEACON_QUEUE]; |
914 | pskb = __skb_dequeue(&ring->queue); | 914 | pskb = __skb_dequeue(&ring->queue); |
915 | if (pskb) | 915 | if (pskb) { |
916 | struct rtl_tx_desc *entry = &ring->desc[ring->idx]; | ||
917 | pci_unmap_single(rtlpci->pdev, rtlpriv->cfg->ops->get_desc( | ||
918 | (u8 *) entry, true, HW_DESC_TXBUFF_ADDR), | ||
919 | pskb->len, PCI_DMA_TODEVICE); | ||
916 | kfree_skb(pskb); | 920 | kfree_skb(pskb); |
921 | } | ||
917 | 922 | ||
918 | /*NB: the beacon data buffer must be 32-bit aligned. */ | 923 | /*NB: the beacon data buffer must be 32-bit aligned. */ |
919 | pskb = ieee80211_beacon_get(hw, mac->vif); | 924 | pskb = ieee80211_beacon_get(hw, mac->vif); |