while (q->read_ptr != q->write_ptr) {
i = get_cmd_index(q, q->read_ptr);
- if (txq->meta[i].flags & CMD_MAPPED) {
- iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i],
- DMA_BIDIRECTIONAL);
- txq->meta[i].flags = 0;
- }
+ iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i],
+ DMA_BIDIRECTIONAL);
+ txq->meta[i].flags = 0;
q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd);
}
out_cmd = txq->cmd[idx];
out_meta = &txq->meta[idx];
- if (WARN_ON(out_meta->flags & CMD_MAPPED)) {
- spin_unlock_irqrestore(&priv->hcmd_lock, flags);
- return -ENOSPC;
- }
-
memset(out_meta, 0, sizeof(*out_meta)); /* re-initialize to NULL */
if (cmd->flags & CMD_WANT_SKB)
out_meta->source = cmd;
#endif
}
- out_meta->flags = cmd->flags | CMD_MAPPED;
+ out_meta->flags = cmd->flags;
txq->need_update = 1;
wake_up_interruptible(&priv->wait_command_queue);
}
- /* Mark as unmapped */
meta->flags = 0;
spin_unlock_irqrestore(&priv->hcmd_lock, flags);