diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-06-27 10:48:52 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-06-27 10:50:45 -0400 |
commit | 1107a08a1a3e0f54d535d37ee0c4192acce6a7f3 (patch) | |
tree | 5ed58ab5a2665e9568dcea8fb00934c30c4fdb27 /drivers/net | |
parent | 5306c0807491e891125f4fb08b04340c91530f57 (diff) |
iwlagn: fix cmd queue unmap
When we stop the device while a command is in
flight that uses multiple TBs, we can leak the
DMA buffers for the second and higher TBs. Fix
this by using iwlagn_unmap_tfd() as we do when
we normally recover the entry.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 157a642a5436..8f20065e6dac 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -310,10 +310,7 @@ void iwl_cmd_queue_unmap(struct iwl_priv *priv) | |||
310 | i = get_cmd_index(q, q->read_ptr); | 310 | i = get_cmd_index(q, q->read_ptr); |
311 | 311 | ||
312 | if (txq->meta[i].flags & CMD_MAPPED) { | 312 | if (txq->meta[i].flags & CMD_MAPPED) { |
313 | pci_unmap_single(priv->pci_dev, | 313 | iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i]); |
314 | dma_unmap_addr(&txq->meta[i], mapping), | ||
315 | dma_unmap_len(&txq->meta[i], len), | ||
316 | PCI_DMA_BIDIRECTIONAL); | ||
317 | txq->meta[i].flags = 0; | 314 | txq->meta[i].flags = 0; |
318 | } | 315 | } |
319 | 316 | ||