diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-09-15 22:46:30 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-19 23:58:26 +0400 |
commit | 909e9b23e4b1d4a783e8d2e5e2c865b7ebdb0675 (patch) | |
tree | 159399076b9c7aa6b7ca6aae2a7db91343aedfd1 /drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c | |
parent | 39644e9ac5329dc92d9547976c8f30f18da90097 (diff) | |
download | linux-909e9b23e4b1d4a783e8d2e5e2c865b7ebdb0675.tar.xz |
iwlagn: free the Tx cmd when a non empty Tx queue is freed
When a non-empty Tx queueis freed, the buffer it contains must be
freed too. Since the Tx cmd are now allocated from a pool, the Tx
cmd must be freed too.
This patch avoids to destroy a non-empty pool of Tx cmd.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c index c7ddb2204a6e..15cb0ff2ff18 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c @@ -225,9 +225,12 @@ void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq, skb = txq->skbs[index]; - /* can be called from irqs-disabled context */ + /* Can be called from irqs-disabled context + * If skb is not NULL, it means that the whole queue is being + * freed and that the queue is not empty - free the skb + */ if (skb) { - dev_kfree_skb_any(skb); + iwl_free_skb(priv(trans), skb); txq->skbs[index] = NULL; } } |