iwlagn: remove the CMD_MAPPED flag
It is uneeded since Johannes removed the HUGE flag. The DMA mapping is always held in the same index as the command. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
4b42c542af
commit
afaf6b5742
|
@ -263,7 +263,6 @@ enum {
|
||||||
CMD_NO_SKB = 0,
|
CMD_NO_SKB = 0,
|
||||||
CMD_ASYNC = (1 << 1),
|
CMD_ASYNC = (1 << 1),
|
||||||
CMD_WANT_SKB = (1 << 2),
|
CMD_WANT_SKB = (1 << 2),
|
||||||
CMD_MAPPED = (1 << 3),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEF_CMD_PAYLOAD_SIZE 320
|
#define DEF_CMD_PAYLOAD_SIZE 320
|
||||||
|
|
|
@ -291,11 +291,9 @@ void iwl_cmd_queue_unmap(struct iwl_priv *priv)
|
||||||
while (q->read_ptr != q->write_ptr) {
|
while (q->read_ptr != q->write_ptr) {
|
||||||
i = get_cmd_index(q, q->read_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],
|
||||||
iwlagn_unmap_tfd(priv, &txq->meta[i], &txq->tfds[i],
|
DMA_BIDIRECTIONAL);
|
||||||
DMA_BIDIRECTIONAL);
|
txq->meta[i].flags = 0;
|
||||||
txq->meta[i].flags = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd);
|
q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd);
|
||||||
}
|
}
|
||||||
|
@ -496,11 +494,6 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
|
||||||
out_cmd = txq->cmd[idx];
|
out_cmd = txq->cmd[idx];
|
||||||
out_meta = &txq->meta[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 */
|
memset(out_meta, 0, sizeof(*out_meta)); /* re-initialize to NULL */
|
||||||
if (cmd->flags & CMD_WANT_SKB)
|
if (cmd->flags & CMD_WANT_SKB)
|
||||||
out_meta->source = cmd;
|
out_meta->source = cmd;
|
||||||
|
@ -574,7 +567,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
out_meta->flags = cmd->flags | CMD_MAPPED;
|
out_meta->flags = cmd->flags;
|
||||||
|
|
||||||
txq->need_update = 1;
|
txq->need_update = 1;
|
||||||
|
|
||||||
|
@ -684,7 +677,6 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
|
||||||
wake_up_interruptible(&priv->wait_command_queue);
|
wake_up_interruptible(&priv->wait_command_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark as unmapped */
|
|
||||||
meta->flags = 0;
|
meta->flags = 0;
|
||||||
|
|
||||||
spin_unlock_irqrestore(&priv->hcmd_lock, flags);
|
spin_unlock_irqrestore(&priv->hcmd_lock, flags);
|
||||||
|
|
Loading…
Reference in New Issue