diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-06-22 07:25:57 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-06-24 14:54:30 -0400 |
commit | f8d651a56ef5c9e26a1cddd4f169f5bf4f8dfa9b (patch) | |
tree | a6511dd9831c85ee34055f07f343a3a7a667987f /drivers/net | |
parent | 1e5cf9b0be4e8902c06bf9600ea0b256e731c862 (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 fd8aee9972c1..cf8fc9afa1ea 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -309,10 +309,7 @@ void iwl_cmd_queue_unmap(struct iwl_priv *priv) | |||
309 | i = get_cmd_index(q, q->read_ptr); | 309 | i = get_cmd_index(q, q->read_ptr); |
310 | 310 | ||
311 | if (txq->meta[i].flags & CMD_MAPPED) { | 311 | if (txq->meta[i].flags & CMD_MAPPED) { |
312 | dma_unmap_single(priv->bus.dev, | 312 | iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i]); |
313 | dma_unmap_addr(&txq->meta[i], mapping), | ||
314 | dma_unmap_len(&txq->meta[i], len), | ||
315 | DMA_BIDIRECTIONAL); | ||
316 | txq->meta[i].flags = 0; | 313 | txq->meta[i].flags = 0; |
317 | } | 314 | } |
318 | 315 | ||