Skip to content

Commit b98b33d

Browse files
jmberg-intelKalle Valo
authored andcommitted
iwlwifi: pcie: actually release queue memory in TVQM
The iwl_trans_pcie_dyn_txq_free() function only releases the frames that may be left on the queue by calling iwl_pcie_gen2_txq_unmap(), but doesn't actually free the DMA ring or byte-count tables for the queue. This leads to pretty large memory leaks (at least before my queue size improvements), in particular in monitor/sniffer mode on channel hopping since this happens on every channel change. This was also now more evident after the move to a DMA pool for the byte count tables, showing messages such as BUG iwlwifi:bc (...): Objects remaining in iwlwifi:bc on __kmem_cache_shutdown() This fixes https://bugzilla.kernel.org/show_bug.cgi?id=206811. Signed-off-by: Johannes Berg <[email protected]> Fixes: 6b35ff9 ("iwlwifi: pcie: introduce a000 TX queues management") Cc: [email protected] # v4.14+ Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20200417100405.f5f4c4193ec1.Id5feebc9b4318041913a9c89fc1378bb5454292c@changeid
1 parent a176e11 commit b98b33d

File tree

1 file changed

+3
-0
lines changed
  • drivers/net/wireless/intel/iwlwifi/pcie

1 file changed

+3
-0
lines changed

drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,6 +1418,9 @@ void iwl_trans_pcie_dyn_txq_free(struct iwl_trans *trans, int queue)
14181418

14191419
iwl_pcie_gen2_txq_unmap(trans, queue);
14201420

1421+
iwl_pcie_gen2_txq_free_memory(trans, trans_pcie->txq[queue]);
1422+
trans_pcie->txq[queue] = NULL;
1423+
14211424
IWL_DEBUG_TX_QUEUES(trans, "Deactivate queue %d\n", queue);
14221425
}
14231426

0 commit comments

Comments
 (0)