diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-09-30 16:25:43 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-10-16 16:31:53 +0200 |
commit | 986ea6c9e3834c9669fe69514fa90d916356bedc (patch) | |
tree | 2f4f11ff141a1d8b418f2ee01dcc2bdda73ac3e1 /drivers/net/wireless/iwlwifi/pcie | |
parent | iwlwifi: remove unused variables (diff) | |
download | linux-986ea6c9e3834c9669fe69514fa90d916356bedc.tar.xz linux-986ea6c9e3834c9669fe69514fa90d916356bedc.zip |
iwlwifi: wipe out the status of the SCD when we disable a queue
When we disable a queue, we don't want the SCD to remember anything
about this queue (what packet was transmitted but not acked, what
packed was acked etc...).
Wipe out all this data in its SRAM.
Constify the arguments to iwl_write_targ_mem_dwords on the way.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/tx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c index b50d1b4a4fcf..f3c23afbbe63 100644 --- a/drivers/net/wireless/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/iwlwifi/pcie/tx.c @@ -481,6 +481,9 @@ void iwl_trans_pcie_txq_disable(struct iwl_trans *trans, int txq_id) { struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); u16 rd_ptr, wr_ptr; + u32 stts_addr = trans_pcie->scd_base_addr + + SCD_TX_STTS_QUEUE_OFFSET(txq_id); + static const u32 zero_val[4] = {}; int n_bd = trans_pcie->txq[txq_id].q.n_bd; if (!test_and_clear_bit(txq_id, trans_pcie->queue_used)) { @@ -494,6 +497,9 @@ void iwl_trans_pcie_txq_disable(struct iwl_trans *trans, int txq_id) WARN_ONCE(rd_ptr != wr_ptr, "queue %d isn't empty: [%d,%d]", txq_id, rd_ptr, wr_ptr); + _iwl_write_targ_mem_dwords(trans, stts_addr, + zero_val, ARRAY_SIZE(zero_val)); + iwl_txq_set_inactive(trans, txq_id); IWL_DEBUG_TX_QUEUES(trans, "Deactivate queue %d\n", txq_id); } |