Commit 904855a5 authored by Ben Hutchings's avatar Ben Hutchings Committed by Greg Kroah-Hartman

iwlwifi: Complete backport of "iwlwifi: always copy first 16 bytes of commands"

Linux 3.4.83 included an incomplete backport of commit
8a964f44 ('iwlwifi: always copy first
16 bytes of commands') which causes a regression for this driver.
This is the missing piece.
Reported-by: default avatarAndreas Sturmlechner <andreas.sturmlechner@gmail.com>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Andres Bertens <abertensu@yahoo.com>
Tested-by: default avatarAndreas Sturmlechner <andreas.sturmlechner@gmail.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 542a39ac
...@@ -825,14 +825,15 @@ static int iwl_enqueue_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd) ...@@ -825,14 +825,15 @@ static int iwl_enqueue_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
trace_idx = 1; trace_idx = 1;
#endif #endif
/* map the remaining (adjusted) nocopy/dup fragments */
for (i = 0; i < IWL_MAX_CMD_TFDS; i++) { for (i = 0; i < IWL_MAX_CMD_TFDS; i++) {
if (!cmd->len[i]) if (!cmdlen[i])
continue; continue;
if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY)) if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY))
continue; continue;
phys_addr = dma_map_single(trans->dev, phys_addr = dma_map_single(trans->dev,
(void *)cmd->data[i], (void *)cmddata[i],
cmd->len[i], DMA_BIDIRECTIONAL); cmdlen[i], DMA_BIDIRECTIONAL);
if (dma_mapping_error(trans->dev, phys_addr)) { if (dma_mapping_error(trans->dev, phys_addr)) {
iwlagn_unmap_tfd(trans, out_meta, iwlagn_unmap_tfd(trans, out_meta,
&txq->tfds[q->write_ptr], &txq->tfds[q->write_ptr],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment