Lines Matching refs:cmd
28 struct iwl_host_cmd *cmd) in iwl_pcie_gen2_enqueue_hcmd() argument
31 struct iwl_txq *txq = trans->txqs.txq[trans->txqs.cmd.q_id]; in iwl_pcie_gen2_enqueue_hcmd()
39 u8 group_id = iwl_cmd_groupid(cmd->id); in iwl_pcie_gen2_enqueue_hcmd()
49 cmddata[i] = cmd->data[i]; in iwl_pcie_gen2_enqueue_hcmd()
50 cmdlen[i] = cmd->len[i]; in iwl_pcie_gen2_enqueue_hcmd()
52 if (!cmd->len[i]) in iwl_pcie_gen2_enqueue_hcmd()
66 if (cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY) { in iwl_pcie_gen2_enqueue_hcmd()
68 if (WARN_ON(cmd->dataflags[i] & IWL_HCMD_DFL_DUP)) { in iwl_pcie_gen2_enqueue_hcmd()
72 } else if (cmd->dataflags[i] & IWL_HCMD_DFL_DUP) { in iwl_pcie_gen2_enqueue_hcmd()
97 cmd_size += cmd->len[i]; in iwl_pcie_gen2_enqueue_hcmd()
107 iwl_get_cmd_string(trans, cmd->id), cmd->id, copy_size)) { in iwl_pcie_gen2_enqueue_hcmd()
118 if (iwl_txq_space(trans, txq) < ((cmd->flags & CMD_ASYNC) ? 2 : 1)) { in iwl_pcie_gen2_enqueue_hcmd()
127 out_cmd = txq->entries[idx].cmd; in iwl_pcie_gen2_enqueue_hcmd()
132 if (cmd->flags & CMD_WANT_SKB) in iwl_pcie_gen2_enqueue_hcmd()
133 out_meta->source = cmd; in iwl_pcie_gen2_enqueue_hcmd()
136 out_cmd->hdr_wide.cmd = iwl_cmd_opcode(cmd->id); in iwl_pcie_gen2_enqueue_hcmd()
138 out_cmd->hdr_wide.version = iwl_cmd_version(cmd->id); in iwl_pcie_gen2_enqueue_hcmd()
143 cpu_to_le16(QUEUE_TO_SEQ(trans->txqs.cmd.q_id) | in iwl_pcie_gen2_enqueue_hcmd()
153 if (!cmd->len[i]) in iwl_pcie_gen2_enqueue_hcmd()
157 if (!(cmd->dataflags[i] & (IWL_HCMD_DFL_NOCOPY | in iwl_pcie_gen2_enqueue_hcmd()
159 copy = cmd->len[i]; in iwl_pcie_gen2_enqueue_hcmd()
161 memcpy((u8 *)out_cmd + cmd_pos, cmd->data[i], copy); in iwl_pcie_gen2_enqueue_hcmd()
172 copy = min_t(int, TFD_MAX_PAYLOAD_SIZE - cmd_pos, cmd->len[i]); in iwl_pcie_gen2_enqueue_hcmd()
174 memcpy((u8 *)out_cmd + cmd_pos, cmd->data[i], copy); in iwl_pcie_gen2_enqueue_hcmd()
181 if (copy > cmd->len[i]) in iwl_pcie_gen2_enqueue_hcmd()
182 copy = cmd->len[i]; in iwl_pcie_gen2_enqueue_hcmd()
189 iwl_get_cmd_string(trans, cmd->id), group_id, in iwl_pcie_gen2_enqueue_hcmd()
190 out_cmd->hdr.cmd, le16_to_cpu(out_cmd->hdr.sequence), in iwl_pcie_gen2_enqueue_hcmd()
191 cmd_size, txq->write_ptr, idx, trans->txqs.cmd.q_id); in iwl_pcie_gen2_enqueue_hcmd()
220 if (!(cmd->dataflags[i] & (IWL_HCMD_DFL_NOCOPY | in iwl_pcie_gen2_enqueue_hcmd()
223 if (cmd->dataflags[i] & IWL_HCMD_DFL_DUP) in iwl_pcie_gen2_enqueue_hcmd()
236 out_meta->flags = cmd->flags; in iwl_pcie_gen2_enqueue_hcmd()
241 trace_iwlwifi_dev_hcmd(trans->dev, cmd, cmd_size, &out_cmd->hdr_wide); in iwl_pcie_gen2_enqueue_hcmd()