diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2014-11-06 02:10:53 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-11-10 19:10:23 +0100 |
commit | caea2172c23465a77556b2e1d06412b532b90235 (patch) | |
tree | b83c1460fbfcbc34418ad3136b695a296ee56693 /drivers | |
parent | rtlwifi: Fix setting of tx descriptor for new trx flow (diff) | |
download | linux-caea2172c23465a77556b2e1d06412b532b90235.tar.xz linux-caea2172c23465a77556b2e1d06412b532b90235.zip |
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: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 116f746e7c73..6d2b6281e22b 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c @@ -1375,9 +1375,9 @@ static void _rtl_pci_free_tx_ring(struct ieee80211_hw *hw, ring->desc = NULL; if (rtlpriv->use_new_trx_flow) { pci_free_consistent(rtlpci->pdev, - sizeof(*ring->desc) * ring->entries, + sizeof(*ring->buffer_desc) * ring->entries, 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) true, HW_DESC_TXBUFF_ADDR), skb->len, PCI_DMA_TODEVICE); - ring->idx = (ring->idx + 1) % ring->entries; kfree_skb(skb); ring->idx = (ring->idx + 1) % ring->entries; } |