提交 caea2172 编写于 作者: L Larry Finger 提交者: John W. Linville

rtlwifi: Fix errors in descriptor manipulation

There are typos in the handling of the descriptor pointers where the wrong
descriptor is referenced. There is also an error in which the pointer is
incremented twice.
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 fb6eaf2c
...@@ -1375,9 +1375,9 @@ static void _rtl_pci_free_tx_ring(struct ieee80211_hw *hw, ...@@ -1375,9 +1375,9 @@ static void _rtl_pci_free_tx_ring(struct ieee80211_hw *hw,
ring->desc = NULL; ring->desc = NULL;
if (rtlpriv->use_new_trx_flow) { if (rtlpriv->use_new_trx_flow) {
pci_free_consistent(rtlpci->pdev, pci_free_consistent(rtlpci->pdev,
sizeof(*ring->desc) * ring->entries, sizeof(*ring->buffer_desc) * ring->entries,
ring->buffer_desc, ring->buffer_desc_dma); ring->buffer_desc, ring->buffer_desc_dma);
ring->desc = NULL; ring->buffer_desc = NULL;
} }
} }
...@@ -1548,7 +1548,6 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw) ...@@ -1548,7 +1548,6 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
true, true,
HW_DESC_TXBUFF_ADDR), HW_DESC_TXBUFF_ADDR),
skb->len, PCI_DMA_TODEVICE); skb->len, PCI_DMA_TODEVICE);
ring->idx = (ring->idx + 1) % ring->entries;
kfree_skb(skb); kfree_skb(skb);
ring->idx = (ring->idx + 1) % ring->entries; ring->idx = (ring->idx + 1) % ring->entries;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册