aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index c832ba085db..625da63d01e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -405,15 +405,19 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv)
405 int txq_id; 405 int txq_id;
406 406
407 /* Tx queues */ 407 /* Tx queues */
408 for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; txq_id++) 408 if (priv->txq)
409 if (txq_id == IWL_CMD_QUEUE_NUM) 409 for (txq_id = 0; txq_id < priv->hw_params.max_txq_num;
410 iwl_cmd_queue_free(priv); 410 txq_id++)
411 else 411 if (txq_id == IWL_CMD_QUEUE_NUM)
412 iwl_tx_queue_free(priv, txq_id); 412 iwl_cmd_queue_free(priv);
413 413 else
414 iwl_tx_queue_free(priv, txq_id);
414 iwl_free_dma_ptr(priv, &priv->kw); 415 iwl_free_dma_ptr(priv, &priv->kw);
415 416
416 iwl_free_dma_ptr(priv, &priv->scd_bc_tbls); 417 iwl_free_dma_ptr(priv, &priv->scd_bc_tbls);
418
419 /* free tx queue structure */
420 iwl_free_txq_mem(priv);
417} 421}
418EXPORT_SYMBOL(iwl_hw_txq_ctx_free); 422EXPORT_SYMBOL(iwl_hw_txq_ctx_free);
419 423
@@ -445,6 +449,12 @@ int iwl_txq_ctx_reset(struct iwl_priv *priv)
445 IWL_ERR(priv, "Keep Warm allocation failed\n"); 449 IWL_ERR(priv, "Keep Warm allocation failed\n");
446 goto error_kw; 450 goto error_kw;
447 } 451 }
452
453 /* allocate tx queue structure */
454 ret = iwl_alloc_txq_mem(priv);
455 if (ret)
456 goto error;
457
448 spin_lock_irqsave(&priv->lock, flags); 458 spin_lock_irqsave(&priv->lock, flags);
449 459
450 /* Turn off all Tx DMA fifos */ 460 /* Turn off all Tx DMA fifos */