/* iwl_txq_ctx_stop - Stop all Tx DMA channels, free Tx queue memory  */
void iwl_txq_ctx_stop(struct iwl_priv *priv)
/* iwl_txq_ctx_stop - Stop all Tx DMA channels, free Tx queue memory  */
void iwl_txq_ctx_stop(struct iwl_priv *priv)
{
	int ch;
	unsigned long flags;
	spin_lock_irqsave(&priv->lock, flags);
	priv->cfg->ops->lib->txq_set_sched(priv, 0);
	for (ch = 0; ch < priv->hw_params.dma_chnl_num; ch++) {
		iwl_write_direct32(priv, FH_TCSR_CHNL_TX_CONFIG_REG(ch), 0x0);
		iwl_poll_direct_bit(priv, FH_TSSR_TX_STATUS_REG,
				    FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch),
				    1000);
	}
	spin_unlock_irqrestore(&priv->lock, flags);
	iwl_hw_txq_ctx_free(priv);
}