aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 9e6f9ec1a2b8..ba7e720e73c1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -741,7 +741,8 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
741void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq) 741void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
742{ 742{
743 struct iwl3945_tfd *tfd_tmp = (struct iwl3945_tfd *)txq->tfds; 743 struct iwl3945_tfd *tfd_tmp = (struct iwl3945_tfd *)txq->tfds;
744 struct iwl3945_tfd *tfd = &tfd_tmp[txq->q.read_ptr]; 744 int index = txq->q.read_ptr;
745 struct iwl3945_tfd *tfd = &tfd_tmp[index];
745 struct pci_dev *dev = priv->pci_dev; 746 struct pci_dev *dev = priv->pci_dev;
746 int i; 747 int i;
747 int counter; 748 int counter;
@@ -759,6 +760,13 @@ void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
759 return; 760 return;
760 } 761 }
761 762
763 /* Unmap tx_cmd */
764 if (counter)
765 pci_unmap_single(dev,
766 pci_unmap_addr(&txq->cmd[index]->meta, mapping),
767 pci_unmap_len(&txq->cmd[index]->meta, len),
768 PCI_DMA_TODEVICE);
769
762 /* unmap chunks if any */ 770 /* unmap chunks if any */
763 771
764 for (i = 1; i < counter; i++) { 772 for (i = 1; i < counter; i++) {